Home » Archimedes archive » Acorn User » AU 1998-04 A.adf » PD » Avison/!TaskUsage/TestProgs/PollIdleBa
Avison/!TaskUsage/TestProgs/PollIdleBa
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/PollIdleBa |
Read OK: | ✔ |
File size: | 02B6 bytes |
Load address: | 0000 |
Exec address: | 0000 |
File contents
10REM Wimp PollIdle in a tight basic loop if Null Reason Code 20 30kb% = 64 :REM set to kb for SlotSize 40I% = 10 :REM set to centiseconds wait 50 60END = 1024 * kb% 70 80DIM T% 4,B% 256 90$T% ="TASK" 100 110SYS "Wimp_Initialise",300 ,!T% ,"WimpPollIdle Basic",0 TO ,task% 120 130SYS "OS_ReadMonotonicTime"TO H% 140H% +=I% 150 160REPEAT 170 SYS "Wimp_PollIdle",%10011111111111111110 ,B%,H% TO R% 180 CASE R% OF 190 WHEN 0 :REM Null Poll 200 SYS "OS_ReadMonotonicTime"TO H% 210 H% +=I% 220 WHEN 17 ,18 230 CASE B%!16 OF 240 WHEN 0 250 SYS "Wimp_CloseDown",task% 260 END 270 ENDCASE 280 ENDCASE 290UNTIL FALSE 300END 310
=� Wimp PollIdle in a tight basic loop if Null Reason Code ;kb% = 64 :� set to kb for SlotSize (=I% = 10 :� set to centiseconds wait 2 <� = 1024 * kb% F P� T% 4,B% 256 Z$T% ="TASK" d nBș "Wimp_Initialise",300 ,!T% ,"WimpPollIdle Basic",0 � ,task% x �!ș "OS_ReadMonotonicTime"� H% �H% +=I% � �� �; ș "Wimp_PollIdle",%10011111111111111110 ,B%,H% � R% � Ȏ R% � �5 � 0 :� Null Poll �' ș "OS_ReadMonotonicTime"� H% � H% +=I% � � 17 ,18 � Ȏ B%!16 � � � 0 �' ș "Wimp_CloseDown",task% � � � "� � ,� 6 �
00000000 0d 00 0a 3d f4 20 57 69 6d 70 20 50 6f 6c 6c 49 |...=. Wimp PollI| 00000010 64 6c 65 20 69 6e 20 61 20 74 69 67 68 74 20 62 |dle in a tight b| 00000020 61 73 69 63 20 6c 6f 6f 70 20 69 66 20 4e 75 6c |asic loop if Nul| 00000030 6c 20 52 65 61 73 6f 6e 20 43 6f 64 65 0d 00 14 |l Reason Code...| 00000040 04 0d 00 1e 3b 6b 62 25 20 3d 20 20 36 34 20 20 |....;kb% = 64 | 00000050 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | | 00000060 20 20 20 3a f4 20 73 65 74 20 74 6f 20 6b 62 20 | :. set to kb | 00000070 66 6f 72 20 53 6c 6f 74 53 69 7a 65 0d 00 28 3d |for SlotSize..(=| 00000080 49 25 20 20 3d 20 20 31 30 20 20 20 20 20 20 20 |I% = 10 | 00000090 20 20 20 20 20 20 20 20 20 20 20 20 20 20 3a f4 | :.| 000000a0 20 73 65 74 20 74 6f 20 63 65 6e 74 69 73 65 63 | set to centisec| 000000b0 6f 6e 64 73 20 77 61 69 74 0d 00 32 04 0d 00 3c |onds wait..2...<| 000000c0 12 e0 20 3d 20 31 30 32 34 20 2a 20 6b 62 25 0d |.. = 1024 * kb%.| 000000d0 00 46 04 0d 00 50 11 de 20 54 25 20 34 2c 42 25 |.F...P.. T% 4,B%| 000000e0 20 32 35 36 0d 00 5a 0f 24 54 25 20 3d 22 54 41 | 256..Z.$T% ="TA| 000000f0 53 4b 22 0d 00 64 04 0d 00 6e 42 c8 99 20 22 57 |SK"..d...nB.. "W| 00000100 69 6d 70 5f 49 6e 69 74 69 61 6c 69 73 65 22 2c |imp_Initialise",| 00000110 33 30 30 20 2c 21 54 25 20 2c 22 57 69 6d 70 50 |300 ,!T% ,"WimpP| 00000120 6f 6c 6c 49 64 6c 65 20 42 61 73 69 63 22 2c 30 |ollIdle Basic",0| 00000130 20 b8 20 2c 74 61 73 6b 25 0d 00 78 04 0d 00 82 | . ,task%..x....| 00000140 21 c8 99 20 22 4f 53 5f 52 65 61 64 4d 6f 6e 6f |!.. "OS_ReadMono| 00000150 74 6f 6e 69 63 54 69 6d 65 22 b8 20 48 25 0d 00 |tonicTime". H%..| 00000160 8c 0b 48 25 20 2b 3d 49 25 0d 00 96 04 0d 00 a0 |..H% +=I%.......| 00000170 05 f5 0d 00 aa 3b 20 20 c8 99 20 22 57 69 6d 70 |.....; .. "Wimp| 00000180 5f 50 6f 6c 6c 49 64 6c 65 22 2c 25 31 30 30 31 |_PollIdle",%1001| 00000190 31 31 31 31 31 31 31 31 31 31 31 31 31 31 31 30 |1111111111111110| 000001a0 20 2c 42 25 2c 48 25 20 20 b8 20 52 25 0d 00 b4 | ,B%,H% . R%...| 000001b0 0d 20 20 c8 8e 20 52 25 20 ca 0d 00 be 35 20 20 |. .. R% ....5 | 000001c0 20 20 c9 20 30 20 20 20 20 20 20 20 20 20 20 20 | . 0 | 000001d0 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | | 000001e0 20 20 20 3a f4 20 4e 75 6c 6c 20 50 6f 6c 6c 0d | :. Null Poll.| 000001f0 00 c8 27 20 20 20 20 20 20 c8 99 20 22 4f 53 5f |..' .. "OS_| 00000200 52 65 61 64 4d 6f 6e 6f 74 6f 6e 69 63 54 69 6d |ReadMonotonicTim| 00000210 65 22 b8 20 48 25 0d 00 d2 11 20 20 20 20 20 20 |e". H%.... | 00000220 48 25 20 2b 3d 49 25 0d 00 dc 10 20 20 20 20 c9 |H% +=I%.... .| 00000230 20 31 37 20 2c 31 38 0d 00 e6 14 20 20 20 20 20 | 17 ,18.... | 00000240 20 c8 8e 20 42 25 21 31 36 20 ca 0d 00 f0 0f 20 | .. B%!16 ..... | 00000250 20 20 20 20 20 20 20 c9 20 30 0d 00 fa 27 20 20 | . 0...' | 00000260 20 20 20 20 20 20 20 20 c8 99 20 22 57 69 6d 70 | .. "Wimp| 00000270 5f 43 6c 6f 73 65 44 6f 77 6e 22 2c 74 61 73 6b |_CloseDown",task| 00000280 25 0d 01 04 0f 20 20 20 20 20 20 20 20 20 20 e0 |%.... .| 00000290 0d 01 0e 0d 20 20 20 20 20 20 20 20 cb 0d 01 18 |.... ....| 000002a0 07 20 20 cb 0d 01 22 07 fd 20 a3 0d 01 2c 05 e0 |. ...".. ...,..| 000002b0 0d 01 36 04 0d ff |..6...| 000002b6