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

Back to Subject List

Old thread has been locked -- no new posts accepted in this thread
???
10/20/05 10:04
Read: times


 
#102674 - Confusing for bigineer
Responding to: ???'s previous message
Slobodan Mandaric said:
Andy Neil said:

The clue is right there in the name of the instruction:
CJNE = Compare and Jump if Not Equal

Yes, it's pretty clear, but I agree that this command appears a bit confusing, and easily produces bugs, especially with beginners.

Absolutely

Slobodan Mandaric said:

I often use these two macros:

; Macros:

JPLESS MACRO R,DAT,LAB ; Jump to LABEL if REG less than DAT
CJNE R,DAT,$+3 ; (No jump, just take the next instruction)
JC LAB
ENDM

JPGTEQ MACRO R,DAT,LAB ; Jump to LABEL if REG greater-equal to DAT
CJNE R,DAT,$+3
JNC LAB
ENDM


That is great, but don't you think this will be more confusing for bigineers!?

Better is CJNE = compare and jump if not equal !

Slobodan Mandaric said:

But besides that, if the value is to be tested on Equal or Not-Equal, and if it can be destroyed, then this seems a bit easier:
XRL A,Value ; or #Value !
JZ Equal

or JNZ NotEqual

Yes this is promisingly nice solution and easier to understand for begineers.









List of 25 messages in thread
TopicAuthorDate
CJNE clarrification            01/01/70 00:00      
   Please find my answer below each quest            01/01/70 00:00      
   cjne            01/01/70 00:00      
      continued..            01/01/70 00:00      
         external memory            01/01/70 00:00      
            Absolutely!            01/01/70 00:00      
         cheat....            01/01/70 00:00      
            Hint            01/01/70 00:00      
               you young whippersnappers            01/01/70 00:00      
                  Young Whippersnappers tools            01/01/70 00:00      
               size & information            01/01/70 00:00      
         CJNE macros            01/01/70 00:00      
            More CJNE            01/01/70 00:00      
               PRE tags            01/01/70 00:00      
   Whatever made you think that??            01/01/70 00:00      
      used to other language            01/01/70 00:00      
         CJD            01/01/70 00:00      
            welllll...            01/01/70 00:00      
               most admirable, but            01/01/70 00:00      
         Don't guess!            01/01/70 00:00      
            which many that could not be bothered to            01/01/70 00:00      
      Value testing            01/01/70 00:00      
         Confusing for bigineer            01/01/70 00:00      
            Just apply it            01/01/70 00:00      
   what more then "the bibl" do you need            01/01/70 00:00      

Back to Subject List