' *** JOYSTCK1.LST *** 2nd GFA-Manual, page 15-2 FUNCTION joystick_1 ' ' *** Returns status of joystick in Port 1 ' *** Mouse (in Port 0) can still be used ' *** Should work with most TOS-versions, in spite of illegal Peek ' *** Status (wind-direction): 1=N 2=S 3=fire 4=W 5=NW 6=SW 8=E 9=NE 10=SE ' LOCAL joy.adr% joy.adr%=ADD(XBIOS(34),61) ! (Port 0: add 60) IF BTST(BYTE{SUB(joy.adr%,11)},0) ! (Port 0: subtract 10 and test bit 1) RETURN 3 ! fire-button ELSE RETURN BYTE{joy.adr%} ! stick; 0 if no movement ENDIF ENDFUNC ' ***** '