Divi

From Unofficial QEdit Wiki Guide
Jump to: navigation, search

Syntax

Syntax: divi register1, xxxxxxxx

  • register1 = Register to divide
  • xxxxxxxx = Integer to divide by

Use

Used to divide the value of one register by an integer. For dividing registers another register see div

Example


100:     leti R1, '0000000A' //Set R1 to 10
         window_msg 'Register 1 = <r1>' //Display the value of R1 in a window message
         divi R1, 00000002 //Multiply R1 by R2
         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