Addi

From Unofficial QEdit Wiki Guide
Jump to: navigation, search

Syntax

Syntax: addi register1, xxxxxxxx

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

Use

Used to add a integer value to a register. For adding registers to registers see add

Example


100:     leti R1, '00000001' //Set R1 to 1
         window_msg 'Register 1 = <r1>' //Display the value of R1 in a window message (1)
         addi R1, '00000001' //Add 1 to R1
         add_msg 'Register 1 = <r1>' //Display the new value of R1 in a window message (2)
         addi R1, '00000001' //Add 1 to R1
         add_msg 'Register 1 = <r1>' //Display the new value of R1 in a window message (3)
         addi R1, '00000001' //Add 1 to R1
         add_msg 'Register 1 = <r1>' //Display the new value of R1 in a window message (4)
         addi R1, '00000001' //Add 1 to R1
         winend  //Close window message
         ret 

Also see

leti, window_msg, add_msg, winend, ret