Home » Archimedes archive » Acorn User » AU 1998-09.adf » Features » DesktopPD/ExtraBar/!ExLibrary/Utils/!Hourglass/Hourglass
DesktopPD/ExtraBar/!ExLibrary/Utils/!Hourglass/Hourglass
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-09.adf » Features |
Filename: | DesktopPD/ExtraBar/!ExLibrary/Utils/!Hourglass/Hourglass |
Read OK: | ✔ |
File size: | 0272 bytes |
Load address: | 0000 |
Exec address: | 0000 |
File contents
1ON ERROR REPORT:PRINT ERL:END 2 3DIM result% 512 4 5SYS "OS_GetEnv" TO command$ 6I%=INSTR(command$," -quit "):tail$="" 7IF I% THEN tail$=MID$(command$,INSTR(command$," ",I%+LEN(" -quit "))+1) 8SYS "XOS_ReadArgs","on/s,off/s,smash/s,percentage",tail$,result%,512 9 10per% = 0 11 12IF result%!0 THEN SYS "Hourglass_On" 13IF result%!4 THEN SYS "Hourglass_Off" 14IF result%!8 THEN SYS "Hourglass_Smash" 15IF result%!12 THEN 16 p$ = FNread_value(result%!12) 17 SYS "Hourglass_Percentage",,3 18 SYS "Hourglass_Percentage",VAL(p$) 19ENDIF 20END 21 22DEF FNread_value(ptr%) 23LOCAL p$ 24FOR lp% = 0 TO 20 25 IF ?(ptr%+lp%) > 32 THEN p$+=CHR$(?(ptr%+lp%)) ELSE lp% = 22 26NEXT 27= p$
� � �:� �:� � result% 512 ș "OS_GetEnv" � command$ $I%=�command$," -quit "):tail$="" <� I% � tail$=�command$,�command$," ",I%+�(" -quit "))+1) Gș "XOS_ReadArgs","on/s,off/s,smash/s,percentage",tail$,result%,512 per% = 0 $� result%!0 � ș "Hourglass_On" %� result%!4 � ș "Hourglass_Off" '� result%!8 � ș "Hourglass_Smash" � result%!12 � " p$ = �read_value(result%!12) " ș "Hourglass_Percentage",,3 % ș "Hourglass_Percentage",�(p$) � � � �read_value(ptr%) � p$ � lp% = 0 � 20 8 � ?(ptr%+lp%) > 32 � p$+=�(?(ptr%+lp%)) � lp% = 22 � = p$ �
00000000 0d 00 01 0f ee 20 85 20 f6 3a f1 20 9e 3a e0 0d |..... . .:. .:..| 00000010 00 02 05 20 0d 00 03 11 de 20 72 65 73 75 6c 74 |... ..... result| 00000020 25 20 35 31 32 0d 00 04 04 0d 00 05 1d c8 99 20 |% 512.......... | 00000030 22 4f 53 5f 47 65 74 45 6e 76 22 20 b8 20 63 6f |"OS_GetEnv" . co| 00000040 6d 6d 61 6e 64 24 0d 00 06 24 49 25 3d a7 63 6f |mmand$...$I%=.co| 00000050 6d 6d 61 6e 64 24 2c 22 20 2d 71 75 69 74 20 22 |mmand$," -quit "| 00000060 29 3a 74 61 69 6c 24 3d 22 22 0d 00 07 3c e7 20 |):tail$=""...<. | 00000070 49 25 20 8c 20 74 61 69 6c 24 3d c1 63 6f 6d 6d |I% . tail$=.comm| 00000080 61 6e 64 24 2c a7 63 6f 6d 6d 61 6e 64 24 2c 22 |and$,.command$,"| 00000090 20 22 2c 49 25 2b a9 28 22 20 2d 71 75 69 74 20 | ",I%+.(" -quit | 000000a0 22 29 29 2b 31 29 0d 00 08 47 c8 99 20 22 58 4f |"))+1)...G.. "XO| 000000b0 53 5f 52 65 61 64 41 72 67 73 22 2c 22 6f 6e 2f |S_ReadArgs","on/| 000000c0 73 2c 6f 66 66 2f 73 2c 73 6d 61 73 68 2f 73 2c |s,off/s,smash/s,| 000000d0 70 65 72 63 65 6e 74 61 67 65 22 2c 74 61 69 6c |percentage",tail| 000000e0 24 2c 72 65 73 75 6c 74 25 2c 35 31 32 0d 00 09 |$,result%,512...| 000000f0 04 0d 00 0a 0c 70 65 72 25 20 3d 20 30 0d 00 0b |.....per% = 0...| 00000100 04 0d 00 0c 24 e7 20 72 65 73 75 6c 74 25 21 30 |....$. result%!0| 00000110 20 20 8c 20 c8 99 20 22 48 6f 75 72 67 6c 61 73 | . .. "Hourglas| 00000120 73 5f 4f 6e 22 0d 00 0d 25 e7 20 72 65 73 75 6c |s_On"...%. resul| 00000130 74 25 21 34 20 20 8c 20 c8 99 20 22 48 6f 75 72 |t%!4 . .. "Hour| 00000140 67 6c 61 73 73 5f 4f 66 66 22 0d 00 0e 27 e7 20 |glass_Off"...'. | 00000150 72 65 73 75 6c 74 25 21 38 20 20 8c 20 c8 99 20 |result%!8 . .. | 00000160 22 48 6f 75 72 67 6c 61 73 73 5f 53 6d 61 73 68 |"Hourglass_Smash| 00000170 22 0d 00 0f 12 e7 20 72 65 73 75 6c 74 25 21 31 |"..... result%!1| 00000180 32 20 8c 0d 00 10 22 20 20 70 24 20 3d 20 a4 72 |2 ...." p$ = .r| 00000190 65 61 64 5f 76 61 6c 75 65 28 72 65 73 75 6c 74 |ead_value(result| 000001a0 25 21 31 32 29 0d 00 11 22 20 20 c8 99 20 22 48 |%!12)..." .. "H| 000001b0 6f 75 72 67 6c 61 73 73 5f 50 65 72 63 65 6e 74 |ourglass_Percent| 000001c0 61 67 65 22 2c 2c 33 0d 00 12 25 20 20 c8 99 20 |age",,3...% .. | 000001d0 22 48 6f 75 72 67 6c 61 73 73 5f 50 65 72 63 65 |"Hourglass_Perce| 000001e0 6e 74 61 67 65 22 2c bb 28 70 24 29 0d 00 13 05 |ntage",.(p$)....| 000001f0 cd 0d 00 14 05 e0 0d 00 15 04 0d 00 16 17 dd 20 |............... | 00000200 a4 72 65 61 64 5f 76 61 6c 75 65 28 70 74 72 25 |.read_value(ptr%| 00000210 29 0d 00 17 08 ea 20 70 24 0d 00 18 12 e3 20 6c |)..... p$..... l| 00000220 70 25 20 3d 20 30 20 b8 20 32 30 0d 00 19 38 20 |p% = 0 . 20...8 | 00000230 20 e7 20 3f 28 70 74 72 25 2b 6c 70 25 29 20 3e | . ?(ptr%+lp%) >| 00000240 20 33 32 20 8c 20 70 24 2b 3d bd 28 3f 28 70 74 | 32 . p$+=.(?(pt| 00000250 72 25 2b 6c 70 25 29 29 20 8b 20 6c 70 25 20 3d |r%+lp%)) . lp% =| 00000260 20 32 32 0d 00 1a 05 ed 0d 00 1b 08 3d 20 70 24 | 22.........= p$| 00000270 0d ff |..| 00000272