Difference between revisions of "AMOSi:Amreg"

From Amiga Coding
Jump to: navigation, search
(Extracted from the AMOSPro V2.00 helpfile)
 
Line 5: Line 5:
  
  
<code><pre>
+
<code>
 
value=Amreg(global register)
 
value=Amreg(global register)
 
Amreg(global register)=value
 
Amreg(global register)=value
</pre></code>
+
</code>
  
 
Accesses a global register from RA to RZ. The register number is entered using a simple code. RA is checked using a 0, RB=1 and so on until RZ=25.
 
Accesses a global register from RA to RZ. The register number is entered using a simple code. RA is checked using a 0, RB=1 and so on until RZ=25.
Line 16: Line 16:
  
  
<code><pre>
+
<code>
 
value=Amreg(channel number,local variable)
 
value=Amreg(channel number,local variable)
 
Amreg(channel number,local variable)=value
 
Amreg(channel number,local variable)=value
</pre></code>
+
</code>
  
 
local variable is the number of your variable from 0 (R0) to 9 (R9)<br />
 
local variable is the number of your variable from 0 (R0) to 9 (R9)<br />

Latest revision as of 22:30, 21 January 2009

an example can be found on AMOSPro_Tutorial:Tutorials/Amal/Amal_3.AMOS


Reads or writes to an AMAL register variable.


value=Amreg(global register) Amreg(global register)=value

Accesses a global register from RA to RZ. The register number is entered using a simple code. RA is checked using a 0, RB=1 and so on until RZ=25.


You can also use an extended form of this function to get at the local variables.


value=Amreg(channel number,local variable) Amreg(channel number,local variable)=value

local variable is the number of your variable from 0 (R0) to 9 (R9)