Subi

From Unofficial QEdit Wiki Guide
Jump to: navigation, search

Syntax

Syntax: subi register1, xxxxxxxx

  • register1 = Register to subtract from
  • xxxxxxxx = Integer value to add

Use

Used to subtract a integer value from a register. For subtracting registers from registers see sub

Example


100:     leti R1, '0000000A' //Set R1 to 10
         window_msg 'Register 1 = <r1>' //Display the value of R1 in a window message (10)
         subi R1, '00000001' //Subtract 1 from R1
         add_msg 'Register 1 = <r1>' //Display the new value of R1 in a window message (9)
         subi R1, '00000001' //Subtract 1 from R1
         add_msg 'Register 1 = <r1>' //Display the new value of R1 in a window message (8)
         subi R1, '00000001' //Subtract 1 from R1
         add_msg 'Register 1 = <r1>' //Display the new value of R1 in a window message (7)
         subi R1, '00000001' //Subtract 1 from R1
         winend  //Close window message
         ret 

Also see

leti, window_msg, add_msg, winend, ret