Last active
October 9, 2016 01:08
-
-
Save toptensoftware/d29c91d62d17f51c4e57f39f09ea484b to your computer and use it in GitHub Desktop.
Handling int 80h thunk calls
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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