开发者

Retrieving Memory Offset Address Using Assembly

I'm trying to retrieve the offset address开发者_如何学运维 of a memory variable

this is wat i did

Mov CX, OFFSET data

but the offset data gave its 0000, may i ask why?


It is correct.. 0000 refers to the offset from the beginning of the data segment. So the offset is ds:0000 (this is the logical address). To get the physical address you have to multiply by 16 the segment (ds) then add the offset (0000 in this case) if I remember correctly. Have a look here for more info about the logical addresses and here for the physical addresses.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜