Mail Archives: djgpp/1997/07/07/02:40:16
from: csantill AT lausd DOT k12 DOT ca DOT us
I want to map an array to VGA mem but I'm not sure how.
I don't want to turn off memory protection either.
I've seen this done w/a BASIC compiler(PowerBasic).
This is want I want to do instintively but I know it's wrong:
// initialize vid_mem as [200][320] char array at 0xA0000
unsigned char *vid_mem[200][320]=(unsigned char *)0xA0000
This seems more correct though but untested:
// initialize p as [64000] char array at 0xA0000
unsigned char *p[64000]=(unsigned char *)0xA0000
// initialize vid_mem as [200][320] array at &p[0] which should be
0xA0000
unsigned char vid_mem[200][320]=(unsigned char *)&p
Another thing I consider is creating a struct at 0xA0000 & pointing
vid_mem
at that.
Can anyone tell where to go(& please don't tell me the FAQ because that
like
answering a question w/a question)?
- Raw text -