News:

MASM32 SDK Description, downloads and other helpful links
MASM32.com New Forum Link
masmforum WebSite

How to read from linear address?

Started by bluescreen, September 01, 2005, 10:22:38 PM

Previous topic - Next topic

bluescreen

Hi, i have a linear memory address. How do i read a value from it?

if i do:

mov eax, linearaddress
mov ecx, [eax]

to get value from linearaddress to ecx, i get a PAGE_FAULT_IN_NONPAGED_AREA


sry for this noob question   ::)

PBrennick

bluescreen,

You need to use:

mov eax, offset linearaddress

Paul
The GeneSys Project is available from:
The Repository or My crappy website

gabor

Hi!

I cannot decide what is the exact addressing you want to use.

1. the linear address is a calcuated address, like [esi+ebx*4+6] then your code was syntactically correct.

2. the linear address is a reference to an address, like a label, a proc name. Then PBrennick is right, you need to add offset or you can use the 'lea' instruction.

BTW: when I have memory memory access error, I mainly get protection fault read or write from or to the memory is not permitted, but i've never received page fault. That's strange!

Greets, Gábor


Tedd

..unless you're expecting to be able to just access any area of memory (like in DOS) which you're not allowed to do :naughty:
You can only access memory that is 'yours' :P
No snowflake in an avalanche feels responsible.

Opcode

Hi,

The bugcheck PAGE_FAULT_IN_NONPAGED_AREA appears when your are
programming a device driver in Windows NT platform.

Search in the MS DDK to know more about it and read this
excellent article at OSROnline:
http://www.osronline.com/article.cfm?id=335

Regards,
Opc0de

ToutEnMasm

Ho,Ho
  :boohoo:
You ask something without saying what API return this adress,several kind of adress are returned by the api.It is not sure that you can qualified it very well.
The intel Books are of good advise on this.
Some API can translate adresses.
The question is , what sort of adress have You ?
                                          ToutEnMasm