Documentation
¶
Index ¶
- Constants
- type Emulator
- func (emu *Emulator) Close() (err error)
- func (emu *Emulator) Code() cpu.Code
- func (emu *Emulator) Defines() iter.Seq2[string, string]
- func (emu *Emulator) Ip() int
- func (emu *Emulator) LineNo() int
- func (emu *Emulator) Power() int
- func (emu *Emulator) Reset(boot cpu.CodeChannel) (err error)
- func (emu *Emulator) Tick() (done bool, err error)
- func (emu *Emulator) Ticks() int
- type ErrRuntime
Constants ¶
View Source
const ( CAPP_TICK_COST = 1 // Cost of a single CAPP tick. ALU_TICK_COST = 4 // Cost of an ALU tick. CAPP_SIZE = 8192 // 4K for program text, 1K for compiled, 3K for work )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Emulator ¶
type Emulator struct {
Verbose bool // If set, enables verbose logging.
*cpu.Cpu // Reference to the CPU simulation.
Program *cpu.Program // Reference to the currently running program listing.
Temporary sio.Temporary // Temporary buffer IO channel.
Tape sio.Tape // Tape IO channel.
Depot sio.Depot // Depot (Drum and Ring) IO channel.
Rom sio.Rom // ROM IO channel.
TrapRequest chan uint32
}
Emulator state. CPU + CAPP + IO channels.
func (*Emulator) Reset ¶
func (emu *Emulator) Reset(boot cpu.CodeChannel) (err error)
Reset the assembler state
type ErrRuntime ¶
ErrRuntime indicates the location of a runtime error.
func (*ErrRuntime) Error ¶
func (err *ErrRuntime) Error() string
func (*ErrRuntime) Unwrap ¶
func (err *ErrRuntime) Unwrap() error
Click to show internal directories.
Click to hide internal directories.