A89: Re: HELP !!!!!


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

A89: Re: HELP !!!!!




Mnemonics (and assembler directives, like EVEN and xdef, IIRC) must have a
leading space/tab on the line when you use A68k- only labels, macros and defines
can (and, possibly, must) start on the first position of the line.

 / Niklas Brunlid
Check out Prosit for the TI-89 / TI-92+ at http://prosit.ticalc.org
Random PQF Quote follows:

The ducks in St James's Park are so used to being fed bread by secret
agents meeting clandestinely that they have developed their own Pavlovian
reaction. Put a St James's Park duck in a laboratory cage and show it a
picture of two men -- one usually wearing a coat with a fur collar, the
other something sombre with a scarf -- and it'll look up expectantly.
        -- (Terry Pratchett & Neil Gaiman, Good Omens)

----- Original Message -----
From: c2b <c2b@prodigy.net>
To: <assembly-89@lists.ticalc.org>
Sent: Saturday, September 18, 1999 3:16 PM
Subject: A89: HELP !!!!!


>
> I been working on nthis program for a while and thought that I had
> everything worked out.  But, when I went to assemble it I had 88
> errors.  What is wrong with the souce.  Anybody please help me out.
> beware it's a little lengthy but it's my first try at a game.
>
> here it is:
>
> include "tios.h" ;ti rom calls
> include "doorsos.h" ;doors variables and rom calls
> include "graphlib.h" ;graphic functions
> include "userlib.h" ;random number functions
>
> xdef _ti89
> xdef _main
> xdef _comment
>
> _main:
> jsr graphlib::clr_scr
> bsr put_level
> bsr loop
> rts
> loop:
> cmp.w #0,doorsos::kb_vars+$1C
> bne getkey
> bsr putsprite
> bsr moveguys
> bsr check
> cmp.w #264,doorsos::MaxHandles+$1E
> beq main
> getkey:
> cmp.w #KEY_LEFT,doorsos::MaxHandles+$1E
> beq left
> cmp.w #KEY_RIGHT,doorsos::MaxHandles+$1E
> beq right
> cmp.w #KEY_DOWN,doorsos::MaxHandles+$1E
> beq down
> cmp.w #KEY_UP,doorsos::MaxHandles+$1E
> beq up
> clr (doorsos::kb_vars+$1C)
> rts
> right:
> add.w #1,d0
> cmp.w #154,d0
> beq left
> rts
> left:
> sub.w #1,d0
> cmp.w #0,d0
> beq right
> rts
> up:
> sub.w #1,d1
> cmp.w #0,d1
> beq down
> rts
> down:
> add.w #1,d1
> cmp.w #92
> beq up
> rts
> putsprite:
> move.l player(pc),a0
> move.l mask(pc),a2
> jsr graphlib::put_sprite
> rts
> moveguys:
> move.w d0,-(a7) ;/pushes the players position on the stack
> move.w d1,-(a7) ;\so the put sprite routine can do both
> move.w #5,d0
> jsr userlib::random
> move.w d0,random
> cmp.w #1,random
> beq baddie_up
> cmp.w #2,random
> beq baddie_left
> cmp.w #3,random
> beq baddie_stay
> cmp.w #4,random
> beq baddie_right
> move.w d2,d0 ;/moves enemies positions
> move.w d3,d1 ;\into the put_sprite registers
> move.l baddie(pc),a0
> move.l mask2(pc),a2
> jsr graphlib::put_sprite
> move.w a7,d1 ; /
> lea 2(a7),a7 ;/'juggling' players values from the
> move.w a7,d0 ;\stack so that the next put sprite works
> lea 2(a7),a7 ; \
> rts
> baddie_up:
> sub.w #1,d3
> cmp.w #-1,d3
> beq baddie_down
> rts
> baddie_down:
> add.w #1,d3
> cmp.w #92,d3
> beq baddie_up
> rts
> baddie_left:
> sub.w #1,d2
> cmp.w #-1,d2
> beq baddie_right
> rts
> baddie_right:
> add.w #1,d2
> cmp.w #154,d2
> beq baddie_left
> rts
> check:
> cmp.w d0,d2
> beq collision
> cmp.w d1,d3
> beq collision
> rts
> collision:
> move.w #3,-(a7)
> pea end(pc)
> move.w #40,-(a7)
> move.w #70,-(a7)
> jsr doorsos::DrawStrXY
> lea 10(a7),a7
> jsr userlib::idle_loop
> jsr graphlib::clr_scr
> move.w #3,-(a7)
> pea credit1(pc)
> move.w #40,-(a7)
> move.w #70,-(a7)
> jsr doorsos::DrawStrXY
> lea 10(a7),a7
> jsr userlib::idle_loop
> jsr graphlib::clr_scr
> rts
> credit1:
> dc.b "By: Charlie Boyd",0
> end:
> dc.b "Game Over",0
> random:
> dc.w 0
> player:
> dc.w 8 ;-> height of the sprite
> dc.w 1 ;width in bytes
> dc.b %00011000
> dc.b %00100100
> dc.b %00011000
> dc.b %11111111
> dc.b %00011000
> dc.b %00100100
> dc.b %00100100
> dc.b %01100110
> mask:
> dc.b %00000000
> dc.b %00011000
> dc.b %00000000
> dc.b %00000000
> dc.b %00000000
> dc.b %00000000
> dc.b %00000000
> dc.b %00000000
>
> baddie:
> dc.w 8 ;-> height of the sprite
> dc.w 1 ;width in bytes
> dc.b %00000000
> dc.b %01000010
> dc.b %01011010
> dc.b %00100100
> dc.b %01100110
> dc.b %01011010
> dc.b %01111110
> dc.b %01000100
> mask2:
> dc.b %00000000
> dc.b %00000000
> dc.b %00000000
> dc.b %00011000
> dc.b %00011000
> dc.b %00100100
> dc.b %00000000
> dc.b %00000000
> _comment:
> dc.b "hide & seek"
>
> end
>
> sorry it's long I have tried everything I could but nothing works.



Follow-Ups: References: