Navigation
Links
Admin
 
Last site update:
  • October 25, 2007

Documentation

More to be written...

Instructions

        ADC AND ASL
        BCC BCS BEQ BIT BMI BNE BPL BRK BVC BVS
        CLC CLD CLI CLV CMP CPX CPY
        DEC DEX DEY 
        EOR 
        INC INX INY
        JMP JSR
        LDA LDX LDY LSR
        NOP
        ORA
        PHA PHP PLA PLP
        ROL ROR RTI RTS
        SBC SEC SED SEI STA STX STY
        TAX TAY TSX TXA TXS TYA

The standard 6510 instruction set. There are a number of sources describing the function and addressing modes of each.

Illegal instructions

Not yet implemented.

Pseudo operations

        PC = <address>

Set the current origin. The gap between the previous and this new origin will be filled with zeroes.

        VC = <address>
        VC = PC

Activate the virtual origin. All generated addresses, although physically placed at the true origin, will use values from the virtual origin. While in effect both the physical and virtual origin are updated. The second form above will deactivate the virtual origin.

        INCLUDE "name"

Include another assembly file.

[label] INCBIN "name"

Include another file literally in the output.

        ALIGN N

Align the current PC to an N byte boundary, where N is a power of 2. The gap will be filled with zeroes.

[label] SUBROUTINE

Not an actual subroutine, but a boundary between sets of local labels (which begin with a dot). Local label names are unique within segments of code bounded by SUBROUTINE.

[label] .byte exp,exp,exp ...

Declare byte data. If exp results in a value too large for a byte (>255), the least significant byte will be used.

[label] .word exp,exp,exp ...

Declare word data. Two bytes will always be output, and the default C64 byte ordering (LSB, MSB) is used. If exp results in a value too large for one word (>65535), the two least significant bytes will be used.

[label] .sprt %xxxxxxxxxxxxxxxxxxxxxxxx

Declare sprite data. X is either 0 or 1, and there must be 24 of them. It will be converted into three bytes of data, stored from left to right.

[label] .text "..."

Declare PETSCII text data.

[label] .ansi "..."

Declare ANSI ASCII text data.

[label] .screen "..."

Declare screen code text data.

symbol = exp

The expression is evaluated and the result is assigned to the symbol. This is a constant, assigning a new value to symbol is not allowed.

[label] XXX[.force] operand

XXX is some mnemonic. The .force optional extension is used to force specific addressing modes. Allowed extensions are