Email: Password: Remember Me | Create Account (Free)

Back to Subject List

Old thread has been locked -- no new posts accepted in this thread
???
01/17/12 13:31
Read: times


 
#185529 - Check the CJNE instruction...
Responding to: ???'s previous message
You can use the carry flag to test if A > 4...


;Instead of
IF A>=0x03
 SETB GAIN_ERROR
 RET
ENDIF
;I have written
CJNE A, #0x03, INC_A_1

 SETB GAIN_ERROR
 RET
INC_A_1
; I just have to hope that there is no error above 4

;Check the carry flag here. If A > 3 it will be clear

;and for
IF A=#0x00
 SETB GAIN_ERROR
 RET
ENDIF
; I made a simple JZ opperation
JZ ERR
 



List of 17 messages in thread
TopicAuthorDate
Conditional Statements            01/01/70 00:00      
   Hex constants?            01/01/70 00:00      
      0x00, 0x01, 0x02??            01/01/70 00:00      
   What is the octothorpe?            01/01/70 00:00      
      #            01/01/70 00:00      
         Immediate or not            01/01/70 00:00      
      what is an octothorpe?            01/01/70 00:00      
         Previously, on 8052.com            01/01/70 00:00      
   Problem solved, query still remains            01/01/70 00:00      
      Do some trial and error            01/01/70 00:00      
      Check the CJNE instruction...            01/01/70 00:00      
         Handy that!            01/01/70 00:00      
      run time vs compile time            01/01/70 00:00      
         IF only at assemble            01/01/70 00:00      
            Not Really!!            01/01/70 00:00      
               I second that            01/01/70 00:00      
            Hw variants or debugging are big users of conditionals            01/01/70 00:00      

Back to Subject List