Difference between revisions of "Or"

From Unofficial QEdit Wiki Guide
Jump to: navigation, search
 
 
Line 14: Line 14:
 
  <span style='color:green'>        window_msg </span>'Register 1 = <r1>' <span style='color:orange'>//Display the value of R1 in a window message currently 10</span>
 
  <span style='color:green'>        window_msg </span>'Register 1 = <r1>' <span style='color:orange'>//Display the value of R1 in a window message currently 10</span>
 
  <span style='color:green'>        or </span>R1, R2 <span style='color:orange'>//R1 OR R2. Now equals 00000000000000000000000000001110</span>
 
  <span style='color:green'>        or </span>R1, R2 <span style='color:orange'>//R1 OR R2. Now equals 00000000000000000000000000001110</span>
  <span style='color:green'>        add_msg </span>'Register 1 = <r1>' <span style='color:orange'>//Display the new value of R1 in a window message now 8</span>
+
  <span style='color:green'>        add_msg </span>'Register 1 = <r1>' <span style='color:orange'>//Display the new value of R1 in a window message now 14</span>
 
  <span style='color:green'>        winend </span> <span style='color:orange'>//Close window message</span>
 
  <span style='color:green'>        winend </span> <span style='color:orange'>//Close window message</span>
 
  <span style='color:green'>        ret </span>
 
  <span style='color:green'>        ret </span>

Latest revision as of 15:00, 11 May 2011

Syntax

Syntax: or register1, register2

  • register1 = Register to perform bitwise OR function on
  • register2 = Register to perform bitwise OR function with

Use

Used to perform a bitwise OR operation of one register with the value of another. For performing OR on registers with integers see ori

Example


100:     leti R1, 0000000A //Set R1 to 00000000000000000000000000001010
         leti R2, 0000000C //Set R2 to 00000000000000000000000000001100
         window_msg 'Register 1 = <r1>' //Display the value of R1 in a window message currently 10
         or R1, R2 //R1 OR R2. Now equals 00000000000000000000000000001110
         add_msg 'Register 1 = <r1>' //Display the new value of R1 in a window message now 14
         winend  //Close window message
         ret 

Also see

leti, window_msg, add_msg, winend, ret