Last active
October 8, 2016 23:56
-
-
Save toptensoftware/aa2126be466262e22ba573604159c127 to your computer and use it in GitHub Desktop.
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
| uint _sysRetThunk; | |
| void CreateSysRetThunk() | |
| { | |
| // Store address | |
| _sysRetThunk = (uint)(_systemCodeSelector << 16 | _systemCodeGenPos); | |
| // Get memory buffer | |
| byte[] mem = _globalHeap.GetBuffer(_systemCodeSelector); | |
| // INT 81h | |
| mem[_systemCodeGenPos++] = 0xCD; | |
| mem[_systemCodeGenPos++] = 0x81; | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment