Header file for cpu.c
Definition in file cpu.h.
Go to the source code of this file.
Data Structures | |
struct | Regs |
Registers. More... | |
Typedefs | |
typedef unsigned int | UINT |
Functions | |
void | Reset () |
Reset interrupt. | |
void | Irq () |
IRQ interrupt. | |
void | Nmi () |
NMI interrupt. | |
UINT | InstrStep () |
Executes one instruction on adress stored in regs.PC. | |
Regs * | GetRegs () |
void | SetRegs (Regs r) |
Variables | |
unsigned char(* | memgetb )(UINT adr) |
void(* | memsetb )(UINT adr, unsigned char byte) |
|
Executes one instruction on adress stored in regs.PC.
Executes one instruction on adress stored in regs.PC; increments (or changes in case of jump) program counter
|
|
IRQ interrupt.
Adds actual position and the P register (flags) to the top of the stack, sets the I (interrupt) flag to 1 and jumps to the IRQVKT, reset initialization routine. |
|
NMI interrupt.
Adds actual position and the P register (flags) to the top of the stack, sets the I (interrupt) flag to 1 and jumps to the NMIVKT, reset initialization routine. |
|
Reset interrupt.
Zeroes A, X, Y registers, resets stack pointer S, initializes P register (zeroes all flags except I, which is set to 1) and jumps to the RESETVKT, reset initialization routine. |