1.3 KiB
Differences in assembly
Syntax
-
High and low bytes of an 16-bit value are acquired using the
hiandlofunctions, not the>and<operators. -
Anonymous labels and local labels are not supported.
All labels defined in assembly are global.
Colons are required in label declarations. -
Macros are inserted using the
+operator. -
Raw bytes are inserted using the Millfork array syntax, not with any pseudoopcode (like
!byte,dborfcb) -
Assembly blocks cannot contain definitions of constants or variables.
-
6502: To enforce zero-page addressing, wrap the argument in the
lofunction:lo(arg) -
6502: To enforce absolute addressing, add a 16-bit zero to the argument:
0000 + arg -
GameBoy: The $FF page loads/stores are written
LDH (C),A, notLD ($FF00+C),A. -
GameBoy: The loads/stores that postincrement/postdecrement HL write the HL register as
HLIorHLD, notHL+orHL- -
Z80: Indexing using the index register uses the
IX(1)syntax, not(IX+1)or1(IX). -
Z80: Most undocumented instructions are not supported. The only one supported is
SLL. -
6809:
0,Xis assembled the same as,X. -
6502: To enforce direct-page addressing, prepend the argument with
<:<arg.