[ROOT] --> Emulator

class I8080

I8080 CPU emulator.

Author:
Alessandro Scotti

Source:
i8080.h:155

Constructors Index

I8080
[public] Costructor.
I8080
[public] Copy constructor.
~I8080
[public] Destructor.


Enums Index

Flags
[public] CPU flags.


Variables Index

A
[public] 8-bit accumulator register A.
B
[public] 8-bit register B.
C
[public] 8-bit register C.
D
[public] 8-bit register D.
E
[public] 8-bit register E.
F
[public] 8-bit flag register F.
H
[public] 8-bit register H.
L
[public] 8-bit register L.
PC
[public] 16-bit program counter.
SP
[public] 16-bit stack pointer.


Methods Index

AF
[public] Returns the 16-bit pseudo-register AF.
BC
[public] Returns the 16-bit pseudo-register BC.
DE
[public] Returns the 16-bit pseudo-register DE.
getCycles
[public] Returns the number of CPU cycles elapsed from the last reset.
HL
[public] Returns the 16-bit pseudo-register HL.
interrupt
[public] Informs the CPU that an interrupt has occurred.
operator =
[public] Assignment operator. Note that the environment is not copied.
reset
[public] Resets the CPU to its initial state.
setCycles
[public] Sets the CPU cycle counter to the specified value.
step
[public] Executes one CPU instruction.


Constructors

I8080

public I8080 ( I8080Environment & env ) ;

Costructor.

Creates an I8080 emulator associated to the specified environment. The environment provides functions to access memory and ports, that is it interfaces the emulated CPU with the other (emulated) hardware components.

See Also:
I8080Environment

I8080

public I8080 ( const I8080 & cpu ) ;

Copy constructor.

I8080

public virtual ~ I8080 ( ) ;

Destructor.


Enums

Flags

public enum Flags { Carry = 0x01, ,
                    AddSub = 0x02, ,
                    Subtraction = AddSub ,
                    Parity = 0x04, ,
                    Overflow = Parity ,
                    Flag3 = 0x08, ,
                    HalfCarry = 0x10, ,
                    AuxCarry = HalfCarry ,
                    Flag5 = 0x20, ,
                    Interrupt = Flag5 ,
                    Zero = 0x40, ,
                    Sign = 0x80
 } ;

CPU flags.


Variables

B

public unsigned char B

8-bit register B.

C

public unsigned char C

8-bit register C.

D

public unsigned char D

8-bit register D.

E

public unsigned char E

8-bit register E.

H

public unsigned char H

8-bit register H.

L

public unsigned char L

8-bit register L.

A

public unsigned char A

8-bit accumulator register A.

F

public unsigned char F

8-bit flag register F.

PC

public unsigned PC

16-bit program counter.

SP

public unsigned SP

16-bit stack pointer.


Methods

reset

public virtual void reset ( ) ;

Resets the CPU to its initial state.

step

public virtual void step ( ) ;

Executes one CPU instruction.

interrupt

public virtual void interrupt ( unsigned address ) ;

Informs the CPU that an interrupt has occurred.

Parameters:
address 16-bit address of the interrupt handler

AF

public unsigned AF ( ) const ;

Returns the 16-bit pseudo-register AF.

BC

public unsigned BC ( ) const ;

Returns the 16-bit pseudo-register BC.

DE

public unsigned DE ( ) const ;

Returns the 16-bit pseudo-register DE.

HL

public unsigned HL ( ) const ;

Returns the 16-bit pseudo-register HL.

getCycles

public unsigned getCycles ( ) const ;

Returns the number of CPU cycles elapsed from the last reset.

setCycles

public void setCycles ( unsigned value ) ;

Sets the CPU cycle counter to the specified value.

operator =

public I8080 & operator = ( const I8080 & ) ;

Assignment operator. Note that the environment is not copied.


This documentation was generated automatically by the ccdoc tool (version 0.7a).
Click here to submit a bug report or feature request.

Click here to return to the top of the page.