Main Page   Data Structures   File List   Data Fields   Globals   Related Pages  

cpu.h File Reference


Detailed Description

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.

RegsGetRegs ()
void SetRegs (Regs r)

Variables

unsigned char(* memgetb )(UINT adr)
void(* memsetb )(UINT adr, unsigned char byte)


Function Documentation

UINT InstrStep  
 

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

Returns :
Number of cycles consumed
Todo:
Add undocumented instructions

Definition at line 706 of file cpu.c.

void Irq  
 

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.

Definition at line 1379 of file cpu.c.

void Nmi  
 

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.

Definition at line 1398 of file cpu.c.

void Reset  
 

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.

Definition at line 1362 of file cpu.c.


Generated on Fri Sep 6 18:32:15 2002 for Emu6502 by doxygen1.2.17