How to read / write arbitrary memory dump? I need to read/write data from/to an arbitrary memory dump. I suppose I should change the data segment. This works in MS-DOS: ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; mov ax,0FFC0h ;the needed data segment mov ds,ax ;*** memory fault for MASM32 (DOS O.K.) mov ax,4000h ;out to screen mov bx,1 ;out to screen mov cx,1 ;one byte mov dx,000Eh ;the needed offset int 21h ;reads the address FFC0:000Eh ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; But in MASM32 it generates memory fault *** (I do not use int 21h in MASM32 of course) Could anyone advise, please, how to change Data Segment and OFFSET in MASM32 to read/write data from/to any memory space? Thanks
Posted on 2001-05-02 08:58:00 by Ol
It doesn't work that way in Windows. You don't deal with physical memory directly anymore: you work with linear memory. Furthermore, under Windows, each segment is 4 GB in size so there is no need to change the value in segment registers. In summary, you don't know enough about how Windows works. If I were to explain how to read/write arbitrary memory addresses to you, it amounts to teaching you all about how Intel CPU works in protected mode and how Windows manages memory.
Posted on 2001-05-02 09:21:00 by Iczelion