C# Class DCPU16_ASM.Emulator.CDCPU16

DCPU-16 Computer class
Afficher le fichier Open project: densitynz/DCPU-16-ASM.NET Class Usage Examples

Méthodes publiques

Méthode Description
CDCPU16 ( ) : System

Constructor

CDCPU16 ( List &_machineCode ) : System

Constructor

ClearMemoryBuffers ( ) : void

Clears Video/Keyboard (and more to come) buffers

DebugShowRegisters ( ) : void

Write contents of Registers to Console.

ExecuteInstruction ( ) : void

Execute a DCPU-16 Instruction

InitCPU ( ) : void

Initialize DCPU-16 CPU. Allocates required memory space for RAM and General purpose Registers

ResetCPURegisters ( ) : void

Resets DCPU-16's Registers. NOTE: we do Video/Keyboard buffer clearing as well. Will shift soon :)

SetProgram ( List &_machineCode ) : void

Sets DPU-16 up with a program to execute

Private Methods

Méthode Description
ReadNextWord ( ) : ushort

Read next Word from DCPU-16's ram @ the program counter's Location.

ReadParamValue ( ushort _opParam ) : readParamValue

Read OpCode Parameter value. BBBBBB AAAAAA 0000 Will decode either A or B (based on what is given in _opParam) and populate data into a readParamValue struct. The PC register is automatically incremented based on what needs to be read.

SetResultValue ( readParamValue _resultValue ) : void

Stores Read param values back into RAM or Registers. This is normally called after resolving a OpCode instruction in ExecuteInstruction().

Method Details

CDCPU16() public méthode

Constructor
public CDCPU16 ( ) : System
Résultat System

CDCPU16() public méthode

Constructor
public CDCPU16 ( List &_machineCode ) : System
_machineCode List list array containing DCPU-16 Program
Résultat System

ClearMemoryBuffers() public méthode

Clears Video/Keyboard (and more to come) buffers
public ClearMemoryBuffers ( ) : void
Résultat void

DebugShowRegisters() public méthode

Write contents of Registers to Console.
public DebugShowRegisters ( ) : void
Résultat void

ExecuteInstruction() public méthode

Execute a DCPU-16 Instruction
public ExecuteInstruction ( ) : void
Résultat void

InitCPU() public méthode

Initialize DCPU-16 CPU. Allocates required memory space for RAM and General purpose Registers
public InitCPU ( ) : void
Résultat void

ResetCPURegisters() public méthode

Resets DCPU-16's Registers. NOTE: we do Video/Keyboard buffer clearing as well. Will shift soon :)
public ResetCPURegisters ( ) : void
Résultat void

SetProgram() public méthode

Sets DPU-16 up with a program to execute
public SetProgram ( List &_machineCode ) : void
_machineCode List list array containing DCPU-16 Program
Résultat void