Difference between revisions of "Andi"

From Unofficial QEdit Wiki Guide
Jump to: navigation, search
 
 
Line 12: Line 12:
 
  <span style='color:blue'>100:    </span><span style='color:green'>leti </span>R1, 0000000A <span style='color:orange'>//Set R1 to 00000000000000000000000000001010</span>
 
  <span style='color:blue'>100:    </span><span style='color:green'>leti </span>R1, 0000000A <span style='color:orange'>//Set R1 to 00000000000000000000000000001010</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'>        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'>        and </span>R1, 0000000C <span style='color:orange'>//R1 AND 00000000000000000000000000001100</span>
+
  <span style='color:green'>        andi </span>R1, 0000000C <span style='color:orange'>//R1 AND 00000000000000000000000000001100</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 8</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>

Latest revision as of 15:03, 11 May 2011

Syntax

Syntax: andi register1, xxxxxxxx

  • register1 = Register to perform bitwise AND function on
  • xxxxxxxx = Integer to perform bitwise AND function with

Use

Used to perform a bitwise AND operation of one register with an integer value. For performing AND on registers with other registers see and

Example


100:     leti R1, 0000000A //Set R1 to 00000000000000000000000000001010
         window_msg 'Register 1 = <r1>' //Display the value of R1 in a window message currently 10
         andi R1, 0000000C //R1 AND 00000000000000000000000000001100
         add_msg 'Register 1 = <r1>' //Display the new value of R1 in a window message now 8
         winend  //Close window message
         ret 

Also see

leti, window_msg, add_msg, winend, ret