Mail Archives: djgpp/1996/05/09/11:06:26
On 8 May 1996, Hafiz Awang Pon wrote:
> void transfer_screen(void) {
>
> lcopy(Virtual_Screen, 0xd0000000, 16000L);
> }
You are trying to write to the video memory by using an absolute address.
This doesn't work under DPMI (it didn't even work in v1.x when go32 was
run in DPMI mode, e.g. under Windows). The DJGPP FAQ list
(v2/faq200b.zip from the same place you get DJGPP) explains this problem
in section 10.1 and points you to the possible solutions.
Btw, there is no need to reinvent the wheel: a function that does exactly
what you need already exists in the DJGPP library. It is called
`movedata', is at least as fast as your code, and even existed in v1.x.
I suggest you look it up in the libc on-line docs. The FAQ also explains
a bit how to use that function.
- Raw text -