Home » Archimedes archive » Acorn User » Acorn User - Updated Shareware Collection (1994).adf » Programs » AppEnsure/Source/MakeUtil
AppEnsure/Source/MakeUtil
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 » Acorn User - Updated Shareware Collection (1994).adf » Programs |
Filename: | AppEnsure/Source/MakeUtil |
Read OK: | ✔ |
File size: | 04A6 bytes |
Load address: | 0000 |
Exec address: | 0000 |
File contents
1REM >MakeUtil 2REM Basic assemble Utility shell 3REM LEN Cy Booker 1991, 1992, 1993 4 5 Note that on Utility entry: 6 R0 = pointer to command line (i.e. name of file) 7 R1 = pointer to command tail (i.e. first parameter / control) 8 R12 = pointer to start of 1024 byte workspace 9 R13 = pointer to end of 1024 byte workspace 10 R14 = return address, with PSR_V clear 11 Processor is in USR mode, interrupts enabled 12 13 You can call other utilities from within utilities 14 15 You MUST NOT call OS_Exit 16: 17DEF PROC_Make_Utility(u$) 18 PROC_Make_Named_Utility(u$, u$) 19ENDPROC 20: 21DEF PROC_Make_Named_Utility(u$, name$) 22 PROC_Make_Code(u$, name$, &FFC) 23ENDPROC 24: 25DEF PROC_Make_Code(u$, name$, filetype%) 26LOCAL L%, O%, P%, pass% 27 L% = code% + code_size% 28 FOR pass% = %1100 TO %1110 STEP 2 29 P% = 0 30 O% = code% 31 P% = EVAL("FN_assemble_"+ u$) 32 IF (pass% AND 2)= 0 THEN 33 FOR P%= code% TO O%-1 STEP 4 34 !P%=&CBCBCBCB 35 NEXT P% 36 ENDIF 37 NEXT pass% 38 SYS "OS_File", 10, "<Library$Dir>."+ name$, filetype%,, code%, O% 39 PRINT"Made utility `"+ name$+ "' size: "; O%-code% 40ENDPROC 41: 42
� >MakeUtil &� Basic assemble Utility shell &� � Cy Booker 1991, 1992, 1993 ' Note that on Utility entry: < R0 = pointer to command line (i.e. name of file) I R1 = pointer to command tail (i.e. first parameter / control) 9 R12 = pointer to start of 1024 byte workspace 7 R13 = pointer to end of 1024 byte workspace 2 R14 = return address, with PSR_V clear 6 Processor is in � mode, interrupts enabled > You can call other utilities from within utilities # You MUST � call OS_Exit : � �_Make_Utility(u$) " �_Make_Named_Utility(u$, u$) � : %� �_Make_Named_Utility(u$, name$) " �_Make_Code(u$, name$, &FFC) � : '� �_Make_Code(u$, name$, filetype%) � L%, O%, P%, pass% L% = code% + code_size% ! � pass% = %1100 � %1110 � 2 P% = 0 O% = code% " P% = �("FN_assemble_"+ u$) � (pass% � 2)= 0 � ! � P%= code% � O%-1 � 4 " !P%=&CBCBCBCB # � P% $ � % � pass% &F ș "OS_File", 10, "<Library$Dir>."+ name$, filetype%,, code%, O% '4 �"Made utility `"+ name$+ "' size: "; O%-code% (� ): * �
00000000 0d 00 01 10 f4 20 20 3e 4d 61 6b 65 55 74 69 6c |..... >MakeUtil| 00000010 0d 00 02 26 f4 20 20 20 20 20 42 61 73 69 63 20 |...&. Basic | 00000020 61 73 73 65 6d 62 6c 65 20 55 74 69 6c 69 74 79 |assemble Utility| 00000030 20 73 68 65 6c 6c 0d 00 03 26 f4 20 20 20 20 20 | shell...&. | 00000040 a9 20 43 79 20 42 6f 6f 6b 65 72 20 31 39 39 31 |. Cy Booker 1991| 00000050 2c 20 31 39 39 32 2c 20 31 39 39 33 0d 00 04 04 |, 1992, 1993....| 00000060 0d 00 05 27 20 20 20 20 20 20 20 20 4e 6f 74 65 |...' Note| 00000070 20 74 68 61 74 20 6f 6e 20 55 74 69 6c 69 74 79 | that on Utility| 00000080 20 65 6e 74 72 79 3a 0d 00 06 3c 20 20 20 20 20 | entry:...< | 00000090 20 20 20 52 30 20 3d 20 70 6f 69 6e 74 65 72 20 | R0 = pointer | 000000a0 74 6f 20 63 6f 6d 6d 61 6e 64 20 6c 69 6e 65 20 |to command line | 000000b0 28 69 2e 65 2e 20 6e 61 6d 65 20 6f 66 20 66 69 |(i.e. name of fi| 000000c0 6c 65 29 0d 00 07 49 20 20 20 20 20 20 20 20 52 |le)...I R| 000000d0 31 20 3d 20 70 6f 69 6e 74 65 72 20 74 6f 20 63 |1 = pointer to c| 000000e0 6f 6d 6d 61 6e 64 20 74 61 69 6c 20 28 69 2e 65 |ommand tail (i.e| 000000f0 2e 20 66 69 72 73 74 20 70 61 72 61 6d 65 74 65 |. first paramete| 00000100 72 20 2f 20 63 6f 6e 74 72 6f 6c 29 0d 00 08 39 |r / control)...9| 00000110 20 20 20 20 20 20 20 20 52 31 32 20 3d 20 70 6f | R12 = po| 00000120 69 6e 74 65 72 20 74 6f 20 73 74 61 72 74 20 6f |inter to start o| 00000130 66 20 31 30 32 34 20 62 79 74 65 20 77 6f 72 6b |f 1024 byte work| 00000140 73 70 61 63 65 0d 00 09 37 20 20 20 20 20 20 20 |space...7 | 00000150 20 52 31 33 20 3d 20 70 6f 69 6e 74 65 72 20 74 | R13 = pointer t| 00000160 6f 20 65 6e 64 20 6f 66 20 31 30 32 34 20 62 79 |o end of 1024 by| 00000170 74 65 20 77 6f 72 6b 73 70 61 63 65 0d 00 0a 32 |te workspace...2| 00000180 20 20 20 20 20 20 20 20 52 31 34 20 3d 20 72 65 | R14 = re| 00000190 74 75 72 6e 20 61 64 64 72 65 73 73 2c 20 77 69 |turn address, wi| 000001a0 74 68 20 50 53 52 5f 56 20 63 6c 65 61 72 0d 00 |th PSR_V clear..| 000001b0 0b 36 20 20 20 20 20 20 20 20 50 72 6f 63 65 73 |.6 Proces| 000001c0 73 6f 72 20 69 73 20 69 6e 20 ba 20 6d 6f 64 65 |sor is in . mode| 000001d0 2c 20 69 6e 74 65 72 72 75 70 74 73 20 65 6e 61 |, interrupts ena| 000001e0 62 6c 65 64 0d 00 0c 04 0d 00 0d 3e 20 20 20 20 |bled.......> | 000001f0 20 20 20 20 59 6f 75 20 63 61 6e 20 63 61 6c 6c | You can call| 00000200 20 6f 74 68 65 72 20 75 74 69 6c 69 74 69 65 73 | other utilities| 00000210 20 66 72 6f 6d 20 77 69 74 68 69 6e 20 75 74 69 | from within uti| 00000220 6c 69 74 69 65 73 0d 00 0e 04 0d 00 0f 23 20 20 |lities.......# | 00000230 20 20 20 20 20 20 59 6f 75 20 4d 55 53 54 20 ac | You MUST .| 00000240 20 63 61 6c 6c 20 4f 53 5f 45 78 69 74 0d 00 10 | call OS_Exit...| 00000250 05 3a 0d 00 11 18 dd 20 f2 5f 4d 61 6b 65 5f 55 |.:..... ._Make_U| 00000260 74 69 6c 69 74 79 28 75 24 29 0d 00 12 22 20 20 |tility(u$)..." | 00000270 f2 5f 4d 61 6b 65 5f 4e 61 6d 65 64 5f 55 74 69 |._Make_Named_Uti| 00000280 6c 69 74 79 28 75 24 2c 20 75 24 29 0d 00 13 05 |lity(u$, u$)....| 00000290 e1 0d 00 14 05 3a 0d 00 15 25 dd 20 f2 5f 4d 61 |.....:...%. ._Ma| 000002a0 6b 65 5f 4e 61 6d 65 64 5f 55 74 69 6c 69 74 79 |ke_Named_Utility| 000002b0 28 75 24 2c 20 6e 61 6d 65 24 29 0d 00 16 22 20 |(u$, name$)..." | 000002c0 20 f2 5f 4d 61 6b 65 5f 43 6f 64 65 28 75 24 2c | ._Make_Code(u$,| 000002d0 20 6e 61 6d 65 24 2c 20 26 46 46 43 29 0d 00 17 | name$, &FFC)...| 000002e0 05 e1 0d 00 18 05 3a 0d 00 19 27 dd 20 f2 5f 4d |......:...'. ._M| 000002f0 61 6b 65 5f 43 6f 64 65 28 75 24 2c 20 6e 61 6d |ake_Code(u$, nam| 00000300 65 24 2c 20 66 69 6c 65 74 79 70 65 25 29 0d 00 |e$, filetype%)..| 00000310 1a 17 ea 20 4c 25 2c 20 4f 25 2c 20 50 25 2c 20 |... L%, O%, P%, | 00000320 70 61 73 73 25 0d 00 1b 1d 20 20 4c 25 20 3d 20 |pass%.... L% = | 00000330 63 6f 64 65 25 20 2b 20 63 6f 64 65 5f 73 69 7a |code% + code_siz| 00000340 65 25 0d 00 1c 21 20 20 e3 20 70 61 73 73 25 20 |e%...! . pass% | 00000350 3d 20 25 31 31 30 30 20 b8 20 25 31 31 31 30 20 |= %1100 . %1110 | 00000360 88 20 32 0d 00 1d 0e 20 20 20 20 50 25 20 3d 20 |. 2.... P% = | 00000370 30 0d 00 1e 12 20 20 20 20 4f 25 20 3d 20 63 6f |0.... O% = co| 00000380 64 65 25 0d 00 1f 22 20 20 20 20 50 25 20 3d 20 |de%..." P% = | 00000390 a0 28 22 46 4e 5f 61 73 73 65 6d 62 6c 65 5f 22 |.("FN_assemble_"| 000003a0 2b 20 75 24 29 0d 00 20 1a 20 20 20 20 e7 20 28 |+ u$).. . . (| 000003b0 70 61 73 73 25 20 80 20 32 29 3d 20 30 20 8c 0d |pass% . 2)= 0 ..| 000003c0 00 21 20 20 20 20 20 20 20 e3 20 50 25 3d 20 63 |.! . P%= c| 000003d0 6f 64 65 25 20 b8 20 4f 25 2d 31 20 88 20 34 0d |ode% . O%-1 . 4.| 000003e0 00 22 19 20 20 20 20 20 20 20 20 21 50 25 3d 26 |.". !P%=&| 000003f0 43 42 43 42 43 42 43 42 0d 00 23 0e 20 20 20 20 |CBCBCBCB..#. | 00000400 20 20 ed 20 50 25 0d 00 24 09 20 20 20 20 cd 0d | . P%..$. ..| 00000410 00 25 0d 20 20 ed 20 70 61 73 73 25 0d 00 26 46 |.%. . pass%..&F| 00000420 20 20 c8 99 20 22 4f 53 5f 46 69 6c 65 22 2c 20 | .. "OS_File", | 00000430 31 30 2c 20 22 3c 4c 69 62 72 61 72 79 24 44 69 |10, "<Library$Di| 00000440 72 3e 2e 22 2b 20 6e 61 6d 65 24 2c 20 66 69 6c |r>."+ name$, fil| 00000450 65 74 79 70 65 25 2c 2c 20 63 6f 64 65 25 2c 20 |etype%,, code%, | 00000460 4f 25 0d 00 27 34 20 20 f1 22 4d 61 64 65 20 75 |O%..'4 ."Made u| 00000470 74 69 6c 69 74 79 20 60 22 2b 20 6e 61 6d 65 24 |tility `"+ name$| 00000480 2b 20 22 27 20 73 69 7a 65 3a 20 22 3b 20 4f 25 |+ "' size: "; O%| 00000490 2d 63 6f 64 65 25 0d 00 28 05 e1 0d 00 29 05 3a |-code%..(....).:| 000004a0 0d 00 2a 04 0d ff |..*...| 000004a6