我是汇编的初学者,我不知道所有db,dw,dd的含义是什么。我试图编写一个执行1 + 1的小脚本,将其存储在变量中,然后显示结果。到目前为止,这是我的代码:
.386
.model flat, stdcall
option casemap :none
include \masm32\include\windows.inc
include \masm32\include\kernel32.inc
include \masm32\include\masm32.inc
includelib \masm32\lib\kernel32.lib
includelib \masm32\lib\masm32.lib
.data
num db ? ; set variable . Here is where I don't know what data type to use.
.code
start:
mov eax, 1 ; add 1 to eax register
mov ebx, 1 ; add 1 to ebx register
add eax, ebx ; add registers eax and ebx
push eax ; push eax into the stack
pop num ; pop eax into the variable num (when I tried it, it gave me an error, i think thats because of the data type)
invoke StdOut, addr num ; display num on the console.
invoke ExitProcess ; exit
end start
我需要了解db,dw,dd的含义,以及它们如何影响变量设置和组合以及类似的事情。
在此先感谢,Progrmr