Re: A86: Efficiency Problem Part III
[Prev][Next][Index][Thread]
Re: A86: Efficiency Problem Part III
In a message dated 12/15/98 12:01:51 AM Eastern Standard Time,
ZeromusMog@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