Difference between revisions of "Ujmpiugl"

From Unofficial QEdit Wiki Guide
Jump to: navigation, search
 
(Use)
 
(2 intermediate revisions by the same user not shown)
Line 7: Line 7:
  
 
==Use==
 
==Use==
Used to compare the value of a register with an integer value. This Opcode is the same as [[jmpiul|ujmpi_<]] except that it tests an unsigned value. If register 1 is less than integer go to function. To compare register with another register use [[ujmpul|ujmp_<]]
+
Used to compare the value of a register with an integer value. This Opcode is the same as [[jmpul|ujmp_<]] except that it tests an unsigned value. If register 1 is less than integer go to function. To compare register with another register use [[ujmpugl|ujmp_<]]
  
 
==Example==
 
==Example==
Line 14: Line 14:
 
  <span style='color:green'>        thread </span>101 <span style='color:orange'>//Threads Function 101.</span>
 
  <span style='color:green'>        thread </span>101 <span style='color:orange'>//Threads Function 101.</span>
 
  <span style='color:green'>        ret </span>
 
  <span style='color:green'>        ret </span>
  <span style='color:blue'>101:    </span><span style='color:green'>ujmp_< </span>R1, 00000001, 102 <span style='color:orange'>//If R1 is less than xxxxxxxx go to function 102</span>
+
  <span style='color:blue'>101:    </span><span style='color:green'>ujmpi_< </span>R1, 00000001, 102 <span style='color:orange'>//If R1 is less than xxxxxxxx go to function 102</span>
 
  <span style='color:green'>        subi </span>R1, 00000001
 
  <span style='color:green'>        subi </span>R1, 00000001
 
  <span style='color:green'>        jmp </span>101
 
  <span style='color:green'>        jmp </span>101

Latest revision as of 06:29, 23 May 2014

Syntax

Syntax: ujmpi_< register1, xxxxxxxx, function

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

Use

Used to compare the value of a register with an integer value. This Opcode is the same as ujmp_< except that it tests an unsigned value. If register 1 is less than integer go to function. To compare register with another register use ujmp_<

Example


100:     leti R1, 00000002
         thread 101 //Threads Function 101.
         ret 
101:     ujmpi_< R1, 00000001, 102 //If R1 is less than xxxxxxxx go to function 102
         subi R1, 00000001
         jmp 101
102:     nop //This example does nothing.
         ret 

Also see

leti, thread, subi, ret, nop, jmp