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 the absolute form of the mnemonic by appending .a or .abs. The same way you can tell the assembler to use zeropage mode when it would otherwise use an absolute mode.

lda.abs $0040,x   // Uses absolute mode
lda.a $0030,x     // Same as abs (abbreviation)  
stx.zp zpLabel,y  // Uses zeropage mode
stx.z zpLabel,y   // Same as zp (abbreviation)
.label zpLabel = $10

jmp.z $1000 // Modifies nothing, jmp don't have any zp mode

With the following extensions you can force specific modes. The are deprecated and only kept for backward compatibility:

Table 3.4. Deprecated 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  
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