Struct intel8080::CPU[][src]

pub struct CPU {
    pub registers: Registers,
    pub flags: Flags,
    pub pc: u16,
    pub sp: u16,
    pub bus: AddressBus,
    pub halt: bool,
    pub int: (bool, u8),
    pub inte: bool,
    pub debug: bool,
}

Fields

registers: Registersflags: Flagspc: u16sp: u16bus: AddressBushalt: boolint: (bool, u8)

Interrupt request : true / false, instruction to execute (normally a RST command)

inte: bool

Interrupt enable bit

debug: bool

Displays CPU state on stdout after each execute()

opcode : 0x3e	disassembly : MVI A,$0f
PC : 0x0003	SP : 0xff00	S : 0	Z : 0	A : 0	P : 0	C : 0
B : 0x00	C : 0x00	D : 0x00	E : 0x00	H : 0x00	L : 0x00	A : 0x0f	(SP) : 0x0000

Implementations

Disassembles code at (address)

Creates a new CPU instance and its 16 bits address bus.

Fetches and executes one instruction from (pc). Returns the number of consumed clock cycles.

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Performs the conversion.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.