Re: A86: Efficiency Problem Part III


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

Re: A86: Efficiency Problem Part III









---ZeromusMog@aol.com wrote:
>
> 
> In a message dated 15/12/98 12:03:19 Pacific Standard Time,
ComAsYuAre@aol.com
> writes:
> 
> << > There must be an easier way... is there a way to inverse a
portion of the
>  >  screen?
>  
>  
>  sure.  screen memory starts at $fc00 and goes until $ffff.  just do
this to
>  invert the byte at hl:
>  	ld a,(hl)
>  	cpl			;one's complement
>  	ld (hl),a
>  
>  you can do this in a loop for inverting a bunch of lines:
>  	ld hl,$fc00
>  	ld b,16*7		;7 lines, 16 bytes each
>  invert_loop:
>  	ld a,(hl)
>  	cpl
>  	ld (hl),a
>  	inc hl
>  	djnz invert_loop
>  	ret >>
> 
> Yes, but letters are smaller than one byte wide. I don't really know
how to do
> stuff that complicated yet... if I was inverting across the screen,
I could do
> it. However, it starts on the third character and the end depends on
the menu
> on the screen. Also, I am inverting only ONE line, not seven. It's
very
> similar to the menu at the beginning of Star Chaser.
> 

You could start it at the beginning of whatever byte you wanted, run
it as many bytes as you want, then jump down to the next line by
adding 16...

Thus a cheap cop out would be to have all your text starting and
ending aproximatly on the byte. :)

_________________________________________________________
DO YOU YAHOO!?
Get your free @yahoo.com address at http://mail.yahoo.com