A86: how does find pixel work?!?


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

A86: how does find pixel work?!?




Could someone please comment and explain whats happening here or tell me
how to find out.  I am coming from the TI-85, not that it is too much
different.  I have made some pretty cool games for the 85 using putsprite
which uses find pixel, but I have never really known how it works.  I
think that it is time that I learn.  This knowledge is what seperates
people who know what they are doing from those who are just screwing
around.  I want to be one of those who knows what is going on.  You can
make plenty of cool stuff w/o knowing this crap, but like Matt Johnson
says in his assembly tutorial having someone elses code in yours is a
crappy feeling.  I should at least know how it works.   Thanks, Mike

FIND_PIXEL:
 push bc
 push de
 ld hl,ExpTable
 ld d,0
 ld a,b
 and $07
 ld e,a
 add hl,de
 ld e,(hl)
 ld h,d
 srl b
 srl b
 srl b
 ld a,c
 add a,a
 add a,a
 ld l,a
 add hl,hl
 add hl,hl
 ld a,e
 ld e,b
 add hl,de
 pop de
 pop bc
 ret

ExpTable:
 .db $80,$40,$20,$10,$08,$04,$02,$01

_____________________________________________________________________
You don't need to buy Internet access to use free Internet e-mail.
Get completely free e-mail from Juno at http://www.juno.com
Or call Juno at (800) 654-JUNO [654-5866]


Follow-Ups: References: