8-Bit Software Online Conversion
Interword>ASCII - Listing
10DEFFNS="IW>ASC"
20MODE0
30PRINT'"Interword to ASCII Conversio
n. By C.J.Richardson."'
40*.
50PRINT'
60INPUT "Source File " S$
70INPUT "Destination File " D$
80PRINT'
90F%=OPENIN(S$)
100G%=OPENOUT(D$)
110PTR#F%=50
120PTR#F%=BGET#F%+256*BGET#F%+2
130REPEAT
140B%=BGET#F%
150IF B%=133 PROCruler
160IF B%>127 PROCnew
170IF B%>31 AND B%<>255 BPUT#G%,B%:VDU
B%
180IF B%=30 REPEAT:A%=BGET#F%:UNTIL A%
MOD 128=31
190IF B%=28 REPEAT:A%=BGET#F%:UNTIL A%
MOD 128=29
200IF B%=26 REPEAT:A%=BGET#F%:UNTIL A%
MOD 128=27
210IF B%=1 A%=BGET#F%:A%=BGET#F%
220IF B%=2 A%=BGET#F%:A%=BGET#F%:A%=BG
ET#F%
230UNTILB%=255
240CLOSE#F%
250CLOSE#G%
260END
270DEFPROCruler
280PTR#F%=PTR#F%+6
290REPEAT
300A%=BGET#F%
310UNTIL A%=135
320ENDPROC
330DEFPROCnew
340IFB%=255 ENDPROC
350PTR#F%=PTR#F%-2
360IF BGET#F%=135 B%=BGET#F% MOD 128:E
NDPROC
370PTR#F%=PTR#F%-1
380IF BGET#F%=32:PTR#G%=PTR#G%-1
390BPUT#G%,13:PRINT
400B%=BGET#F% MOD 128
410ENDPROC