私は組み立ての初心者で、すべての 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