Last active
June 1, 2024 13:22
-
-
Save un4ckn0wl3z/bbd9add2dddb0497178c727fbb671be8 to your computer and use it in GitHub Desktop.
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
; MessageBoxA_Masm.asm by un4ckn0wl3z | |
.code | |
COMMENT @ | |
int MessageBoxA( | |
[in, optional] HWND hWnd, | |
[in, optional] LPCSTR lpText, | |
[in, optional] LPCSTR lpCaption, | |
[in] UINT uType | |
); | |
@ | |
externdef MessageBoxA:proc | |
main proc | |
xor rcx, rcx ; HWND hWnd | |
mov rdx, offset msg ; LPCSTR lpText | |
mov r8, offset caption ; LPCSTR lpCaption | |
mov r9, 4h ; UINT uType | |
sub rsp, 40 ; preserve shadow spill | |
call MessageBoxA ; call MessageBoxA | |
add rsp, 40 ; restore shadow spill | |
ret ; return to caller | |
main endp | |
.data | |
caption db "Hello Assembly", 0 | |
msg db "This is a cool app!", 0 | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment