To: Javier Kohen
Subject: Graphics routines
JC>> This also draws from bottom to top, which is often faster than
JK> Well, I was indirectely asking for code to try in my hardware config.
JK> Sorry if I wasn't clear.
Off the top of my head . . . In C...
void BlitBackwards( char *Image, size_t Size, char far *Screen )
{
while(Size--)
Screen[Image] = Image[Size];
}
In asm, of which mine is very rusty,
std ; Go backwards.
lds si,Image ; Load image pointer
mov ax,0a000h ; Load pointer to Video memory
mov es,ax
mov cx,Size ; Number of bytes to blit
mov di,cx ; Start at last byte position
dec di
rep movsb ; GOOOOOOOOOOO!!!!!!!
Ofc, you would use movsd or something like that to speed things up.
SS
--- Maximus 3.01
---------------
* Origin: BitByters BBS, Rockland ON, Can. (613)446-7773 v34, (1:163/215)
|