Difference between revisions of "Ujmpug"

From Unofficial QEdit Wiki Guide
Jump to: navigation, search
 
(Use)
 
Line 7: Line 7:
  
 
==Use==
 
==Use==
Used to compare the value of a register with another register. This is the same Opcode as [[jmpiug|jmpi_>]] except that it tests for an unsigned value. If register 1 is greater than register 2 go to function. To compare register with integer value use [[ujmpiug|ujmpi_>]]
+
Used to compare the value of a register with another register. This is the same Opcode as [[jmpug|jmp_>]] except that it tests for an unsigned value. If register 1 is greater than register 2 go to function. To compare register with integer value use [[ujmpiug|ujmpi_>]]
  
 
==Example==
 
==Example==

Latest revision as of 23:18, 22 May 2014

Syntax

Syntax: ujmp_> 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. This is the same Opcode as jmp_> except that it tests for an unsigned value. If register 1 is greater than register 2 go to function. To compare register with integer value use ujmpi_>

Example


100:     leti R1, 00000001
         leti R2, 00000002
101:     ujmp_> R1, R2, 102 //If R1 is greater than R2 go to function 102
         addi R1, 00000001
         jmp 101
102:     nop //This example does nothing.
         ret 

Also see

leti, addi, ret, nop, jmp