Modi

From Unofficial QEdit Wiki Guide
Jump to: navigation, search

Syntax

Syntax: modi register1, xxxxxxxx

  • register1 = Register to perform MOD on
  • xxxxxxxx = Integer to perform MOD with

Use

Used to perform modular math on one register with a integer value. For performing MOD on registers with other registers see mod

Example


100:     leti R1, 0000000B //Set R1 to 11
         window_msg 'Register 1 = <r1>' //Display the value of R1 in a window message currently 11
         modi R1, 00000002 //R1 now equals to 1
         add_msg 'Register 1 = <r1>' //Display the new value of R1 in a window message
         winend  //Close window message
         ret 

Also see

leti, window_msg, add_msg, winend, ret