Re: A89: HELP !!!!!


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

Re: A89: HELP !!!!!




just an idea but could there be a problem using both doorsos.h and 
tios.h?  i thought doorsos did all the same things?


At 06:16 AM 9/18/99 , you wrote:

>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.

-Joe-  "Never march in another man's parade."

Check out my web page- Dead Wood Skateboarding Home -
http://home.olp1726.mindspring.com/index.htm

Check out these sites who pay you for surfing the web
http://alladvantage.com/go.asp?refid=atz140
http://epipo.com/sine.asp?tnemele
http://www.gotoworld.com/getpaid/default.asp?rid=1015442434





References: