Re: A86: screen stuff


[Prev][Next][Index][Thread]

Re: A86: screen stuff



In a message dated 97-10-29 00:18:31 EST, you write:

> 
>  Robby Gutmann wrote:
>  > 
>  > ok, im working on my first game (Tic Tac Toe, if anybody cares), and im
>  > testing it, and im sick of having to go to the graph menu every time to
>  > cleardraw.  is there anyway to do this in asm?  i know _clrLCD doesnt,
>  > because i have a call to it right before my ret, and it is still in the
>  > graoh screen.  i was thinking that maybe clrscrn did, but there was 
> another
>  > thred (graphic memory questions) that said that it didnt.  so how do i 
> clear
>  > the drawing scrren, as well as the home screen?  thanx.
>  
>  have you tried a djnz loop that loads a 0 into all the graph screen
>  addresses?
>  
>  
A MUCH faster way is an LDIR, such as the following:

ld hl,GRAPHMEM
ld de,GRAPHMEM+1
ld bc,1023
ld hl,0000
ldir

which loads 0 into the 1st byte and then loads each byte after that with the
contents of the previous byte, which was just zeroed out.

~Steve


Follow-Ups: