Documentation
¶
Index ¶
- Constants
- type BadOpError
- type BadTrapError
- type VM
- func (vm *VM) KbdLoop()
- func (vm *VM) LoadImageFromFile(fname string)
- func (m VM) MemRead(addr word) word
- func (m VM) MemWrite(addr, val word)
- func (r VM) R(i word) word
- func (vm *VM) Run() error
- func (r VM) Set(instr word, fn func(word, word) word)
- func (r VM) SetR(i, data word)
- func (vm *VM) Stop()
- func (r VM) Val0(instr word) word
- func (r VM) Val1(instr word) word
- func (r VM) Val2(instr word) word
- func (vm *VM) WriteString(s string)
Constants ¶
View Source
const ( MaxWord = 1<<16 - 1 MemMax = MaxWord + 1 )
View Source
const ( BR word = iota ADD LD ST JSR AND LDR STR NOT LDI STI JMP LEA TRAP )
View Source
const ( POS word = 1 << iota ZERO NEG )
View Source
const ( TrapGetc word = iota + 0x20 TrapOut TrapPuts TrapIn TrapPutsp TrapHalt )
View Source
const ( KbdStatus word = 0xFE00 KbdData word = 0xFE02 )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type BadTrapError ¶
type BadTrapError word
func (BadTrapError) Error ¶
func (e BadTrapError) Error() string
Click to show internal directories.
Click to hide internal directories.