Assembler ARM - Como eu uso CMP, BLT e BGT?

Pergunta rápida para vocês, no meu loop eu preciso usar CMP, BLT e BGT para comparar alguns valores. Como usaria essas instruções no loop seguinte?

Eu estou tentando usar BGT, BLT e CMP como eu preciso deles para fazer meu aplicativo funcionar. O problema é que não tenho ideia de como usá-los. Se eu quisesse usar o CMP para comparar r6, com r4 e colocar a diferença em r7, como eu faria isso? A mesma pergunta se eu quisesse usar BLT se r7 fosse menor que 0, como eu faria isso?

  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

Aqui está meu loop inteiro:

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

questionAnswers(3)

yourAnswerToTheQuestion