Skip to content

Instantly share code, notes, and snippets.

@toptensoftware
Last active October 16, 2016 00:39
Show Gist options
  • Select an option

  • Save toptensoftware/a6a1545100d9f60d28b2b575b202cb1b to your computer and use it in GitHub Desktop.

Select an option

Save toptensoftware/a6a1545100d9f60d28b2b575b202cb1b to your computer and use it in GitHub Desktop.
Machine framework
class Machine : CPU, IBus
{
// Main entry point
public int RunProgram(string programName, string commandTail, int nCmdShow);
// Services
public ModuleManager ModuleManager { get; }
public VariableResolver VariableResolver { get; }
public PathMapper PathMapper { get; }
public DosApi Dos { get; }
public GlobalHeap GlobalHeap { get; }
public LocalHeap SystemDataHeap { get; }
public StringHeap StringHeap { get; }
public Dictionary<string, string> Environment { get; }
public Messaging Messaging { get; }
// Emulated modules
public Kernel Kernel { get; }
public User User { get; }
public GDI GDI { get; }
// Thunking
public void CallVM(uint lpfnProc);
public uint CreateSystemThunk(Action handler, ushort popStack, bool preserveAX);
// Interrupt handling
public override void RaiseInterrupt(byte interruptNumber) { };
// IBus implementation delegates to globalHeap
// Also properties for most things in the config file
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment