Home » Recent acquisitions » Acorn ADFS disks » adfs_AcornUser_199801_2.adf » PenDnHTML » !Install/Files/ToHTML
!Install/Files/ToHTML
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 » Recent acquisitions » Acorn ADFS disks » adfs_AcornUser_199801_2.adf » PenDnHTML |
Filename: | !Install/Files/ToHTML |
Read OK: | ✔ |
File size: | 05D3 bytes |
Load address: | 0000 |
Exec address: | 0000 |
File contents
10REM >> ToHTML 20REM >> Rename temporary PenDown DTP document for PDtoHTML 30REM >> If PDtoHTML not already running, try to launch it 40: 50ON ERROR END 60DIM path% 256, tblock% 16, tname% 16, errblock% 256 70PROCgetpath 80SYS "XOS_ReadVarVal","Wimp$ScrapDir",0,-1,0,0 TO ,,a% 90IF (a% = 0) PROCerr("Unable to find scrap directory - try running !Scrap") 100SYS "XOS_ReadVarVal","PDtoHTML$Dir",0,-1,0,0 TO ,,b% 110IF (b% = 0) PROCerr("Unable to find conversion application - try running !PDtoHTML") 120IF (a% = 0) OR (b% = 0) THEN 130 SYS "OS_File",6,path% : REM delete 140ELSE 150 SYS "OS_File",23,path% TO ,,,,,,filetype% 160 IF filetype% = &BBA THEN 170 SYS "OS_FSControl",25,path%,"<Wimp$ScrapDir>.pdhtml-tmp" 180 IF NOT FNapp_running("PDtoHTML") THEN 190 OSCLI "/<PDtoHTML$Dir>.!Run" 200 ENDIF 210 ENDIF 220ENDIF 230END 240: 250DEFPROCgetpath 260REM Get file path from command line 270LOCAL c%, p%, i% 280SYS "OS_GetEnv" TO c% 290p% = path% 300REPEAT 310i% = ?c% 320IF (i% = 32) THEN p% = path% 330IF (i% > 32) THEN ?p% = i%: p% += 1 340c% += 1 350UNTIL (i% < 32) 360?p% = 13 370ENDPROC 380: 390DEFFNapp_running(app$) 400REM Return TRUE if app is running else FALSE 410LOCAL i%, j%, c% 420i% = 0 430REPEAT 440 SYS "TaskManager_EnumerateTasks",i%,tblock%,16 TO i% 450 j% = 0 460 REPEAT 470 c% = ?(tblock%!4 + j%) 480 ?(tname% + j%) = c% 490 j% += 1 500 UNTIL c% = 0 510 ?(tname% + j% - 1) = 13 520 IF $tname% = app$ THEN =TRUE 530UNTIL i% < 0 540=FALSE 550: 560DEFPROCerr(err$) 570!errblock% = 0 580$(errblock% + 4) = err$ 590?(errblock% + 5 + LEN(err$)) = 0 600SYS "OS_GenerateError",errblock% 610ENDPROC
� >> ToHTML ;� >> Rename temporary PenDown DTP document for PDtoHTML :� >> If PDtoHTML not already running, try to launch it (: 2 � � � <5� path% 256, tblock% 16, tname% 16, errblock% 256 F�getpath P7ș "XOS_ReadVarVal","Wimp$ScrapDir",0,-1,0,0 � ,,a% ZJ� (a% = 0) �err("Unable to find scrap directory - try running !Scrap") d6ș "XOS_ReadVarVal","PDtoHTML$Dir",0,-1,0,0 � ,,b% nT� (b% = 0) �err("Unable to find conversion application - try running !PDtoHTML") x� (a% = 0) � (b% = 0) � �% ș "OS_File",6,path% : � delete �� �- ș "OS_File",23,path% � ,,,,,,filetype% � � filetype% = &BBA � �? ș "OS_FSControl",25,path%,"<Wimp$ScrapDir>.pdhtml-tmp" �& � � �app_running("PDtoHTML") � �" � "/<PDtoHTML$Dir>.!Run" � � � � �� �� �: � ��getpath %� Get file path from command line � c%, p%, i% ș "OS_GetEnv" � c% "p% = path% ,� 6i% = ?c% @� (i% = 32) � p% = path% J#� (i% > 32) � ?p% = i%: p% += 1 Tc% += 1 ^� (i% < 32) h?p% = 13 r� |: �ݤapp_running(app$) �.� Return TRUE if app is running else FALSE �� i%, j%, c% � i% = 0 �� �8 ș "TaskManager_EnumerateTasks",i%,tblock%,16 � i% � j% = 0 � � � c% = ?(tblock%!4 + j%) � ?(tname% + j%) = c% � j% += 1 � � c% = 0 � ?(tname% + j% - 1) = 13 � $tname% = app$ � =� � i% < 0 =� &: 0��err(err$) :!errblock% = 0 D$(errblock% + 4) = err$ N"?(errblock% + 5 + �(err$)) = 0 X#ș "OS_GenerateError",errblock% b� �
00000000 0d 00 0a 0f f4 20 3e 3e 20 54 6f 48 54 4d 4c 0d |..... >> ToHTML.| 00000010 00 14 3b f4 20 3e 3e 20 52 65 6e 61 6d 65 20 74 |..;. >> Rename t| 00000020 65 6d 70 6f 72 61 72 79 20 50 65 6e 44 6f 77 6e |emporary PenDown| 00000030 20 44 54 50 20 64 6f 63 75 6d 65 6e 74 20 66 6f | DTP document fo| 00000040 72 20 50 44 74 6f 48 54 4d 4c 0d 00 1e 3a f4 20 |r PDtoHTML...:. | 00000050 3e 3e 20 49 66 20 50 44 74 6f 48 54 4d 4c 20 6e |>> If PDtoHTML n| 00000060 6f 74 20 61 6c 72 65 61 64 79 20 72 75 6e 6e 69 |ot already runni| 00000070 6e 67 2c 20 74 72 79 20 74 6f 20 6c 61 75 6e 63 |ng, try to launc| 00000080 68 20 69 74 0d 00 28 05 3a 0d 00 32 09 ee 20 85 |h it..(.:..2.. .| 00000090 20 e0 0d 00 3c 35 de 20 70 61 74 68 25 20 32 35 | ...<5. path% 25| 000000a0 36 2c 20 74 62 6c 6f 63 6b 25 20 31 36 2c 20 74 |6, tblock% 16, t| 000000b0 6e 61 6d 65 25 20 31 36 2c 20 65 72 72 62 6c 6f |name% 16, errblo| 000000c0 63 6b 25 20 32 35 36 0d 00 46 0c f2 67 65 74 70 |ck% 256..F..getp| 000000d0 61 74 68 0d 00 50 37 c8 99 20 22 58 4f 53 5f 52 |ath..P7.. "XOS_R| 000000e0 65 61 64 56 61 72 56 61 6c 22 2c 22 57 69 6d 70 |eadVarVal","Wimp| 000000f0 24 53 63 72 61 70 44 69 72 22 2c 30 2c 2d 31 2c |$ScrapDir",0,-1,| 00000100 30 2c 30 20 b8 20 2c 2c 61 25 0d 00 5a 4a e7 20 |0,0 . ,,a%..ZJ. | 00000110 28 61 25 20 3d 20 30 29 20 f2 65 72 72 28 22 55 |(a% = 0) .err("U| 00000120 6e 61 62 6c 65 20 74 6f 20 66 69 6e 64 20 73 63 |nable to find sc| 00000130 72 61 70 20 64 69 72 65 63 74 6f 72 79 20 2d 20 |rap directory - | 00000140 74 72 79 20 72 75 6e 6e 69 6e 67 20 21 53 63 72 |try running !Scr| 00000150 61 70 22 29 0d 00 64 36 c8 99 20 22 58 4f 53 5f |ap")..d6.. "XOS_| 00000160 52 65 61 64 56 61 72 56 61 6c 22 2c 22 50 44 74 |ReadVarVal","PDt| 00000170 6f 48 54 4d 4c 24 44 69 72 22 2c 30 2c 2d 31 2c |oHTML$Dir",0,-1,| 00000180 30 2c 30 20 b8 20 2c 2c 62 25 0d 00 6e 54 e7 20 |0,0 . ,,b%..nT. | 00000190 28 62 25 20 3d 20 30 29 20 f2 65 72 72 28 22 55 |(b% = 0) .err("U| 000001a0 6e 61 62 6c 65 20 74 6f 20 66 69 6e 64 20 63 6f |nable to find co| 000001b0 6e 76 65 72 73 69 6f 6e 20 61 70 70 6c 69 63 61 |nversion applica| 000001c0 74 69 6f 6e 20 2d 20 74 72 79 20 72 75 6e 6e 69 |tion - try runni| 000001d0 6e 67 20 21 50 44 74 6f 48 54 4d 4c 22 29 0d 00 |ng !PDtoHTML")..| 000001e0 78 1b e7 20 28 61 25 20 3d 20 30 29 20 84 20 28 |x.. (a% = 0) . (| 000001f0 62 25 20 3d 20 30 29 20 8c 0d 00 82 25 20 20 c8 |b% = 0) ....% .| 00000200 99 20 22 4f 53 5f 46 69 6c 65 22 2c 36 2c 70 61 |. "OS_File",6,pa| 00000210 74 68 25 20 3a 20 f4 20 64 65 6c 65 74 65 0d 00 |th% : . delete..| 00000220 8c 05 cc 0d 00 96 2d 20 20 c8 99 20 22 4f 53 5f |......- .. "OS_| 00000230 46 69 6c 65 22 2c 32 33 2c 70 61 74 68 25 20 b8 |File",23,path% .| 00000240 20 2c 2c 2c 2c 2c 2c 66 69 6c 65 74 79 70 65 25 | ,,,,,,filetype%| 00000250 0d 00 a0 1a 20 20 e7 20 66 69 6c 65 74 79 70 65 |.... . filetype| 00000260 25 20 3d 20 26 42 42 41 20 8c 0d 00 aa 3f 20 20 |% = &BBA ....? | 00000270 20 20 c8 99 20 22 4f 53 5f 46 53 43 6f 6e 74 72 | .. "OS_FSContr| 00000280 6f 6c 22 2c 32 35 2c 70 61 74 68 25 2c 22 3c 57 |ol",25,path%,"<W| 00000290 69 6d 70 24 53 63 72 61 70 44 69 72 3e 2e 70 64 |imp$ScrapDir>.pd| 000002a0 68 74 6d 6c 2d 74 6d 70 22 0d 00 b4 26 20 20 20 |html-tmp"...& | 000002b0 20 e7 20 ac 20 a4 61 70 70 5f 72 75 6e 6e 69 6e | . . .app_runnin| 000002c0 67 28 22 50 44 74 6f 48 54 4d 4c 22 29 20 8c 0d |g("PDtoHTML") ..| 000002d0 00 be 22 20 20 20 20 20 20 ff 20 22 2f 3c 50 44 |.." . "/<PD| 000002e0 74 6f 48 54 4d 4c 24 44 69 72 3e 2e 21 52 75 6e |toHTML$Dir>.!Run| 000002f0 22 0d 00 c8 09 20 20 20 20 cd 0d 00 d2 07 20 20 |".... ..... | 00000300 cd 0d 00 dc 05 cd 0d 00 e6 05 e0 0d 00 f0 05 3a |...............:| 00000310 0d 00 fa 0d dd f2 67 65 74 70 61 74 68 0d 01 04 |......getpath...| 00000320 25 f4 20 47 65 74 20 66 69 6c 65 20 70 61 74 68 |%. Get file path| 00000330 20 66 72 6f 6d 20 63 6f 6d 6d 61 6e 64 20 6c 69 | from command li| 00000340 6e 65 0d 01 0e 10 ea 20 63 25 2c 20 70 25 2c 20 |ne..... c%, p%, | 00000350 69 25 0d 01 18 17 c8 99 20 22 4f 53 5f 47 65 74 |i%...... "OS_Get| 00000360 45 6e 76 22 20 b8 20 63 25 0d 01 22 0e 70 25 20 |Env" . c%..".p% | 00000370 3d 20 70 61 74 68 25 0d 01 2c 05 f5 0d 01 36 0c |= path%..,....6.| 00000380 69 25 20 3d 20 3f 63 25 0d 01 40 1c e7 20 28 69 |i% = ?c%..@.. (i| 00000390 25 20 3d 20 33 32 29 20 8c 20 70 25 20 3d 20 70 |% = 32) . p% = p| 000003a0 61 74 68 25 0d 01 4a 23 e7 20 28 69 25 20 3e 20 |ath%..J#. (i% > | 000003b0 33 32 29 20 8c 20 3f 70 25 20 3d 20 69 25 3a 20 |32) . ?p% = i%: | 000003c0 70 25 20 2b 3d 20 31 0d 01 54 0b 63 25 20 2b 3d |p% += 1..T.c% +=| 000003d0 20 31 0d 01 5e 0f fd 20 28 69 25 20 3c 20 33 32 | 1..^.. (i% < 32| 000003e0 29 0d 01 68 0c 3f 70 25 20 3d 20 31 33 0d 01 72 |)..h.?p% = 13..r| 000003f0 05 e1 0d 01 7c 05 3a 0d 01 86 17 dd a4 61 70 70 |....|.:......app| 00000400 5f 72 75 6e 6e 69 6e 67 28 61 70 70 24 29 0d 01 |_running(app$)..| 00000410 90 2e f4 20 52 65 74 75 72 6e 20 54 52 55 45 20 |... Return TRUE | 00000420 69 66 20 61 70 70 20 69 73 20 72 75 6e 6e 69 6e |if app is runnin| 00000430 67 20 65 6c 73 65 20 46 41 4c 53 45 0d 01 9a 10 |g else FALSE....| 00000440 ea 20 69 25 2c 20 6a 25 2c 20 63 25 0d 01 a4 0a |. i%, j%, c%....| 00000450 69 25 20 3d 20 30 0d 01 ae 05 f5 0d 01 b8 38 20 |i% = 0........8 | 00000460 20 c8 99 20 22 54 61 73 6b 4d 61 6e 61 67 65 72 | .. "TaskManager| 00000470 5f 45 6e 75 6d 65 72 61 74 65 54 61 73 6b 73 22 |_EnumerateTasks"| 00000480 2c 69 25 2c 74 62 6c 6f 63 6b 25 2c 31 36 20 b8 |,i%,tblock%,16 .| 00000490 20 69 25 0d 01 c2 0c 20 20 6a 25 20 3d 20 30 0d | i%.... j% = 0.| 000004a0 01 cc 07 20 20 f5 0d 01 d6 1e 20 20 20 20 63 25 |... ..... c%| 000004b0 20 3d 20 3f 28 74 62 6c 6f 63 6b 25 21 34 20 2b | = ?(tblock%!4 +| 000004c0 20 6a 25 29 0d 01 e0 1b 20 20 20 20 3f 28 74 6e | j%).... ?(tn| 000004d0 61 6d 65 25 20 2b 20 6a 25 29 20 3d 20 63 25 0d |ame% + j%) = c%.| 000004e0 01 ea 0f 20 20 20 20 6a 25 20 2b 3d 20 31 0d 01 |... j% += 1..| 000004f0 f4 0e 20 20 fd 20 63 25 20 3d 20 30 0d 01 fe 1d |.. . c% = 0....| 00000500 20 20 3f 28 74 6e 61 6d 65 25 20 2b 20 6a 25 20 | ?(tname% + j% | 00000510 2d 20 31 29 20 3d 20 31 33 0d 02 08 1b 20 20 e7 |- 1) = 13.... .| 00000520 20 24 74 6e 61 6d 65 25 20 3d 20 61 70 70 24 20 | $tname% = app$ | 00000530 8c 20 3d b9 0d 02 12 0c fd 20 69 25 20 3c 20 30 |. =...... i% < 0| 00000540 0d 02 1c 06 3d a3 0d 02 26 05 3a 0d 02 30 0f dd |....=...&.:..0..| 00000550 f2 65 72 72 28 65 72 72 24 29 0d 02 3a 12 21 65 |.err(err$)..:.!e| 00000560 72 72 62 6c 6f 63 6b 25 20 3d 20 30 0d 02 44 1b |rrblock% = 0..D.| 00000570 24 28 65 72 72 62 6c 6f 63 6b 25 20 2b 20 34 29 |$(errblock% + 4)| 00000580 20 3d 20 65 72 72 24 0d 02 4e 22 3f 28 65 72 72 | = err$..N"?(err| 00000590 62 6c 6f 63 6b 25 20 2b 20 35 20 2b 20 a9 28 65 |block% + 5 + .(e| 000005a0 72 72 24 29 29 20 3d 20 30 0d 02 58 23 c8 99 20 |rr$)) = 0..X#.. | 000005b0 22 4f 53 5f 47 65 6e 65 72 61 74 65 45 72 72 6f |"OS_GenerateErro| 000005c0 72 22 2c 65 72 72 62 6c 6f 63 6b 25 0d 02 62 05 |r",errblock%..b.| 000005d0 e1 0d ff |...| 000005d3