This chapter describes the mnemonics and the basic directives that are not related to the script language.
In Kick Assembler you can write assembler mnemonics the traditional way:
lda #0 sta $d020 sta $d021
If you want to write several commands on one line then separate them with ; like this:
lda #0; sta $d020; sta $d021
Kick Assembler supports different sets of opcodes. The default set includes the standard 6502 mnemonics plus the illegal opcodes. To switch between instruction sets of different cpu's use the .cpu directive: The following will switch to the 65c02 instruction set:
.cpu _65c02 loop: inc $20 bra loop // bra is not present in standard 6502 mnemonics
Available cpus are:
Table 3.1. CPU's
Name | Description |
---|---|
_6502NoIllegals | The standard 6502 instruction set. |
_6502 | The standard 6502 instruction + the illegal opcodes. This is the default setting for KickAssembler. |
dtv | The standard 6502 instruction set + the DTV commands. |
_65c02 | The 65c02 instruction set. |
A complete listing of the CPU instructions and their opcodes can be found in the Quick Reference Appendix.