Write into Video Memory ? Far Pointer
-
In the 16Bit days you could easily access the video ram B800:0000 with far pointers. "Far" is now obsolete since all pointers are 32Bit ones. How can I access B800:0000 in a console application now ? In 16Bit days this worked: unsigned far int Videospeicher = 0xB8000000; unsigned far int *pVideoPointer; pVideoPointer = ( unsigned far int ) Videospeicher; for( int i = 0; i < 20; i++) { *pVideoPointer++ = 0x4E41; } -- modified at 4:04 Friday 11th November, 2005
-
In the 16Bit days you could easily access the video ram B800:0000 with far pointers. "Far" is now obsolete since all pointers are 32Bit ones. How can I access B800:0000 in a console application now ? In 16Bit days this worked: unsigned far int Videospeicher = 0xB8000000; unsigned far int *pVideoPointer; pVideoPointer = ( unsigned far int ) Videospeicher; for( int i = 0; i < 20; i++) { *pVideoPointer++ = 0x4E41; } -- modified at 4:04 Friday 11th November, 2005
AFAIK, you can't. Windows is an OS with Virtual Memory support, which means that 0xB8000000 doesn't represent the physical memory at that address. What's more, if you try to read/write to that memory location, you'll get Access Violation errors because Windows detects that you're trying to use memory which has not been mapped. Regards Senthil _____________________________ My Blog | My Articles | WinMacro
-
In the 16Bit days you could easily access the video ram B800:0000 with far pointers. "Far" is now obsolete since all pointers are 32Bit ones. How can I access B800:0000 in a console application now ? In 16Bit days this worked: unsigned far int Videospeicher = 0xB8000000; unsigned far int *pVideoPointer; pVideoPointer = ( unsigned far int ) Videospeicher; for( int i = 0; i < 20; i++) { *pVideoPointer++ = 0x4E41; } -- modified at 4:04 Friday 11th November, 2005
Kamann wrote:
In the 16Bit days you could easily access the video ram B800:0000 with far pointers.
One of my favorite parts of DOS programming was the ability to write directly to video memory. :-D Have you considered using the console API for this?
"Take only what you need and leave the land as you found it." - Native American Proverb
-
Kamann wrote:
In the 16Bit days you could easily access the video ram B800:0000 with far pointers.
One of my favorite parts of DOS programming was the ability to write directly to video memory. :-D Have you considered using the console API for this?
"Take only what you need and leave the land as you found it." - Native American Proverb
I wrote an entire UI library using direct video memory access. Exploding windows, SaveScreen/RestoreScreen, TextOut.. etc. Piece of cake and was it FAST! onwards and upwards...