Category:Z80 Assembly: Difference between revisions
m
changed tags to display code correctly
m (changed tags to display code correctly) |
|||
Line 46:
* & or $ represents hexadecimal, and % represents binary.
* A register or a 16-bit value in parentheses represents a pointer being dereferenced. The size of the data pointed to will be the same as the size of the destination.
<syntaxhighlight lang="Z80">
<lang z80>LD A,($4000) ;load the BYTE at memory address $4000 into the accumulator.▼
LD
▲
;Or, more accurately, load the BYTE at $6000 into L and the BYTE at $6001 into H.
LD A,(HL) ;The value stored in HL is treated as a memory address, and the BYTE at that address is loaded into the accumulator.
</syntaxhighlight>
==Efficient Coding Tricks==
|