Pregunta rápida para ustedes, en mi ciclo Necesito usar CMP, BLT y BGT para comparar algunos valores. ¿Cómo usaría esas instrucciones en el siguiente ciclo?ARM Assembler - ¿Cómo uso CMP, BLT y BGT?
Estoy tratando de usar BGT, BLT y CMP cuando los necesito para hacer que mi aplicación funcione. El problema es que no tengo idea de cómo usarlos. Si quisiera usar CMP para comparar r6, con r4 y poner la diferencia en r7, ¿cómo lo haría? La misma pregunta si quería usar BLT si r7 es menor que 0, ¿cómo lo haría?
BGT ??????? ; branch if greater than 5
CMP ???????? ; compare r6 with r4 , put difference into r7
BLT ???????? ;branch if r7 is less than 0
BGT ???????? ;branch if r7 is greater than 0
Aquí es toda mi bucle:
LoopStart
BL WaitBUT1
BL readTemp
BL checkTemp
BGT ??????? ; branch if greater than 5
BL errorVal
CMP ???????? ; compare r6 with r4 , put difference into r7
BLT ???????? ;branch if r7 is less than 0
BL FanOn
BL errorLedOn
BL systemLedOn
BL heaterOn
BGT ???????? ;branch if r7 is greater than 0
BL FanOff
BL errorLedOff
BL systemLedOff
BL heaterOff
BL WaitBUT2
BL FanOff
BL errorLedOff
BL systemLedOff
BL heaterOff
B LoopStart
Sus preguntas no están claras. Por favor aclara –
He agregado una descripción más detallada a mi pregunta. – user1080390