Home » Archimedes archive » Archimedes World » archimedes_world_volume_15_issue_1_scp.adf » !ProFiler_ProFiler » !ProFiler/Utilities/GenCon/Convert
!ProFiler/Utilities/GenCon/Convert
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 » Archimedes World » archimedes_world_volume_15_issue_1_scp.adf » !ProFiler_ProFiler |
Filename: | !ProFiler/Utilities/GenCon/Convert |
Read OK: | ✔ |
File size: | 025D bytes |
Load address: | 0000 |
Exec address: | 0000 |
File contents
10REM Execute converter 11REM Usage: Convert -parm <converter> <input> <output> 20 30END=PAGE+&10000 40ONERROROSCLI("%Set GenCon$Result """+REPORT$+""""):END 50SYS"OS_GetEnv"TOE$ 60E$=MID$(E$,INSTR(E$,"-parm")+6) 70C$=FNpar(E$):I$=FNpar(E$):O$=FNpar(E$) 80IFC$=""ORI$=""ORO$=""ERROR1,"Bad convertion call" 90LIBRARY"Filer:Utilities.GenCon.Functions."+C$ 100IFI$<>O$THEN 110 E$=FNConvert(I$,O$) 120ELSE 130 E$=FNConvert(I$,"<Wimp$Scrap>") 140 IFE$=""SYS "OS_File",6,I$:SYS "OS_FSControl",26,"<Wimp$Scrap>",I$,&80 170ENDIF 180OSCLI("%Set GenCon$Result """+E$+"""") 190END 200 210DEFFNpar(RETURN E$)LOCALP%,P$ 220P%=INSTR(E$," "):IFP%<=0 P$=E$:E$="":=P$ 240P$=LEFT$(E$,P%-1):E$=MID$(E$,P%+1):=P$
� Execute converter 7� Usage: Convert -parm <converter> <input> <output> �=�+&10000 (*�("%Set GenCon$Result """+�$+""""):� 2ș"OS_GetEnv"�E$ <E$=�E$,�E$,"-parm")+6) F'C$=�par(E$):I$=�par(E$):O$=�par(E$) P.�C$=""�I$=""�O$=""�1,"Bad convertion call" Z,ț"Filer:Utilities.GenCon.Functions."+C$ d�I$<>O$� n E$=�Convert(I$,O$) x� �# E$=�Convert(I$,"<Wimp$Scrap>") �G �E$=""ș "OS_File",6,I$:ș "OS_FSControl",26,"<Wimp$Scrap>",I$,&80 �� �&�("%Set GenCon$Result """+E$+"""") �� � �ݤpar(� E$)�P%,P$ �&P%=�E$," "):�P%<=0 P$=E$:E$="":=P$ �!P$=�E$,P%-1):E$=�E$,P%+1):=P$ �
00000000 0d 00 0a 17 f4 20 45 78 65 63 75 74 65 20 63 6f |..... Execute co| 00000010 6e 76 65 72 74 65 72 0d 00 0b 37 f4 20 55 73 61 |nverter...7. Usa| 00000020 67 65 3a 20 43 6f 6e 76 65 72 74 20 2d 70 61 72 |ge: Convert -par| 00000030 6d 20 3c 63 6f 6e 76 65 72 74 65 72 3e 20 3c 69 |m <converter> <i| 00000040 6e 70 75 74 3e 20 3c 6f 75 74 70 75 74 3e 0d 00 |nput> <output>..| 00000050 14 04 0d 00 1e 0e e0 3d 90 2b 26 31 30 30 30 30 |.......=.+&10000| 00000060 0d 00 28 2a ee 85 ff 28 22 25 53 65 74 20 47 65 |..(*...("%Set Ge| 00000070 6e 43 6f 6e 24 52 65 73 75 6c 74 20 22 22 22 2b |nCon$Result """+| 00000080 f6 24 2b 22 22 22 22 29 3a e0 0d 00 32 14 c8 99 |.$+""""):...2...| 00000090 22 4f 53 5f 47 65 74 45 6e 76 22 b8 45 24 0d 00 |"OS_GetEnv".E$..| 000000a0 3c 1a 45 24 3d c1 45 24 2c a7 45 24 2c 22 2d 70 |<.E$=.E$,.E$,"-p| 000000b0 61 72 6d 22 29 2b 36 29 0d 00 46 27 43 24 3d a4 |arm")+6)..F'C$=.| 000000c0 70 61 72 28 45 24 29 3a 49 24 3d a4 70 61 72 28 |par(E$):I$=.par(| 000000d0 45 24 29 3a 4f 24 3d a4 70 61 72 28 45 24 29 0d |E$):O$=.par(E$).| 000000e0 00 50 2e e7 43 24 3d 22 22 84 49 24 3d 22 22 84 |.P..C$="".I$="".| 000000f0 4f 24 3d 22 22 85 31 2c 22 42 61 64 20 63 6f 6e |O$="".1,"Bad con| 00000100 76 65 72 74 69 6f 6e 20 63 61 6c 6c 22 0d 00 5a |vertion call"..Z| 00000110 2c c8 9b 22 46 69 6c 65 72 3a 55 74 69 6c 69 74 |,.."Filer:Utilit| 00000120 69 65 73 2e 47 65 6e 43 6f 6e 2e 46 75 6e 63 74 |ies.GenCon.Funct| 00000130 69 6f 6e 73 2e 22 2b 43 24 0d 00 64 0c e7 49 24 |ions."+C$..d..I$| 00000140 3c 3e 4f 24 8c 0d 00 6e 17 20 45 24 3d a4 43 6f |<>O$...n. E$=.Co| 00000150 6e 76 65 72 74 28 49 24 2c 4f 24 29 0d 00 78 05 |nvert(I$,O$)..x.| 00000160 cc 0d 00 82 23 20 45 24 3d a4 43 6f 6e 76 65 72 |....# E$=.Conver| 00000170 74 28 49 24 2c 22 3c 57 69 6d 70 24 53 63 72 61 |t(I$,"<Wimp$Scra| 00000180 70 3e 22 29 0d 00 8c 47 20 e7 45 24 3d 22 22 c8 |p>")...G .E$="".| 00000190 99 20 22 4f 53 5f 46 69 6c 65 22 2c 36 2c 49 24 |. "OS_File",6,I$| 000001a0 3a c8 99 20 22 4f 53 5f 46 53 43 6f 6e 74 72 6f |:.. "OS_FSContro| 000001b0 6c 22 2c 32 36 2c 22 3c 57 69 6d 70 24 53 63 72 |l",26,"<Wimp$Scr| 000001c0 61 70 3e 22 2c 49 24 2c 26 38 30 0d 00 aa 05 cd |ap>",I$,&80.....| 000001d0 0d 00 b4 26 ff 28 22 25 53 65 74 20 47 65 6e 43 |...&.("%Set GenC| 000001e0 6f 6e 24 52 65 73 75 6c 74 20 22 22 22 2b 45 24 |on$Result """+E$| 000001f0 2b 22 22 22 22 29 0d 00 be 05 e0 0d 00 c8 04 0d |+"""")..........| 00000200 00 d2 15 dd a4 70 61 72 28 f8 20 45 24 29 ea 50 |.....par(. E$).P| 00000210 25 2c 50 24 0d 00 dc 26 50 25 3d a7 45 24 2c 22 |%,P$...&P%=.E$,"| 00000220 20 22 29 3a e7 50 25 3c 3d 30 20 50 24 3d 45 24 | "):.P%<=0 P$=E$| 00000230 3a 45 24 3d 22 22 3a 3d 50 24 0d 00 f0 21 50 24 |:E$="":=P$...!P$| 00000240 3d c0 45 24 2c 50 25 2d 31 29 3a 45 24 3d c1 45 |=.E$,P%-1):E$=.E| 00000250 24 2c 50 25 2b 31 29 3a 3d 50 24 0d ff |$,P%+1):=P$..| 0000025d