Mod

From Unofficial QEdit Wiki Guide
Jump to: navigation, search

Syntax

Syntax: mod register1, register2

  • register1 = Register to perform MOD on
  • register2 = Register to perform MOD with

Use

Used to perform modular math on one register with the value of another. For performing MOD on registers with integers see modi

Example


100:     leti R1, 0000000B //Set R1 to 11
         leti R2, 00000002 //Set R2 to 2
         window_msg 'Register 1 = <r1>' //Display the value of R1 in a window message currently 11
         mod R1, R2 //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