home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Simtel MSDOS 1999 January
/
Simtel-MSDOS-Jan1999-CD2.iso
/
txtutl
/
wsconv.bas
< prev
next >
Wrap
BASIC Source File
|
1998-12-10
|
799b
|
24 lines
1 KEY OFF
5 CLS
10 'Another attempt at WSPATCHING
15 'Craig Werner (werner@aecom.UUCP) 1935-14E Eastchester Rd. Bronx NY 10461
20 INPUT "Filename to convert"; FINAME$
21 IF RIGHT$(FINAME$,3) <> "hrd" THEN GOTO 30
23 PRINT "Cannot convert a filename with extension '.hrd' -Sorry."
25 INPUT "type 'Q' to quit, any key to retry.";Q$
27 IF (Q$="Q")OR (Q$="q") THEN GOTO 1000 ELSE GOTO 20
30 OPEN "R",1,FINAME$,1 : FIELD #1, 1 AS A$
31 OPEN "R",2,FINAME$+".hrd",1 : FIELD #2, 1 AS B$
35 REC = 1
36 PRINT "Length" ; LOF(1)
40 WHILE NOT EOF(1)
50 GET #1, REC
51 IF ASC(A$) = 26 THEN GOTO 65 'Control-Z = 26.
55 LET C$ = CHR$(ASC(A$) AND 127)
60 IF ASC(C$) <> 10 THEN PRINT C$;
61 LSET B$=C$ : PUT #2, REC
65 LET REC = REC + 1
70 WEND
80 CLOSE #1 : CLOSE #2
1000 END