Home » Archimedes archive » Acorn User » AU 1996-06.adf » Regulars » RTR/JoyModTst

RTR/JoyModTst

This website contains an archive of files for the Acorn Electron, BBC Micro, Acorn Archimedes, Commodore 16 and Commodore 64 computers, which Dominic Ford has rescued from his private collection of floppy disks and cassettes.

Some of these files were originally commercial releases in the 1980s and 1990s, but they are now widely available online. I assume that copyright over them is no longer being asserted. If you own the copyright and would like files to be removed, please contact me.

Tape/disk: Home » Archimedes archive » Acorn User » AU 1996-06.adf » Regulars
Filename: RTR/JoyModTst
Read OK:
File size: 01A9 bytes
Load address: 0000
Exec address: 0000
File contents
   10REM>JoyModTst
   20PRINT"Analogue PC Joystick test on printer port"
   30PRINT"Module test"
   40PRINT"By Mike Cook"
   50PRINT"Press Esc to end"
   60PRINT
   70
   80PRINT"         X                  Y        Buttons"
   90REPEAT
  100SYS"Joystick_Read",0 TO J%
  110Y%=J% AND &FF
  120IF (Y% AND &80)<>0 THEN Y%=Y% OR &FFFFFF00
  130X%=(J% >> 8) AND &FF
  140IF (X% AND &80)<>0 THEN X%=X% OR &FFFFFF00
  150B%=(J% >> 16) AND &F
  160PRINTX%,Y%,B%;
  170PRINTCHR$(13);
  180FOR A%=1 TO 10
  190*FX19
  200NEXT
  210UNTIL FALSE
  220END
  230

�>JoyModTst
0�"Analogue PC Joystick test on printer port"
�"Module test"
(�"By Mike Cook"
2�"Press Esc to end"
<�
F
P3�"         X                  Y        Buttons"
Z�
dș"Joystick_Read",0 � J%
nY%=J% � &FF
x'� (Y% � &80)<>0 � Y%=Y% � &FFFFFF00
�X%=(J% >> 8) � &FF
�'� (X% � &80)<>0 � X%=X% � &FFFFFF00
�B%=(J% >> 16) � &F
��X%,Y%,B%;
��(13);
�� A%=1 � 10
�	*FX19
��
�� �
��
�
�
00000000  0d 00 0a 0f f4 3e 4a 6f  79 4d 6f 64 54 73 74 0d  |.....>JoyModTst.|
00000010  00 14 30 f1 22 41 6e 61  6c 6f 67 75 65 20 50 43  |..0."Analogue PC|
00000020  20 4a 6f 79 73 74 69 63  6b 20 74 65 73 74 20 6f  | Joystick test o|
00000030  6e 20 70 72 69 6e 74 65  72 20 70 6f 72 74 22 0d  |n printer port".|
00000040  00 1e 12 f1 22 4d 6f 64  75 6c 65 20 74 65 73 74  |...."Module test|
00000050  22 0d 00 28 13 f1 22 42  79 20 4d 69 6b 65 20 43  |"..(.."By Mike C|
00000060  6f 6f 6b 22 0d 00 32 17  f1 22 50 72 65 73 73 20  |ook"..2.."Press |
00000070  45 73 63 20 74 6f 20 65  6e 64 22 0d 00 3c 05 f1  |Esc to end"..<..|
00000080  0d 00 46 04 0d 00 50 33  f1 22 20 20 20 20 20 20  |..F...P3."      |
00000090  20 20 20 58 20 20 20 20  20 20 20 20 20 20 20 20  |   X            |
000000a0  20 20 20 20 20 20 59 20  20 20 20 20 20 20 20 42  |      Y        B|
000000b0  75 74 74 6f 6e 73 22 0d  00 5a 05 f5 0d 00 64 1c  |uttons"..Z....d.|
000000c0  c8 99 22 4a 6f 79 73 74  69 63 6b 5f 52 65 61 64  |.."Joystick_Read|
000000d0  22 2c 30 20 b8 20 4a 25  0d 00 6e 0f 59 25 3d 4a  |",0 . J%..n.Y%=J|
000000e0  25 20 80 20 26 46 46 0d  00 78 27 e7 20 28 59 25  |% . &FF..x'. (Y%|
000000f0  20 80 20 26 38 30 29 3c  3e 30 20 8c 20 59 25 3d  | . &80)<>0 . Y%=|
00000100  59 25 20 84 20 26 46 46  46 46 46 46 30 30 0d 00  |Y% . &FFFFFF00..|
00000110  82 16 58 25 3d 28 4a 25  20 3e 3e 20 38 29 20 80  |..X%=(J% >> 8) .|
00000120  20 26 46 46 0d 00 8c 27  e7 20 28 58 25 20 80 20  | &FF...'. (X% . |
00000130  26 38 30 29 3c 3e 30 20  8c 20 58 25 3d 58 25 20  |&80)<>0 . X%=X% |
00000140  84 20 26 46 46 46 46 46  46 30 30 0d 00 96 16 42  |. &FFFFFF00....B|
00000150  25 3d 28 4a 25 20 3e 3e  20 31 36 29 20 80 20 26  |%=(J% >> 16) . &|
00000160  46 0d 00 a0 0e f1 58 25  2c 59 25 2c 42 25 3b 0d  |F.....X%,Y%,B%;.|
00000170  00 aa 0b f1 bd 28 31 33  29 3b 0d 00 b4 0f e3 20  |.....(13);..... |
00000180  41 25 3d 31 20 b8 20 31  30 0d 00 be 09 2a 46 58  |A%=1 . 10....*FX|
00000190  31 39 0d 00 c8 05 ed 0d  00 d2 07 fd 20 a3 0d 00  |19.......... ...|
000001a0  dc 05 e0 0d 00 e6 04 0d  ff                       |.........|
000001a9