Created
October 15, 2016 23:40
-
-
Save toptensoftware/7c7152844183b893925a1e8988067a55 to your computer and use it in GitHub Desktop.
Capturing CPU instruction behaviour
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
| ushort adc16(ushort inFlags, ushort a, ushort b, ushort* outFlags) | |
| { | |
| __asm | |
| { | |
| push word ptr[inFlags] | |
| popf | |
| mov ax, word ptr[a] | |
| adc ax, word ptr[b] | |
| pushf | |
| mov esi, dword ptr[outFlags] | |
| pop word ptr[esi] | |
| } | |
| } | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment