Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AddressMode ¶
type AddressMode int
AddressMode represents different 6502 addressing modes
const ( Implicit AddressMode = iota Accumulator Immediate ZeroPage ZeroPageX ZeroPageY Absolute AbsoluteX AbsoluteY Indirect IndirectX IndirectY Relative )
type Assembler ¶
type Assembler struct {
// contains filtered or unexported fields
}
Assembler holds the state of our assembler
func NewAssembler ¶
func NewAssembler() *Assembler
NewAssembler creates a new instance of our assembler
type DirectiveHandler ¶
DirectiveHandler defines a function type for directive processing
type Instruction ¶
type Instruction struct { Opcode byte Size int Cycles int AddressMode AddressMode }
Instruction represents a 6502 assembly instruction
type InstructionEntry ¶
type InstructionEntry struct { BaseOpcode byte Modes map[AddressMode]Instruction }
InstructionEntry represents an entry in our instruction lookup table
type Lexer ¶
type Lexer struct {
// contains filtered or unexported fields
}
Lexer breaks source code into tokens
type Line ¶
type Line struct { Label string Instruction string Directive string Operand string AddressMode AddressMode Value uint16 IsRelative bool SymbolName string }
Line represents a parsed assembly line
type Parser ¶
type Parser struct {
// contains filtered or unexported fields
}
Parser represents the assembly parser
Click to show internal directories.
Click to hide internal directories.