Difference between revisions of "Jmpuexe"

From Unofficial QEdit Wiki Guide
Jump to: navigation, search
 
Line 12: Line 12:
 
  <span style='font-size:12px;font-family:courier'>
 
  <span style='font-size:12px;font-family:courier'>
 
  <span style='color:blue'>100:    </span><span style='color:green'>leti </span>R1, 00000001
 
  <span style='color:blue'>100:    </span><span style='color:green'>leti </span>R1, 00000001
  <span style='color:blue'>101:    </span><span style='color:green'>jmp_!= </span>R1, 00000000, 102 <span style='color:orange'>//If R1 is NOT equal to 0 go to function 102</span>
+
  <span style='color:blue'>101:    </span><span style='color:green'>jmp_!= </span>R1, R2, 102 <span style='color:orange'>//If R1 is NOT equal to 0 go to function 102</span>
  <span style='color:green'>        leti </span>R1, 00000000
+
  <span style='color:green'>        leti </span>R2, 00000001
 
  <span style='color:green'>        jmp </span>101
 
  <span style='color:green'>        jmp </span>101
 
  <span style='color:green'>        ret </span>
 
  <span style='color:green'>        ret </span>

Revision as of 11:15, 5 April 2011

Syntax

Syntax: jmp_!= register1, xxxxxxxx, function

  • register1 = Register to compare
  • xxxxxxxx = Integer value to compare with
  • function = Function to jump to if conditions are true.

Use

Used to compare the value of a register with a integer value. If they are NOT equal go to function. To compare register with another register use jmpi_!=

Example


100:     leti R1, 00000001
101:     jmp_!= R1, R2, 102 //If R1 is NOT equal to 0 go to function 102
         leti R2, 00000001
         jmp 101
         ret 
102:     nop //This example does nothing.
         ret 

Also see

leti, ret, nop, jmp