We're looking for your comments on how to best organize the wiki's content.

STI

From 0x10c Wiki
(Difference between revisions)
Jump to: navigation, search
(Added mnemonic)
(Processing: deleted typo)
 
Line 17: Line 17:
 
In binary machine code, this Basic opcode's five-bit representation is: <code>0b1 1110</code> (<code>0x1e</code>)
 
In binary machine code, this Basic opcode's five-bit representation is: <code>0b1 1110</code> (<code>0x1e</code>)
  
The instruction has a takes '''two cycles''' to execute, plus any additional cycles necessary to evaluate the arguments.
+
The instruction takes '''two cycles''' to execute, plus any additional cycles necessary to evaluate the arguments.
  
 
== References ==
 
== References ==

Latest revision as of 14:50, 20 June 2012

STI (Set-Increment) is one of the opcodes in the DCPU-16 specification. It represents copying a value into a register or a memory location, then incrementing the I and J registers.

Contents

[edit] Usage

 STI loc, val

STI sets loc to the value val, and increments I and J by 1.

It is common as the final instruction in a loop before jumping back to the beginning of the loop.

[edit] Signing dependence

All of STI's functions are sign-agnostic, working correctly on both signed and unsigned values.

[edit] EX register usage

STI does not read or write to the EX register.

[edit] Processing

In binary machine code, this Basic opcode's five-bit representation is: 0b1 1110 (0x1e)

The instruction takes two cycles to execute, plus any additional cycles necessary to evaluate the arguments.

[edit] References

Personal tools
Namespaces
Variants
Actions
Navigation
Community
Toolbox