Documentation ¶
Index ¶
- Constants
- Variables
- func ReduceBytes(value any, noOfBytes int) any
- func ToLittleEndianBytes[T constraints.Integer](value T) ([]byte, error)
- func ValuesToLittleEndianBytes(operandValues []any) ([]byte, error)
- type AddressingMode
- type AssembledData
- type Assembler
- type AssemblerTokens
- type Instruction
- type ParsedInstruction
Constants ¶
View Source
const ( AsterixSymbolToken lexer.TokenIdentifier = lexer.LastStdLiteral + iota EqualsSymbolToken LeftParenthesis RightParenthesis CommaToken PeriodToken LabelToken IdentifierToken HashToken MnemonicToken MinusToken PlusToken DivideSymbolToken SemiColonToken )
Variables ¶
View Source
var KeywordTokens = map[string]lexer.TokenIdentifier{}
KeywordTokens defines keyword to token mappings
View Source
var OperatorTokens = map[string]lexer.TokenIdentifier{}
View Source
var SymbolTokens = map[rune]lexer.TokenIdentifier{ '*': AsterixSymbolToken, '=': EqualsSymbolToken, '(': LeftParenthesis, ')': RightParenthesis, ',': CommaToken, '.': PeriodToken, '#': HashToken, '-': MinusToken, '+': PlusToken, '/': DivideSymbolToken, ';': SemiColonToken, }
SymbolTokens defines single delimeter runes to token mappings
Functions ¶
func ReduceBytes ¶
func ToLittleEndianBytes ¶
func ToLittleEndianBytes[T constraints.Integer](value T) ([]byte, error)
Types ¶
type AddressingMode ¶
type AddressingMode struct { AddressingMode cpu.AddressingModeType Identifier string Operands []byte }
type AssembledData ¶
type AssemblerTokens ¶
type AssemblerTokens struct {
// contains filtered or unexported fields
}
func NewAssemblerTokens ¶
func NewAssemblerTokens(tokens []*lexer.Token) *AssemblerTokens
func (*AssemblerTokens) Next ¶
func (at *AssemblerTokens) Next() *lexer.Token
func (*AssemblerTokens) Peek ¶
func (at *AssemblerTokens) Peek() *lexer.Token
type Instruction ¶
type ParsedInstruction ¶
type ParsedInstruction struct {
// contains filtered or unexported fields
}
Click to show internal directories.
Click to hide internal directories.