accessing physical memory

From: Edward Mccreary <edm_at_nospam.org>
Date: Mon Oct 03 1994 - 07:32:37 PDT

Ok, this is probably a *really* stupid mistake....

I'm trying to do some stuff in graphics mode but can't seem to get access
to the frame buffer. What I'm doing is...

ulong addr;
unsigned char *frame;

/*
 * code to get io perms and set video mode, this works ok
 * also sets banks to first page of video memory
 */

 addr = 0xA0000;
 frame = mmap((void *)addr, 32*1024L, PROT_READ | PROT_WRITE,
    MAP_PHYS, 0, 0L);

mmap is returning a non-NULL pointer but when I do this...

/* fill first line of display to white */
int i;
unsigned char *ptr = frame;

i = 1024;

while(i--)
 *ptr++ = 0xFF;

nothing happens.

Any ideas? I get the feeling it's something obvious I'm just not
getting.

eddie

-- 
Eddie McCreary                                       edm@twisto.compaq.com
Graphics Development                    "Do or do not, there is no 'try'."
  In the event of my capture, Compaq will disavow any and all knowledge 
          of my operations.  Of course I don't speak for them.
Received on Mon Oct 3 06:27:36 1994

This archive was generated by hypermail 2.1.8 : Thu Sep 22 2005 - 15:11:46 PDT