Pointers and references: Difference between revisions

m (→‎{{header|68000 Assembly}}: fixed bad lang closer)
Line 271:
print((hay stack))</lang>
Output: straw straw noodle straw straw
 
=={{header|ARM Assembly}}==
Pointers in ARM Assembly are very similar to that on 68000 Assembly. However, ARM Assembly has no address registers. Rather, enclosing a register in brackets treats its value as a memory location.
 
<lang ARM Assembly>;this example uses VASM syntax, your assembler may not use the # before constants or the semicolon for comments
MOV R1,#0x04000000
MOV R0,#0x403
STR R0,[R1] ;store 0x403 into memory address 0x04000000.</lang>
 
The <code>STR</code> instruction is unusual in that its source is on the left and its destination on the right.
 
ARM Assembly has a variety of options for indexed offsetting thanks to its robust addressing modes and barrel shifter. You can offset by a constant or register, and apply a temporary bit shift to either. The syntax for it takes some getting used to but is well worth learning.
 
=={{header|AutoHotkey}}==
1,489

edits