[Coco] EmuDisk floppy utility issue
Barry Nelson
barry.nelson at amobiledevice.com
Sun Jan 5 06:43:34 EST 2020
I wrote this BASIC09 utility to remove control characters from text files. It is on my hard drive images for VCC and the SDC.
Usage is:
remctrl <input_file >output_file
PROCEDURE REMCTRL
DIM PATH1,PATH2,PATH3,CHAR:BYTE
DIM C,CC:INTEGER
PATH1=0
PATH2=1
PATH3=2
C=0
CC=0
ON ERROR GOTO 10
WHILE NOT(EOF(#PATH1)) DO
C=C+1
GET #PATH1,CHAR
IF CHAR>31 AND CHAR<128 OR CHAR=10 THEN
PUT #PATH2,CHAR
ELSE
CC=CC+1
ENDIF
ENDWHILE
10 PRINT #PATH2
PRINT #PATH2,"LENGTH OF FILE: "; C
PRINT #PATH2,"CONTROL CHARACTERS REMOVED: "; CC
More information about the Coco
mailing list