Re: A83: inversing the screen


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

Re: A83: inversing the screen




I personally use this, is it slower or more bloated?

InvertScreen:
ld hl,plotsscreen
ld d,h
ld e,l
ld bc,768
InvertLoop:
ld a,(hl)
cpl
ld (hl),a
ldi
jp pe,InvertLoop
;ret or jp ionfastcopy


>From: Harper Maddox <gte172i@prism.gatech.edu>
>Reply-To: assembly-83@lists.ticalc.org
>To: assembly-83@lists.ticalc.org
>Subject: Re: A83: inversing the screen
>Date: Sun, 18 Feb 2001 15:45:38 -0500
>
>
>heh. my bad. :)
>thats what i get for not cutting and pasting.
>i didnt know that ld a,(hl) / cpl was faster than ld a,255 / xor (hl)
>
>-harper
>
>At 02:03 PM 2/18/01 -0500, you wrote:
>>A bit faster and smaller, and actually increments hl :P
>>
>>invertScreen:
>>  ld hl,plotsscreen
>>  ld bc,3
>>invertLoop:
>>  ld a,(hl)
>>  cpl
>>  ld (hl),a
>>  inc hl
>>  djnz invertLoop
>>  dec c
>>  jr nz,invertLoop
>>  ret
>>
>>In a message dated 2/18/01 2:01:30 PM Eastern Standard Time,
>>gte172i@prism.gatech.edu writes:
>>
>>
>>>invertScreen:
>>>  ld hl,plotsscreen
>>>  ld bc,767
>>>invertLoop:
>>>  ld a,255
>>>  xor (hl)
>>>  ld (hl),a
>>>  dec c
>>>  jr nz,invertLoop
>>>  djnz invertLoop
>>>  ret
>>
>>
>>
>>
>>----
>>Jonah Cohen
>><ComAsYuAre@aol.com>
>>http://jonah.ticalc.org
>
>

_________________________________________________________________
Get your FREE download of MSN Explorer at http://explorer.msn.com