Skip to content

Instantly share code, notes, and snippets.

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

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

Select an option

Save toptensoftware/acf258c412edda3780e76e4acdaa172d to your computer and use it in GitHub Desktop.
Module Class Heirarchy
// Base functionality common to all modules
abstract class ModuleBase
{
}
// Module loaded from 16-bit .exe or .dll
class Module16 : ModuleBase
{
}
// C# emulation of a well known system module
class Module32 : ModuleBase
{
}
// Kernel, User, GDI and others implemented like this...
class Kernel : Module32
{
}
// Machine class represents the entire Win3mu environment
class Machine()
{
public Machine()
{
// Register the standard modules with the module manager
_moduleManager.Register(new Kernel());
_moduleManager.Register(new User());
_moduleManager.Register(new GDI());
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment