Difference between revisions of "Set"

From Unofficial QEdit Wiki Guide
Jump to: navigation, search
 
(3 intermediate revisions by the same user not shown)
Line 10: Line 10:
 
  <span style='font-size:12px;font-family:courier'>
 
  <span style='font-size:12px;font-family:courier'>
 
  <span style='color:blue'>100:    </span><span style='color:green'>jmpi_= </span>R1, 00000001, 1 <span style='color:orange'>//If Register R1 equals 1 jump to 1</span>
 
  <span style='color:blue'>100:    </span><span style='color:green'>jmpi_= </span>R1, 00000001, 1 <span style='color:orange'>//If Register R1 equals 1 jump to 1</span>
  <span style='color:green'>        window_msg </span>'This is a one time only message!'
+
  <span style='color:green'>        window_msg </span>'This is a one time only message!<cr>Unless Function 101 is called of course...'
 
  <span style='color:green'>        winend </span>
 
  <span style='color:green'>        winend </span>
  <span style='color:green'>        set R1 </span><span style='color:orange'>//Set R1 to 1</span>
+
  <span style='color:green'>        set </span>R1 <span style='color:orange'>//Set R1 to 1</span>
 +
<span style='color:green'>        ret </span>
 +
<span style='color:blue'>101:    </span><span style='color:green'>clear </span>R1 <span style='color:orange'>//Clear R1 to 0</span>
 
  <span style='color:green'>        ret </span>
 
  <span style='color:green'>        ret </span>
 
  </span>
 
  </span>
  
 
==Also see==
 
==Also see==
[[jmpiue|jmpi_=]], [[window_msg]], [[winend]], [[ret]]
+
[[jmpiue|jmpi_=]], [[window_msg]], [[winend]], [[clear]], [[ret]]

Latest revision as of 07:45, 28 March 2011

Syntax

Syntax: set register

  • register = register to set

Use

Used to set a register to a boolean value of 1 (true).

Example


100:     jmpi_= R1, 00000001, 1 //If Register R1 equals 1 jump to 1
         window_msg 'This is a one time only message!<cr>Unless Function 101 is called of course...'
         winend 
         set R1 //Set R1 to 1
         ret 
101:     clear R1 //Clear R1 to 0
         ret 

Also see

jmpi_=, window_msg, winend, clear, ret