Re: A89: HELP !!!!!


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

Re: A89: HELP !!!!!




I don't know about your 88 errors, and since you didnt provide any error output
I will not even try to look for them.
but this part is quite fucked up. (but it shouldnt produce any errors in
compilation)
c2b wrote:

> 
> _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
[...]

first..  there is no "main" label anywhere. did you mean _main?  then it will
crash quite hard with a busted stack.
did you mean loop?  then it will work as long as you dont press any keys (if
your subroutines is right that is)
but when you press a key it will quit.

it is because you bsr to loop and then beqs to main, wich bsrs to loop and so on
=> busted stack.
or (if beq main, is to be beq loop) it bsrs to loop, and then when you press a
key, your keyroutines does a rts, wich takes you back to main, who quits.

what kind of errors do you get anyway? and how do you manage to get 88 errors on
that short program? it is just 170 lines of code!  are you shure you are using
your compiler correctly?

//Olle


References: