Simulation

package
v0.0.0-...-7e99419 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 26, 2025 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

View Source
const RESET_CS uint16 = 0xFFFF

Variables

View Source
var AF byte
View Source
var CF byte
View Source
var DF byte
View Source
var IF byte
View Source
var Memory = [0xFFFFFF]byte{}
View Source
var OF byte
View Source
var PF byte
View Source
var SF byte
View Source
var TF byte
View Source
var ZF byte

Functions

func LoadProgram

func LoadProgram(data []byte, isIncomplete bool) error

func Rest

func Rest()

func Simulate

func Simulate(logger *log.Logger) error

Simulate reads instruction stream and simulates execution Possible errors:

  • invalid instruction
  • invalid parameters
  • instruction stream stops before complete decoding of instruction

Types

type DecodingError

type DecodingError struct {
	Message string
	Pos     int
}

func (*DecodingError) Error

func (e *DecodingError) Error() string

type MemoryWriteError

type MemoryWriteError string

func (MemoryWriteError) Error

func (e MemoryWriteError) Error() string

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL