Mail Archives: djgpp/1997/04/03/23:46:36
I would really appreciate if someone could tell me, or even better, give
me an example, of the fastest way of moving data to the video_buffer. I
would be really happy if there is a way to move it all at once, all 64K.
I know there is d_word method, but I've heard that using inline
assembler it could be a least two times faster. Here is the code of
that function, however it does not work (probably because it is not
compatible with protected mode). I don't know the way it should be
written.
char *video_buffer;
char *data;
__djgpp_nearptr_enable();
video_buffer = (char *) 0xa0000 + __djgpp_conventional_base;
asm{
push ds
les di, video_buffer
lds si, data
mov cx, 320*200/2
cld
rep movsw
pop ds
}
Thank you in advance,
Oghma.
- Raw text -