我第一次尝试组装.. 我跳过了 helloworld 并决定直接潜入并做一个 CRC32Checksum :l
现在我很困惑哈哈。。
我的尝试:
format PE console ;Format PE OUT GUI 4.0
entry main
include 'macro/import32.inc'
section '.idata' import data readable ;Import Section.
library msvcrt,'msvcrt.dll'
import msvcrt, printf, 'printf',\
exit,'exit', getchar, 'getchar'
section '.data' data readable writeable ;Constants/Static Section.
InitialValue dd 0
section '.code' code readable executable
main:
jmp CRC32Checksum ;I want to change this to a call [CRC32Checksum]..
call [getchar]
mov eax, 0
ret 0
CRC32Checksum:
push ebx
mov ebp, esp
mov eax, InitialValue
NOT eax
pop ebx
ret
如何调用我的 CRC32Checksum?我什至走在正确的轨道上吗?如何在汇编中声明函数?