Home » Archimedes archive » Acorn User » AU 1998-04 A.adf » PD » Avison/!TaskUsage/TestProgs/PollBasic

Avison/!TaskUsage/TestProgs/PollBasic

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 1998-04 A.adf » PD
Filename: Avison/!TaskUsage/TestProgs/PollBasic
Read OK:
File size: 01F6 bytes
Load address: 0000
Exec address: 0000
File contents
   10REM Wimp Poll in a tight basic loop if Null Reason Code
   20
   30kb%=64                        :REM set to kb for SlotSize
   40
   50END = 1024 * kb%
   60
   70DIM T% 4,B% 256
   80$T% ="TASK"
   90
  100SYS "Wimp_Initialise",300 ,!T% ,"WimpPoll Basic",0 TO ,task%
  110
  120REPEAT
  130  SYS "Wimp_Poll",%10011111111111111110 ,B%  TO R%
  140  CASE R% OF
  150    WHEN 0                    :REM Null Poll
  160    WHEN 17 ,18
  170      CASE B%!16 OF
  180        WHEN 0
  190          SYS "Wimp_CloseDown",task%
  200          END
  210      ENDCASE
  220  ENDCASE
  230UNTIL FALSE
  240END
  250

9� Wimp Poll in a tight basic loop if Null Reason Code

;kb%=64                        :� set to kb for SlotSize
(
2� = 1024 * kb%
<
F� T% 4,B% 256
P$T% ="TASK"
Z
d>ș "Wimp_Initialise",300 ,!T% ,"WimpPoll Basic",0 � ,task%
n
x�
�4  ș "Wimp_Poll",%10011111111111111110 ,B%  � R%
�
  Ȏ R% �
�+    � 0                    :� Null Poll
�    � 17 ,18
�      Ȏ B%!16 �
�        � 0
�'          ș "Wimp_CloseDown",task%
�          �
�      �
�  �
�� �
��
�
�
00000000  0d 00 0a 39 f4 20 57 69  6d 70 20 50 6f 6c 6c 20  |...9. Wimp Poll |
00000010  69 6e 20 61 20 74 69 67  68 74 20 62 61 73 69 63  |in a tight basic|
00000020  20 6c 6f 6f 70 20 69 66  20 4e 75 6c 6c 20 52 65  | loop if Null Re|
00000030  61 73 6f 6e 20 43 6f 64  65 0d 00 14 04 0d 00 1e  |ason Code.......|
00000040  3b 6b 62 25 3d 36 34 20  20 20 20 20 20 20 20 20  |;kb%=64         |
00000050  20 20 20 20 20 20 20 20  20 20 20 20 20 20 20 3a  |               :|
00000060  f4 20 73 65 74 20 74 6f  20 6b 62 20 66 6f 72 20  |. set to kb for |
00000070  53 6c 6f 74 53 69 7a 65  0d 00 28 04 0d 00 32 12  |SlotSize..(...2.|
00000080  e0 20 3d 20 31 30 32 34  20 2a 20 6b 62 25 0d 00  |. = 1024 * kb%..|
00000090  3c 04 0d 00 46 11 de 20  54 25 20 34 2c 42 25 20  |<...F.. T% 4,B% |
000000a0  32 35 36 0d 00 50 0f 24  54 25 20 3d 22 54 41 53  |256..P.$T% ="TAS|
000000b0  4b 22 0d 00 5a 04 0d 00  64 3e c8 99 20 22 57 69  |K"..Z...d>.. "Wi|
000000c0  6d 70 5f 49 6e 69 74 69  61 6c 69 73 65 22 2c 33  |mp_Initialise",3|
000000d0  30 30 20 2c 21 54 25 20  2c 22 57 69 6d 70 50 6f  |00 ,!T% ,"WimpPo|
000000e0  6c 6c 20 42 61 73 69 63  22 2c 30 20 b8 20 2c 74  |ll Basic",0 . ,t|
000000f0  61 73 6b 25 0d 00 6e 04  0d 00 78 05 f5 0d 00 82  |ask%..n...x.....|
00000100  34 20 20 c8 99 20 22 57  69 6d 70 5f 50 6f 6c 6c  |4  .. "Wimp_Poll|
00000110  22 2c 25 31 30 30 31 31  31 31 31 31 31 31 31 31  |",%1001111111111|
00000120  31 31 31 31 31 31 30 20  2c 42 25 20 20 b8 20 52  |1111110 ,B%  . R|
00000130  25 0d 00 8c 0d 20 20 c8  8e 20 52 25 20 ca 0d 00  |%....  .. R% ...|
00000140  96 2b 20 20 20 20 c9 20  30 20 20 20 20 20 20 20  |.+    . 0       |
00000150  20 20 20 20 20 20 20 20  20 20 20 20 20 3a f4 20  |             :. |
00000160  4e 75 6c 6c 20 50 6f 6c  6c 0d 00 a0 10 20 20 20  |Null Poll....   |
00000170  20 c9 20 31 37 20 2c 31  38 0d 00 aa 14 20 20 20  | . 17 ,18....   |
00000180  20 20 20 c8 8e 20 42 25  21 31 36 20 ca 0d 00 b4  |   .. B%!16 ....|
00000190  0f 20 20 20 20 20 20 20  20 c9 20 30 0d 00 be 27  |.        . 0...'|
000001a0  20 20 20 20 20 20 20 20  20 20 c8 99 20 22 57 69  |          .. "Wi|
000001b0  6d 70 5f 43 6c 6f 73 65  44 6f 77 6e 22 2c 74 61  |mp_CloseDown",ta|
000001c0  73 6b 25 0d 00 c8 0f 20  20 20 20 20 20 20 20 20  |sk%....         |
000001d0  20 e0 0d 00 d2 0b 20 20  20 20 20 20 cb 0d 00 dc  | .....      ....|
000001e0  07 20 20 cb 0d 00 e6 07  fd 20 a3 0d 00 f0 05 e0  |.  ...... ......|
000001f0  0d 00 fa 04 0d ff                                 |......|
000001f6