DASM allows numbers to be expressed in binary, octal, decimal, and hexadecimal.
- Binary numbers use the
%
prefix (e.g. %1101
).
- Octal numbers use the
0
prefix (e.g. 015
).
- Decimal numbers use no prefix (e.g.
13
).
- Hexadecimal numbers use the
$
prefix (e.g. $0D
).
The #
symbol is used to specify immediate addressing:
LDA 0 ; Load the byte from address 0 in memory into register A
LDA #0 ; Load the value 0 into register A
One can of course combine immediate addressing with a different numeric base, e.g.:
LDA #$FF ; Load the value $FF into register A
($0C, X)
. – Julianjuliana