Difference between revisions of "Jmpue"

From Unofficial QEdit Wiki Guide
Jump to: navigation, search
Line 7: Line 7:
  
 
==Use==
 
==Use==
Used to compare the value of a register with another register. If they are equal go to function. To compare register with integer value use [[jmpi_=|jmpiue]]
+
Used to compare the value of a register with another register. If they are equal go to function. To compare register with integer value use [[jmpiue|jmpi_=]]
  
 
==Example==
 
==Example==

Revision as of 13:26, 28 March 2011

Syntax

Syntax: jmp_= register1, register2, function

  • register1 = Register to compare
  • register2 = Register to compare with
  • function = Function to jump to if conditions are true.

Use

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

Example


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

Also see

leti, addi, ret, nop