康熙字典十画的字:汇编:源码如下,关于数据偏移错误的疑问

来源:百度文库 编辑:杭州交通信息网 时间:2024/05/10 14:11:11
;汇编源码如下,数据段的偏移地址不对,编译后的
;msg的偏移地址是0000,但我查看内存后发现,msg
;的偏移地址不是0000,而是往后了很多,为什么?
;这个程序没有什么意义,只是试验
.model small,stdcall
.stack 1000
trytry proto,two:ptr byte
.data
msg byte 'abcdefg'
.code
main proc far
invoke trytry,addr msg
ret
main endp
trytry proc,two:ptr byte
mov si,two
mov cx,[si]
ret
trytry endp
end main
程序运行后,cx并不是a,而是0004

对啊,传过去的是地址

算了吧,你个问题没说情书

addr msg传过去的是地址吧?