Re: A86: Simple TI-85 Question


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

Re: A86: Simple TI-85 Question




Tercero wrote:
> Just use Clem's routine (attached below) don't call the one in the ROM,
> it's too slow.

Forgot to attach the routine.  Below it resides.

-- 
Tercero	 --  Email: mailto:tercero@busprod.com

"The stone the builders rejected has become the capstone;"
			--Psalms 118:22
"Everyone who falls on that stone will be broken to pieces,
but he on whom it falls will be crushed."
			--Luke 20:18

;FIND PIXEL______________________________
;by Clem
;Input: (b, c)                          |
;Output: byte in LCD memory -> hl       |
;        bitmask for (hl) -> a          |
;Destroys: bc                           |
;Speedsize:  117 cycles 34 bytes        |
;----------------------------------------
FindPixel:
     ld h,63
     ld a,c
     add a,a
     add a,a
     ld l,a
     ld a,b
     rra
     add hl,hl
     rra
     add hl,hl
     rra
     or l
     ld l,a
     ld a,b
     and 7
     ld bc,FP_Bits
     add a,c
     ld c,a
     adc a,b
     sub c
     ld b,a
     ld a,(bc)
     ret
FP_Bits:     .db $80,$40,$20,$10,$08,$04,$02,$01


References: