Home » Archimedes archive » Micro User » MU 1991-06.adf » PD-Stuff » Utilities/!FileCheck/!RUNIMAGE
Utilities/!FileCheck/!RUNIMAGE
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 » Micro User » MU 1991-06.adf » PD-Stuff |
Filename: | Utilities/!FileCheck/!RUNIMAGE |
Read OK: | ✔ |
File size: | 0772 bytes |
Load address: | 0000 |
Exec address: | 0000 |
File contents
10ON ERROR REPORT:PRINT;" at line ";ERL:END 20*SET !FILECHECK$PRESENT I am here 30exit = FALSE 40obj$="":to$="":len$="" 50n$="!FileCheck" 60DIM q% 64 70SYS "Wimp_Initialise",200,&4b534154,n$ TO, taskhandle% 80REPEAT 90ON ERROR PROCerror(ERR,REPORT$) 100REPEAT 110SYS"Wimp_PollIdle",0,q% TO action% 120IF action%=17 OR action%=18 THEN 130IF q%!40=&2000 THEN PROCcheckem 140IF q%!16=0 THEN exit=TRUE 150ENDIF 160ENDCASE 170UNTIL exit=TRUE 175ON ERROR PROCquitit 180PROCexit 190UNTIL exit=TRUE 200DEFPROCquitit 210SYS "Wimp_CloseDown",taskhandle%,&4b534154 220*UNSET !FILECHECK$PRESENT 230END 240ENDPROC 250DEFPROCcheck(obj$,len$,to$) 260file%=OPENIN("<OBEY$DIR>."+obj$):IF file%=0 THEN CLOSE#file%:ENDPROC ELSE CLOSE#file% 270file%=OPENIN("<OBEY$DIR>."+len$) 280IF file%=0 THEN CLOSE#file%:PROCcreate(obj$,len$):ENDPROC 290INPUT#file%,size% 300CLOSE#file% 310file%=OPENIN("<OBEY$DIR>."+obj$) 320act%=EXT#file% 330CLOSE #file% 340IF act%>size% THEN PROCnotify(obj$,to$) 350IF act%<size% THEN PROCcreate(obj$,len$) 360ENDPROC 370DEFPROCcreate(obj$,len$) 380file%=OPENIN("<OBEY$DIR>."+obj$) 390out%=OPENOUT("<OBEY$DIR>."+len$) 400PRINT#out%,EXT#file% 410CLOSE#out% 420CLOSE#file% 430ENDPROC 440DEFPROCnotify(obj$,to$) 450SYS "Wimp_StartTask","ACCESS <OBEY$DIR>."+obj$+" RWrw" 460SYS "Wimp_StartTask","RENAME <OBEY$DIR>."+obj$+" <OBEY$DIR>.!Virus"+to$ 470PROCerror(1,"A "+obj$+" file on your system has increased in length.") 480IF ret=2 THEN ENDPROC 490PROCerror(1,"I have renamed the offending file <OBEY$DIR>.!Virus"+to$) 500IF ret=2 THEN ENDPROC 510PROCerror(1,"<OBEY$DIR> can be revealed by *SHOW") 520IF ret=2 THEN ENDPROC 530PROCerror(1,"For more information see !FileCheck.!Help") 540IF ret=2 THEN ENDPROC 550PROCerror(1,"(c) Glyn Davies 1991") 560IF ret=2 THEN ENDPROC 570SYS "Wimp_StartTask","Close" 580ENDPROC 590DEFPROCerror(null,err$) 600SYS "Wimp_ReportError","****"+err$,&17,"Warning from !FileCheck" TO,ret 610DEFPROCcheckem 620SYS "Hourglass_On" 630PROCcheck("!Boot","!Bootlen","boot") 640PROCcheck("!RunImage","!Imagelen","Img") 650PROCcheck("!Run","!Runlen","Run") 660SYS "Hourglass_Off" 670ENDPROC 680DEFPROCexit 690SYS"Wimp_ReportError","****"+"I have been told to quit should I?",&17,"Warning from !FileCheck" TO ,ret 700IF ret=2 THEN exit=FALSE 710ENDPROC
� � �:�;" at line ";�:� %*SET !FILECHECK$PRESENT I am here exit = � (obj$="":to$="":len$="" 2n$="!FileCheck" <� q% 64 F8ș "Wimp_Initialise",200,&4b534154,n$ �, taskhandle% P� Z� � �error(�,�$) d� n$ș"Wimp_PollIdle",0,q% � action% x� action%=17 � action%=18 � �� q%!40=&2000 � �checkem �� q%!16=0 � exit=� �� �� �� exit=� �� � �quitit � �exit �� exit=� ���quitit �-ș "Wimp_CloseDown",taskhandle%,&4b534154 �*UNSET !FILECHECK$PRESENT �� �� ���check(obj$,len$,to$) ?file%=�("<OBEY$DIR>."+obj$):� file%=0 � �#file%:� � �#file% file%=�("<OBEY$DIR>."+len$) ,� file%=0 � �#file%:�create(obj$,len$):� "�#file%,size% ,�#file% 6file%=�("<OBEY$DIR>."+obj$) @act%=�#file% J� #file% T$� act%>size% � �notify(obj$,to$) ^%� act%<size% � �create(obj$,len$) h� r��create(obj$,len$) |file%=�("<OBEY$DIR>."+obj$) �out%=�("<OBEY$DIR>."+len$) ��#out%,�#file% � �#out% ��#file% �� ���notify(obj$,to$) �9ș "Wimp_StartTask","ACCESS <OBEY$DIR>."+obj$+" RWrw" �Jș "Wimp_StartTask","RENAME <OBEY$DIR>."+obj$+" <OBEY$DIR>.!Virus"+to$ �G�error(1,"A "+obj$+" file on your system has increased in length.") �� ret=2 � � �G�error(1,"I have renamed the offending file <OBEY$DIR>.!Virus"+to$) �� ret=2 � � �3�error(1,"<OBEY$DIR> can be revealed by *SHOW") � ret=2 � � 9�error(1,"For more information see !FileCheck.!Help") � ret=2 � � &$�error(1,"(c) Glyn Davies 1991") 0� ret=2 � � :ș "Wimp_StartTask","Close" D� N��error(null,err$) XIș "Wimp_ReportError","****"+err$,&17,"Warning from !FileCheck" �,ret b ��checkem lș "Hourglass_On" v%�check("!Boot","!Bootlen","boot") �)�check("!RunImage","!Imagelen","Img") �"�check("!Run","!Runlen","Run") �ș "Hourglass_Off" �� � ��exit �iș"Wimp_ReportError","****"+"I have been told to quit should I?",&17,"Warning from !FileCheck" � ,ret �� ret=2 � exit=� �� �
00000000 0d 00 0a 1b ee 20 85 20 f6 3a f1 3b 22 20 61 74 |..... . .:.;" at| 00000010 20 6c 69 6e 65 20 22 3b 9e 3a e0 0d 00 14 25 2a | line ";.:....%*| 00000020 53 45 54 20 21 46 49 4c 45 43 48 45 43 4b 24 50 |SET !FILECHECK$P| 00000030 52 45 53 45 4e 54 20 49 20 61 6d 20 68 65 72 65 |RESENT I am here| 00000040 0d 00 1e 0c 65 78 69 74 20 3d 20 a3 0d 00 28 1a |....exit = ...(.| 00000050 6f 62 6a 24 3d 22 22 3a 74 6f 24 3d 22 22 3a 6c |obj$="":to$="":l| 00000060 65 6e 24 3d 22 22 0d 00 32 13 6e 24 3d 22 21 46 |en$=""..2.n$="!F| 00000070 69 6c 65 43 68 65 63 6b 22 0d 00 3c 0b de 20 71 |ileCheck"..<.. q| 00000080 25 20 36 34 0d 00 46 38 c8 99 20 22 57 69 6d 70 |% 64..F8.. "Wimp| 00000090 5f 49 6e 69 74 69 61 6c 69 73 65 22 2c 32 30 30 |_Initialise",200| 000000a0 2c 26 34 62 35 33 34 31 35 34 2c 6e 24 20 b8 2c |,&4b534154,n$ .,| 000000b0 20 74 61 73 6b 68 61 6e 64 6c 65 25 0d 00 50 05 | taskhandle%..P.| 000000c0 f5 0d 00 5a 14 ee 20 85 20 f2 65 72 72 6f 72 28 |...Z.. . .error(| 000000d0 9f 2c f6 24 29 0d 00 64 05 f5 0d 00 6e 24 c8 99 |.,.$)..d....n$..| 000000e0 22 57 69 6d 70 5f 50 6f 6c 6c 49 64 6c 65 22 2c |"Wimp_PollIdle",| 000000f0 30 2c 71 25 20 b8 20 61 63 74 69 6f 6e 25 0d 00 |0,q% . action%..| 00000100 78 1f e7 20 61 63 74 69 6f 6e 25 3d 31 37 20 84 |x.. action%=17 .| 00000110 20 61 63 74 69 6f 6e 25 3d 31 38 20 8c 0d 00 82 | action%=18 ....| 00000120 1c e7 20 71 25 21 34 30 3d 26 32 30 30 30 20 8c |.. q%!40=&2000 .| 00000130 20 f2 63 68 65 63 6b 65 6d 0d 00 8c 16 e7 20 71 | .checkem..... q| 00000140 25 21 31 36 3d 30 20 8c 20 65 78 69 74 3d b9 0d |%!16=0 . exit=..| 00000150 00 96 05 cd 0d 00 a0 05 cb 0d 00 aa 0c fd 20 65 |.............. e| 00000160 78 69 74 3d b9 0d 00 af 0f ee 20 85 20 f2 71 75 |xit=...... . .qu| 00000170 69 74 69 74 0d 00 b4 09 f2 65 78 69 74 0d 00 be |itit.....exit...| 00000180 0c fd 20 65 78 69 74 3d b9 0d 00 c8 0c dd f2 71 |.. exit=.......q| 00000190 75 69 74 69 74 0d 00 d2 2d c8 99 20 22 57 69 6d |uitit...-.. "Wim| 000001a0 70 5f 43 6c 6f 73 65 44 6f 77 6e 22 2c 74 61 73 |p_CloseDown",tas| 000001b0 6b 68 61 6e 64 6c 65 25 2c 26 34 62 35 33 34 31 |khandle%,&4b5341| 000001c0 35 34 0d 00 dc 1d 2a 55 4e 53 45 54 20 21 46 49 |54....*UNSET !FI| 000001d0 4c 45 43 48 45 43 4b 24 50 52 45 53 45 4e 54 0d |LECHECK$PRESENT.| 000001e0 00 e6 05 e0 0d 00 f0 05 e1 0d 00 fa 1a dd f2 63 |...............c| 000001f0 68 65 63 6b 28 6f 62 6a 24 2c 6c 65 6e 24 2c 74 |heck(obj$,len$,t| 00000200 6f 24 29 0d 01 04 3f 66 69 6c 65 25 3d 8e 28 22 |o$)...?file%=.("| 00000210 3c 4f 42 45 59 24 44 49 52 3e 2e 22 2b 6f 62 6a |<OBEY$DIR>."+obj| 00000220 24 29 3a e7 20 66 69 6c 65 25 3d 30 20 8c 20 d9 |$):. file%=0 . .| 00000230 23 66 69 6c 65 25 3a e1 20 8b 20 d9 23 66 69 6c |#file%:. . .#fil| 00000240 65 25 0d 01 0e 1f 66 69 6c 65 25 3d 8e 28 22 3c |e%....file%=.("<| 00000250 4f 42 45 59 24 44 49 52 3e 2e 22 2b 6c 65 6e 24 |OBEY$DIR>."+len$| 00000260 29 0d 01 18 2c e7 20 66 69 6c 65 25 3d 30 20 8c |)...,. file%=0 .| 00000270 20 d9 23 66 69 6c 65 25 3a f2 63 72 65 61 74 65 | .#file%:.create| 00000280 28 6f 62 6a 24 2c 6c 65 6e 24 29 3a e1 0d 01 22 |(obj$,len$):..."| 00000290 11 e8 23 66 69 6c 65 25 2c 73 69 7a 65 25 0d 01 |..#file%,size%..| 000002a0 2c 0b d9 23 66 69 6c 65 25 0d 01 36 1f 66 69 6c |,..#file%..6.fil| 000002b0 65 25 3d 8e 28 22 3c 4f 42 45 59 24 44 49 52 3e |e%=.("<OBEY$DIR>| 000002c0 2e 22 2b 6f 62 6a 24 29 0d 01 40 10 61 63 74 25 |."+obj$)..@.act%| 000002d0 3d a2 23 66 69 6c 65 25 0d 01 4a 0c d9 20 23 66 |=.#file%..J.. #f| 000002e0 69 6c 65 25 0d 01 54 24 e7 20 61 63 74 25 3e 73 |ile%..T$. act%>s| 000002f0 69 7a 65 25 20 8c 20 f2 6e 6f 74 69 66 79 28 6f |ize% . .notify(o| 00000300 62 6a 24 2c 74 6f 24 29 0d 01 5e 25 e7 20 61 63 |bj$,to$)..^%. ac| 00000310 74 25 3c 73 69 7a 65 25 20 8c 20 f2 63 72 65 61 |t%<size% . .crea| 00000320 74 65 28 6f 62 6a 24 2c 6c 65 6e 24 29 0d 01 68 |te(obj$,len$)..h| 00000330 05 e1 0d 01 72 17 dd f2 63 72 65 61 74 65 28 6f |....r...create(o| 00000340 62 6a 24 2c 6c 65 6e 24 29 0d 01 7c 1f 66 69 6c |bj$,len$)..|.fil| 00000350 65 25 3d 8e 28 22 3c 4f 42 45 59 24 44 49 52 3e |e%=.("<OBEY$DIR>| 00000360 2e 22 2b 6f 62 6a 24 29 0d 01 86 1e 6f 75 74 25 |."+obj$)....out%| 00000370 3d ae 28 22 3c 4f 42 45 59 24 44 49 52 3e 2e 22 |=.("<OBEY$DIR>."| 00000380 2b 6c 65 6e 24 29 0d 01 90 12 f1 23 6f 75 74 25 |+len$).....#out%| 00000390 2c a2 23 66 69 6c 65 25 0d 01 9a 0a d9 23 6f 75 |,.#file%.....#ou| 000003a0 74 25 0d 01 a4 0b d9 23 66 69 6c 65 25 0d 01 ae |t%.....#file%...| 000003b0 05 e1 0d 01 b8 16 dd f2 6e 6f 74 69 66 79 28 6f |........notify(o| 000003c0 62 6a 24 2c 74 6f 24 29 0d 01 c2 39 c8 99 20 22 |bj$,to$)...9.. "| 000003d0 57 69 6d 70 5f 53 74 61 72 74 54 61 73 6b 22 2c |Wimp_StartTask",| 000003e0 22 41 43 43 45 53 53 20 3c 4f 42 45 59 24 44 49 |"ACCESS <OBEY$DI| 000003f0 52 3e 2e 22 2b 6f 62 6a 24 2b 22 20 52 57 72 77 |R>."+obj$+" RWrw| 00000400 22 0d 01 cc 4a c8 99 20 22 57 69 6d 70 5f 53 74 |"...J.. "Wimp_St| 00000410 61 72 74 54 61 73 6b 22 2c 22 52 45 4e 41 4d 45 |artTask","RENAME| 00000420 20 3c 4f 42 45 59 24 44 49 52 3e 2e 22 2b 6f 62 | <OBEY$DIR>."+ob| 00000430 6a 24 2b 22 20 3c 4f 42 45 59 24 44 49 52 3e 2e |j$+" <OBEY$DIR>.| 00000440 21 56 69 72 75 73 22 2b 74 6f 24 0d 01 d6 47 f2 |!Virus"+to$...G.| 00000450 65 72 72 6f 72 28 31 2c 22 41 20 22 2b 6f 62 6a |error(1,"A "+obj| 00000460 24 2b 22 20 66 69 6c 65 20 6f 6e 20 79 6f 75 72 |$+" file on your| 00000470 20 73 79 73 74 65 6d 20 68 61 73 20 69 6e 63 72 | system has incr| 00000480 65 61 73 65 64 20 69 6e 20 6c 65 6e 67 74 68 2e |eased in length.| 00000490 22 29 0d 01 e0 0f e7 20 72 65 74 3d 32 20 8c 20 |")..... ret=2 . | 000004a0 e1 0d 01 ea 47 f2 65 72 72 6f 72 28 31 2c 22 49 |....G.error(1,"I| 000004b0 20 68 61 76 65 20 72 65 6e 61 6d 65 64 20 74 68 | have renamed th| 000004c0 65 20 6f 66 66 65 6e 64 69 6e 67 20 66 69 6c 65 |e offending file| 000004d0 20 3c 4f 42 45 59 24 44 49 52 3e 2e 21 56 69 72 | <OBEY$DIR>.!Vir| 000004e0 75 73 22 2b 74 6f 24 29 0d 01 f4 0f e7 20 72 65 |us"+to$)..... re| 000004f0 74 3d 32 20 8c 20 e1 0d 01 fe 33 f2 65 72 72 6f |t=2 . ....3.erro| 00000500 72 28 31 2c 22 3c 4f 42 45 59 24 44 49 52 3e 20 |r(1,"<OBEY$DIR> | 00000510 63 61 6e 20 62 65 20 72 65 76 65 61 6c 65 64 20 |can be revealed | 00000520 62 79 20 2a 53 48 4f 57 22 29 0d 02 08 0f e7 20 |by *SHOW")..... | 00000530 72 65 74 3d 32 20 8c 20 e1 0d 02 12 39 f2 65 72 |ret=2 . ....9.er| 00000540 72 6f 72 28 31 2c 22 46 6f 72 20 6d 6f 72 65 20 |ror(1,"For more | 00000550 69 6e 66 6f 72 6d 61 74 69 6f 6e 20 73 65 65 20 |information see | 00000560 21 46 69 6c 65 43 68 65 63 6b 2e 21 48 65 6c 70 |!FileCheck.!Help| 00000570 22 29 0d 02 1c 0f e7 20 72 65 74 3d 32 20 8c 20 |")..... ret=2 . | 00000580 e1 0d 02 26 24 f2 65 72 72 6f 72 28 31 2c 22 28 |...&$.error(1,"(| 00000590 63 29 20 47 6c 79 6e 20 44 61 76 69 65 73 20 31 |c) Glyn Davies 1| 000005a0 39 39 31 22 29 0d 02 30 0f e7 20 72 65 74 3d 32 |991")..0.. ret=2| 000005b0 20 8c 20 e1 0d 02 3a 1f c8 99 20 22 57 69 6d 70 | . ...:... "Wimp| 000005c0 5f 53 74 61 72 74 54 61 73 6b 22 2c 22 43 6c 6f |_StartTask","Clo| 000005d0 73 65 22 0d 02 44 05 e1 0d 02 4e 16 dd f2 65 72 |se"..D....N...er| 000005e0 72 6f 72 28 6e 75 6c 6c 2c 65 72 72 24 29 0d 02 |ror(null,err$)..| 000005f0 58 49 c8 99 20 22 57 69 6d 70 5f 52 65 70 6f 72 |XI.. "Wimp_Repor| 00000600 74 45 72 72 6f 72 22 2c 22 2a 2a 2a 2a 22 2b 65 |tError","****"+e| 00000610 72 72 24 2c 26 31 37 2c 22 57 61 72 6e 69 6e 67 |rr$,&17,"Warning| 00000620 20 66 72 6f 6d 20 21 46 69 6c 65 43 68 65 63 6b | from !FileCheck| 00000630 22 20 b8 2c 72 65 74 0d 02 62 0d dd f2 63 68 65 |" .,ret..b...che| 00000640 63 6b 65 6d 0d 02 6c 15 c8 99 20 22 48 6f 75 72 |ckem..l... "Hour| 00000650 67 6c 61 73 73 5f 4f 6e 22 0d 02 76 25 f2 63 68 |glass_On"..v%.ch| 00000660 65 63 6b 28 22 21 42 6f 6f 74 22 2c 22 21 42 6f |eck("!Boot","!Bo| 00000670 6f 74 6c 65 6e 22 2c 22 62 6f 6f 74 22 29 0d 02 |otlen","boot")..| 00000680 80 29 f2 63 68 65 63 6b 28 22 21 52 75 6e 49 6d |.).check("!RunIm| 00000690 61 67 65 22 2c 22 21 49 6d 61 67 65 6c 65 6e 22 |age","!Imagelen"| 000006a0 2c 22 49 6d 67 22 29 0d 02 8a 22 f2 63 68 65 63 |,"Img")...".chec| 000006b0 6b 28 22 21 52 75 6e 22 2c 22 21 52 75 6e 6c 65 |k("!Run","!Runle| 000006c0 6e 22 2c 22 52 75 6e 22 29 0d 02 94 16 c8 99 20 |n","Run")...... | 000006d0 22 48 6f 75 72 67 6c 61 73 73 5f 4f 66 66 22 0d |"Hourglass_Off".| 000006e0 02 9e 05 e1 0d 02 a8 0a dd f2 65 78 69 74 0d 02 |..........exit..| 000006f0 b2 69 c8 99 22 57 69 6d 70 5f 52 65 70 6f 72 74 |.i.."Wimp_Report| 00000700 45 72 72 6f 72 22 2c 22 2a 2a 2a 2a 22 2b 22 49 |Error","****"+"I| 00000710 20 68 61 76 65 20 62 65 65 6e 20 74 6f 6c 64 20 | have been told | 00000720 74 6f 20 71 75 69 74 20 73 68 6f 75 6c 64 20 49 |to quit should I| 00000730 3f 22 2c 26 31 37 2c 22 57 61 72 6e 69 6e 67 20 |?",&17,"Warning | 00000740 66 72 6f 6d 20 21 46 69 6c 65 43 68 65 63 6b 22 |from !FileCheck"| 00000750 20 b8 20 2c 72 65 74 0d 02 bc 14 e7 20 72 65 74 | . ,ret..... ret| 00000760 3d 32 20 8c 20 65 78 69 74 3d a3 0d 02 c6 05 e1 |=2 . exit=......| 00000770 0d ff |..| 00000772