[ROOT] --> Emulator
Environment for the I8080 CPU emulator.
This class implements all input/output functions for the I8080 emulator class, that is it provides functions to access the system RAM, ROM and I/O ports.
An object (instance) of this class corresponds to a system that has no RAM, ROM or ports: users of the I8080 emulator should provide the desired behaviour by writing a descendant of this class that overrides the required functions.
public I8080Environment ( ) ;
Constructor.
The object created by this base class corresponds to a system with no RAM, ROM or ports.
public virtual ~ I8080Environment ( ) ;
Destructor.
public virtual unsigned char readByte ( unsigned addr ) ;
Reads one byte from memory at the specified address.
The address parameter may contain any value, including values greater than 0xFFFF (64k), so if necessary the implementation must check for illegal values and handle them according to the implemented system specifications.
addr | address of memory byte to read |
public virtual unsigned readWord ( unsigned addr ) ;
Reads a 16 bit word from memory at the specified address.
The address parameter may contain any value, including values greater than 0xFFFF (64k), so if necessary the implementation must check for illegal values and handle them according to the implemented system specifications.
The default implementation uses readByte(), so it is not strictly necessary to override this method.
public virtual void writeByte ( unsigned addr , unsigned char value ) ;
Writes one byte to memory at the specified address.
The address parameter may contain any value, including values greater than 0xFFFF (64k), so if necessary the implementation must check for illegal values and handle them according to the implemented system specifications.
addr | address of memory byte to write |
value | value to write at specified address |
public virtual void writeWord ( unsigned addr , unsigned value ) ;
Writes a 16 bit word to memory at the specified address.
The address parameter may contain any value, including values greater than 0xFFFF (64k), so if necessary the implementation must check for illegal values and handle them according to the specifications of the emulated system.
The default implementation uses writeByte(), so it is not strictly necessary to override this method.
Note: the low order byte is placed at the lowest address.
addr | address of memory word to write |
value | 16-bit value to write at specified address |
public virtual unsigned char readPort ( unsigned port ) ;
Reads one byte from the specified port.
Note: the port value is always between 00h and FFh included.
port | address of port to read |
public virtual void writePort ( unsigned port , unsigned char value ) ;
Writes one byte from the specified port.
Note: the port value is always between 00h and FFh included.
port | address of port to write |
value | value to write to specified port |
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.