Processor Class

Definition

Line 27 of cmsxm/Processor.cm

Constructors & Destructor

public nothrow Processor(Machine& machine_)

Member Functions

private void Boot()
private nothrow void CheckInterrupts(Instruction*& inst, byte& x, byte& y, byte& z)
private inline nothrow void CheckInterrupts(ulong bits, int first, int last)
public void ClearBreak()
private void DoExit()
private void DoRun()
private void DoRunDebug()
public void Exit()
private nothrow Instruction* FetchInstruction(ulong& pc, Memory& mem, byte& x, byte& y, byte& z)
public nothrow Registers& GetRegisters()
private void HandleInterrupt(byte irq, ulong handlerPtrAddress)
private nothrow void IncrementCycleCounter()
private void MakeInstruction(uint inst, Instruction*& instruction, byte& x, byte& y, byte& z)
public void Run()
public nothrow ulong SaveContext(ulong virtualTranslationRegisterValue, ulong sp, ulong* regAXAddress, ulong* regBXAddress, ulong* regCXAddress)
public void SetBreak(ulong breakAddr, uint breakInst)
public nothrow void SetInterruptReturn(InterruptReturnDelegate interruptReturn_)
private nothrow void SetPC(Instruction* inst, ulong& newPC, ulong prevPC)
public nothrow ulong UnsaveContext(ulong virtualTranslationRegisterValue, ulong sp)
private nothrow void WriteInstruction(ulong addr, uint inst, Memory& mem)

Member Variables

private ulong breakAddr
private uint breakInst
private bool exiting
private bool interruptOccurred
private InterruptReturnDelegate interruptReturn
private Machine& machine
private Registers regs

Constructor& Destructor Details

Processor Constructor

public nothrow Processor(Machine& machine_)

Definition
Line 29 of cmsxm/Processor.cm


Member Function Details

Boot Member Function

private void Boot()

Definition
Line 236 of cmsxm/Processor.cm


CheckInterrupts Member Function

private nothrow void CheckInterrupts(Instruction*& inst, byte& x, byte& y, byte& z)

Definition
Line 329 of cmsxm/Processor.cm


CheckInterrupts Member Function

private inline nothrow void CheckInterrupts(ulong bits, int first, int last)

Definition
Line 357 of cmsxm/Processor.cm


ClearBreak Member Function

public void ClearBreak()

Definition
Line 418 of cmsxm/Processor.cm


DoExit Member Function

private void DoExit()

Definition
Line 272 of cmsxm/Processor.cm


DoRun Member Function

private void DoRun()

Definition
Line 188 of cmsxm/Processor.cm


DoRunDebug Member Function

private void DoRunDebug()

Definition
Line 207 of cmsxm/Processor.cm


Exit Member Function

public void Exit()

Definition
Line 49 of cmsxm/Processor.cm


FetchInstruction Member Function

private nothrow Instruction* FetchInstruction(ulong& pc, Memory& mem, byte& x, byte& y, byte& z)

Definition
Line 279 of cmsxm/Processor.cm


GetRegisters Member Function

public nothrow Registers& GetRegisters()

Definition
Line 32 of cmsxm/Processor.cm


HandleInterrupt Member Function

private void HandleInterrupt(byte irq, ulong handlerPtrAddress)

Definition
Line 370 of cmsxm/Processor.cm


IncrementCycleCounter Member Function

private nothrow void IncrementCycleCounter()

Definition
Line 296 of cmsxm/Processor.cm


MakeInstruction Member Function

private void MakeInstruction(uint inst, Instruction*& instruction, byte& x, byte& y, byte& z)

Definition
Line 405 of cmsxm/Processor.cm


Run Member Function

public void Run()

Definition
Line 36 of cmsxm/Processor.cm


SaveContext Member Function

public nothrow ulong SaveContext(ulong virtualTranslationRegisterValue, ulong sp, ulong* regAXAddress, ulong* regBXAddress, ulong* regCXAddress)

Definition
Line 57 of cmsxm/Processor.cm


SetBreak Member Function

public void SetBreak(ulong breakAddr, uint breakInst)

Definition
Line 413 of cmsxm/Processor.cm


SetInterruptReturn Member Function

public nothrow void SetInterruptReturn(InterruptReturnDelegate interruptReturn_)

Definition
Line 53 of cmsxm/Processor.cm


SetPC Member Function

private nothrow void SetPC(Instruction* inst, ulong& newPC, ulong prevPC)

Definition
Line 302 of cmsxm/Processor.cm


UnsaveContext Member Function

public nothrow ulong UnsaveContext(ulong virtualTranslationRegisterValue, ulong sp)

Definition
Line 133 of cmsxm/Processor.cm


WriteInstruction Member Function

private nothrow void WriteInstruction(ulong addr, uint inst, Memory& mem)

Definition
Line 292 of cmsxm/Processor.cm