Skip to content

Instantly share code, notes, and snippets.

@toptensoftware
Last active October 9, 2016 01:08
Show Gist options
  • Select an option

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

Select an option

Save toptensoftware/d29c91d62d17f51c4e57f39f09ea484b to your computer and use it in GitHub Desktop.
Handling int 80h thunk calls
public override void RaiseInterrupt(byte interruptNumber)
{
switch (interruptNumber)
{
case 0x21:
// DOS Call
if (_cpu.ah == 0x4C)
_stopCondition = true;
break;
case 0x80:
// Thunk calling...
if (_cpu.ax < _systemThunkHanders.Count)
{
var handler = _systemThunkHanders[_cpu.ax];
handler();
}
break;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment