10 REM ************************ 20 REM NC Word Processor Format 30 REM to HTML Format Converter 40 REM By Ian Larkin 50 REM ************************ 60 REM NC100/150/200 Version : 20/2/01 70 REM Downloaded from Tim's Amstrad NC Users' Site 80 REM http:\\www.ncus.org.uk 90 : 100 PRINT '"Notepad to HTML converter"' 110 INPUT "File to convert";I$ 120 INPUT "Output file as";O$ 130 INPUT "Serif (1) or Sans-serif (2) font";T$:IF INSTR("12",T$)=0 THEN GOTO 130 140 INPUT "Full-width (1) or Table (2)";W$:IF INSTR("12",W$)=0 THEN GOTO 140 150 PRINT "Working...please wait..." 160 O$=O$+".htm" 170 O=OPENOUT(O$) 180 I=OPENIN(I$) 190 PRINT#O,"" 200 PRINT#O,"" 210 PRINT#O,""+I$+"" 220 PRINT#O,"" 230 PRINT#O,"" 240 IF W$="2" THEN PRINT#O,"
":PRINT#O,"
" 250 IF T$="1" THEN PRINT#O,"" ELSE PRINT#O,"" 260 F%=0:BT%=0:IT%=0:LT%=0:H4%=0:H2%=0:H1%=0 270 F$=CHR$(&E2)+CHR$(&E9)+CHR$(&F5)+CHR$(&F3)+CHR$(&F4)+CHR$(&EC) 280 G$=CHR$(&7E)+CHR$(&26)+CHR$(&05)+CHR$(&0A)+CHR$(&8A)+CHR$(&22)+CHR$(&9C) 290 REPEAT 300 C%=BGET#I 310 IF C%=&0A THEN PROCpara 320 IF C%=&05 THEN PROCcodeout(BGET#I) 330 IF C%=&26 THEN PROCoutput("&") 340 IF C%=&22 THEN PROCoutput(""") 350 IF C%=&9C THEN PROCoutput("£") 360 IF C%=&7E THEN PROCoutput(CHR$(13)+"
") 370 IF C%=&3E THEN REPEAT:C%=BGET#I:UNTIL C%=&0A OR C%=0 380 IF INSTR(G$,CHR$(C%))=0 THEN BPUT#O,C% 390 UNTIL EOF#I 400 PRINT#O,CHR$(13)+"
" 410 IF W$="2" THEN PRINT#O,"
":PRINT#O,"
" 420 PRINT#O,"" 430 PRINT #O,"" 440 CLOSE#O 450 CLOSE#I 460 PRINT"Finished!" 470 VDU7 480 END 490 DEFPROCcodeout(C%) 500 F%=INSTR(F$,CHR$(C%)) 510 IF BT%=0 AND F%=1 THEN A$="":BT%=1:GOTO 630 520 IF BT%=1 AND F%=1 THEN A$="":BT%=0:GOTO 630 530 IF IT%=0 AND F%=2 THEN A$="":IT%=1:GOTO 630 540 IF IT%=1 AND F%=2 THEN A$="":IT%=0:GOTO 630 550 IF LT%=0 AND F%=3 THEN INPUT "Link address";L$:A$="":LT%=1:GOTO 630 560 IF LT%=1 AND F%=3 THEN A$="":LT%=0:GOTO 630 570 IF H4%=0 AND F%=4 THEN A$="":H4%=1:GOTO 630 580 IF H4%=1 AND F%=4 THEN A$="":H4%=0:GOTO 630 590 IF H2%=0 AND F%=5 THEN A$="":H2%=1:GOTO 630 600 IF H2%=1 AND F%=5 THEN A$="":H2%=0:GOTO 630 610 IF H1%=0 AND F%=6 THEN A$="":H1%=1:GOTO 630 620 IF H1%=1 AND F%=6 THEN A$="":H1%=0:GOTO 630 630 PROCoutput(A$) 640 ENDPROC 650 DEFPROCoutput(Z$) 660 FOR N=1 TO LEN(Z$):PRINT#O,ASC(MID$(Z$,N,1)):NEXT 670 ENDPROC 680 DEFPROCpara 690 C%=BGET#I 700 IF C%<>&0D THEN A$="
":PROCoutput(A$):GOTO 720 710 A$="

":PROCoutput(A$):C%=BGET#I:C%=BGET#I 720 ENDPROC