Thread overview | |||||||
---|---|---|---|---|---|---|---|
|
October 21, 2001 32-bit Pointers | ||||
---|---|---|---|---|
| ||||
Attachments:
| Hi. I tried to access 32-bit addresses (such as 000A:0000) through _x386_map_physical_memory but the program usually crashes with the warning: "General Protection Fault" and it gives me all the register values. Is there a way I can access the address without using any fancy functions that is provided, or by using the function provided effeciently? I actually tried to access address not associated with any hardware (for example. 0005:1836) and it didn't work. The 000A000 works fine but this address didn't work. The reason I am tring to access this location is because the real-mode video-interrupt 0x10 only outputs buffer in the conventional memory. Is it possible that since this is a 32-bit protected mode environment, pointers to conventional addresses are illegal? If so, can you give me some ideas on how I can access conventional memory? Thanks. |
October 22, 2001 Re: 32-bit Pointers | ||||
---|---|---|---|---|
| ||||
Posted in reply to Imran Haider Attachments:
| To access the display directly, try the disp functions in disp.h. That will likely work better (and it's portable to win32 too!). Imran Haider wrote in message <9qvefh$124m$1@digitaldaemon.com>... Hi. I tried to access 32-bit addresses (such as 000A:0000) through _x386_map_physical_memory but the program usually crashes with the warning: "General Protection Fault" and it gives me all the register values. Is there a way I can access the address without using any fancy functions that is provided, or by using the function provided effeciently? I actually tried to access address not associated with any hardware (for example. 0005:1836) and it didn't work. The 000A000 works fine but this address didn't work. The reason I am tring to access this location is because the real-mode video-interrupt 0x10 only outputs buffer in the conventional memory. Is it possible that since this is a 32-bit protected mode environment, pointers to conventional addresses are illegal? If so, can you give me some ideas on how I can access conventional memory? Thanks. |
October 22, 2001 Re: 32-bit Pointers | ||||
---|---|---|---|---|
| ||||
Posted in reply to Imran Haider | Imran Haider schrieb...
>
> Hi. I tried to access 32-bit addresses (such as 000A:0000) through _x386_map_physical_memory but the program usually crashes with the warning: "General Protection Fault" and it gives me all the register values. Is there a way I can access the address without using any fancy functions that is provided, or by using the function provided effeciently?
Try to use _x386_zero_base_ptr, that is declared in dos.h as
void *_x386_zero_base_ptr;
You now can build a 32 bit absolute address by adding a 32bit offset to this pointer:
char *ScreenAtA000 = (char*)_x386_zero_base_ptr + 0xA0000;
Note that you don't use segment:offset in this case but a linear memory address.
Regards,
Heinz
|
October 23, 2001 Re: 32-bit Pointers | ||||
---|---|---|---|---|
| ||||
Posted in reply to Imran Haider Attachments:
| see a reply I sent in this group: "Re: Accessing VRAM directly" there is evrything to manipulate pointers in it
Ciao
Roland
Imran Haider a écrit :
> Hi. I tried to access 32-bit addresses (such as 000A:0000) through _x386_map_physical_memory but the program usually crashes with the warning: "General Protection Fault" and it gives me all the register values. Is there a way I can access the address without using any fancy functions that is provided, or by using the function provided effeciently? I actually tried to access address not associated with any hardware (for example. 0005:1836) and it didn't work. The 000A000 works fine but this address didn't work. The reason I am tring to access this location is because the real-mode video-interrupt 0x10 only outputs buffer in the conventional memory. Is it possible that since this is a 32-bit protected mode environment, pointers to conventional addresses are illegal? If so, can you give me some ideas on how I can access conventional memory? Thanks.
|
October 24, 2001 Re: 32-bit Pointers | ||||
---|---|---|---|---|
| ||||
Posted in reply to Roland | I added yours and Heinz's comments to the FAQ. Thanks! www.digitalmars.com/faq.html Roland wrote in message <3BD56D53.E8D63C85@ronetech.com>... >see a reply I sent in this group: "Re: Accessing VRAM directly" there is evrything to manipulate pointers in it > >Ciao > >Roland > > >Imran Haider a écrit : > >> Hi. I tried to access 32-bit addresses (such as 000A:0000) through _x386_map_physical_memory but the program usually crashes with the warning: "General Protection Fault" and it gives me all the register values. Is there a way I can access the address without using any fancy functions that is provided, or by using the function provided effeciently? I actually tried to access address not associated with any hardware (for example. 0005:1836) and it didn't work. The 000A000 works fine but this address didn't work. The reason I am tring to access this location is because the real-mode video-interrupt 0x10 only outputs buffer in the conventional memory. Is it possible that since this is a 32-bit protected mode environment, pointers to conventional addresses are illegal? If so, can you give me some ideas on how I can access conventional memory? Thanks. > |
Copyright © 1999-2021 by the D Language Foundation