Re: A86: Efficiency Problem Part III
[Prev][Next][Index][Thread]
Re: A86: Efficiency Problem Part III
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.