如何从以下计算中28h
减去(十进制 40)的值:rsp
option casemap:none
includelib kernel32.lib
includelib user32.lib
externdef MessageBoxA : near
externdef ExitProcess : near
.data
text db 'Hello world!', 0
caption db 'Hello x86-64', 0
.code
main proc
sub rsp, 28h ; space for 4 arguments + 16byte aligned stack
xor r9d, r9d ; 4. argument: r9d = uType = 0
lea r8, [caption] ; 3. argument: r8 = caption
lea rdx, [text] ; 2. argument: edx = window text
xor rcx, rcx ; 1. argument: rcx = hWnd = NULL
call MessageBoxA
xor ecx, ecx ; ecx = exit code
call ExitProcess
main endp
end
来自:http ://www.japheth.de/JWasm/Win64_1.html
据我了解,我只需要减去20h
,因为我使用的每个值都需要 8 个字节到 4 is 20h
。那么为什么28h
要减去,这如何导致 16 字节对齐?