Re: A89: compiling


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

Re: A89: compiling




Dux Gregis@ 10.2.98 19.01

>Alright, I got it compiled using doors os.  Now, if someone who _knows_ 
>68k could help me out and tell me what's wrong with this findpixel 
>routine, I would appreciate it ...
>
>thanks
>
I don't know the exact problem you're experiencing, but here it is 
somewhat revised.

FindPixel:

 movea.l #$4c00,a0       ;<--- move address just in case :)
 mulu #30,d1
 adda.l d1,a0            ;<--- add address -- i would use adda.w
 move.w d0,d1
 lsr.b #3,d1
 add.b d1,a0             ;<--- byte, not longword -- use consistant 
lengths
                         ;there may be crap left over in d1
 andi.l #7,d0            ;<--- _and immediate_ use longword to make sure
                         ;the register only contains the bit offset
 rts


Always make sure you use lengths correctly to ensure there is crap left 
in the registers you are using.  If you are not sure if there might be, 
use clr.l to be safe.  It can be the source of much wasted debugging time 
:).

-Mark



-------
Mark Zavislak
felix@megsinet.net