TIB: (86 Basic) Please help


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

TIB: (86 Basic) Please help




I don't understand why this doesn't work! the movement works fine, but
whenever I try to test the my prevention from going off screen, it
freezes. I can still quit via On, but none of the keys respond any more.
Any help?

The program has a subroutine for movent.

The main prog (part of it anyways)

:Outpt(Y,X,Q
:Lbl TOP
:getKy(=>)A
:If A==24 or A==25
:Then
:@Move
:Goto TOP
:Else
:If A==26 or A==34
:Then
:@Move
:Goto TOP
:Else
:Goto TOP

the @move subroutine

:Lbl TOP
:If A==24 and X>2
:Then
:Outpt(Y,X,SP
:X-1(=>)X
:Outpt(Y,X,Q
:Return
:Else
:If A==26 and X<20
:Then
:Outpt(Y,X,SP
:X+1(=>)X
:Outpt(Y,X,Q
:Return
:Else
:If A==25 and Y>2
:Then
:Outpt(Y,X,SP
:Y-1(=>)Y
:Outpt(Y,X,Q
:Return
:Else
:If A==34 and Y<7
:Then
:Outpt(Y,X,SP
:Y+1(=>)Y
:Outpt(Y,X,Q
:Return
:Else
:Goto TOP