-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
fb04281
commit 3afc220
Showing
3 changed files
with
25 additions
and
1 deletion.
There are no files selected for viewing
This file contains 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
Binary file not shown.
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
; Construct binary using `nasm exchange_u32.asm` | ||
|
||
bits 32 | ||
|
||
exchange_u32: | ||
|
||
; Avoid any other CPU stuff overwriting stuff in this risky section | ||
cli | ||
|
||
; value | ||
mov eax, dword [esp+4] | ||
|
||
; address | ||
mov edx, dword [esp+8] | ||
|
||
xchg dword [EDX],EAX | ||
|
||
sti | ||
|
||
ret 0x8 |