2
32ビットレジスタ[esi]のメモリアドレスを8ビットALレジスタに移動できますか?それがどのように機能するのか説明できますか?ここで1〜6のforループを介して、番号の配列を表示する私のコードは次のとおり32ビットレジスタ[esi]のメモリアドレスをアセンブリ言語の8ビットローレジスタに移動する
TITLE printing (printarray.asm) (special.asm)
;This
;Last updated 92.15.2016 Written by dr scheiman
INCLUDE Irvine32.inc
.data
arrayb byte 1,2,3,4,5,6
l dword lengthof arrayb
space byte " ",0
x dword 3
.code
main PROC
mov edx,offset space
mov eax,0 ; clear ecx of garbage
mov ecx, l ; loop counter
mov esi,offset arrayb ; start of the array's memory
myloop:
mov al,[esi] ;how do you move the memory address of a 32 bit into an 8 bit register?
call writedec
call writestring
inc esi
loop myloop
call crlf
exit
main ENDP
end main
このコードは、アドレスがESIレジスタの値であるメモリ位置からバイトをロードします。ポインタは32ビットですが、ポインタが指すデータは異なります。 – icecreamsword
ありがとうございます。私はあなたに信用を与えることができるように大きな応答ボックスにそれを置くことができますか? –
これはほぼhttp://stackoverflow.com/questions/25129743/confusing-brackets-in-masm32の複製ですが、それは、MASMがオペランドサイズをどのように推定するかについて、 '[register]'。 –