[A83] Re: Mario Side-Scroller


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

[A83] Re: Mario Side-Scroller




70% of all my bugs are backwards ld's, the rest are stack problems (reting 
onto a stack pushed value, forgetting a ret...)


>From: Sk8a4good@aol.com
>Reply-To: assembly-83@lists.ticalc.org
>To: assembly-83@lists.ticalc.org
>Subject: [A83] Re: Mario Side-Scroller
>Date: Sun, 27 May 2001 15:56:36 EDT
>
>
>you had a backwards ld in there : )
>
>GetXY:
>   ;NOTE: This assumes you stored the map data vertically!
>   ;Input e=y,hl=x
>   ;Output a= tile at (x,y)
>   ld a,l
>   and %11111000
>   ld l,a
>   ;add hl,hl    ;only do this if your map is 16 high instead of 8
>   ;ld 0,d   BACKWARDS
>     ld d,0
>   add hl,de
>   ld de,map         ;or whatever you named the map memory
>   add hl,de
>   ld a,(hl)
>   ret
>
>

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