3.2. Argument Types

Kick Assembler uses the traditional notation for addressing modes / argument types:

Table 3.3. Argument Types

Mode Example
No argument nop
Immediate lda #$30
Zeropage lda $30
Zeropage,x lda $30,x
Zeropage,y ldx $30,y
Indirect zeropage,x lda ($30,x)
Indirect zeropage,y lda ($30),y
Abolute lda $1000
Absolute,x lda $1000,x
Absolute,y lda $1000,y
Indirect jmp ($1000)
Relative to program counter bne loop

An argument is converted to its zeropage mode if possible. This means that lda $0030 will generate an lda command in its zeropage mode[1].

You can force the assembler to use a given addressing mode by using mnemonic extensions like this:

lda.a $0030  // Uses absolute mode
sta.z label  // Uses zeropage mode
ldx.im $10   // Equal to lda #$10

Here is a list of the extensions:

Table 3.4. Mnemonic Extensions

Ext Mode Example
im, imm Immediate  
z, zp Zeropage ldx.z $1234
zx, zpx Zeropage,x lda.zpx table
zy, zpy Zeropage,y  
izx, izpx Indirect zeropage,x  
izy, izpy Indirect zeropage,y  
a, abs Abolute ldx.a $0010
ax, absx Absolute,x lda.absx $1234
ay, absy Absolute,y  
I, ind Indirect jmp.i $1000
r, rel Relative to program counter  

[1] If the argument is unknown (eg. an unresolved label) in the first pass, the assembler will assume it’s a 16 bit value