Reading Memory

Reading Memory

Post by ] » Sun, 09 Dec 2001 01:42:20



How do read memory address in FFFF:0000 ?

i'm trying this code, but is returning error:

#include <stdio.h>
#include <stdlib.h>

unsigned long pega_b(void)
{
__asm__
("
  push %ebp
  push %esi

  movl 0xffff0000, %esi
  movl (%esi), %eax

  pop %esi
  pop %ebp
");

Quote:}

main()
{
  printf("Valor do Endereco: FFFF:0000 \n");
  printf("VALOR2: 0x%x \n",pega_b());
Quote:}

 
 
 

Reading Memory

Post by Eric P. McC » Sun, 09 Dec 2001 02:48:40



> How do read memory address in FFFF:0000 ?

IA32 CPUs have a 32-bit (or possibly 36-bit) address space.  You need
to read up on how 32-bit protected mode operating systems access
memory, then think about and ask your question again.

You might be better served by asking a more general question, like
"How do I read from the BIOS's memory?"

--

"I woke up this morning and realized what the game needed: pirates,
pimps, and gay furries."  - Rich "Lowtax" Kyanka

 
 
 

Reading Memory

Post by Victor Wagn » Mon, 10 Dec 2001 16:15:47


 : How do read memory address in FFFF:0000 ?

No way. No such addresssing scheme in Linux.

You probably mean "memory corresponding to segment 0xffff offset 0 in
real mode"?

If so, it is 0xffff0 in physical address space.

I'll read it using

memfd = open("/dev/mem",O_READ);
lseek(memfd,0xffff0,0)
read(memfd,buffer,size)

Your code would obvoisly fail becouse it tries to read
0xffff0000 instead of 0x000ffff0, and not from physical memory,
but from virtual address space of your program.

--
Netscape is not a newsreader, and probably never shall be.
        -- Tom Christiansen

 
 
 

1. Reading Memory frmo fff0000

How do read memory address in FFFF:0000 ?

i'm trying this code, but is returning error:

#include <stdio.h>
#include <stdlib.h>

unsigned long pega_b(void)
{
__asm__
("
  push %ebp
  push %esi

  movl 0xffff0000, %esi
  movl (%esi), %eax

  pop %esi
  pop %ebp
");

main()
{
  printf("Valor do Endereco: FFFF:0000 \n");
  printf("VALOR2: 0x%x \n",pega_b());

2. Speaker on Sparc Station 10

3. Read Memory SPD eeprom?

4. Question: Asus P2-DS SCSI

5. Reading memory maps for /proc/XXXXX

6. Booting from CD

7. reading memory for lpt port

8. How to monitor usage

9. Read memory from pci device

10. ??Question about sparc solaris commands to mount, read/write to usb memory jumpdrives/ USB memory stick

11. LILO answers HERE read read read

12. reading large files into the memory

13. Read and Write directly in memory of the PC