Data-X Rev. B (DATCON.BAS)

Data-X Rev. B (XL/XE) and File Converter by Jeffrey A. Summers, 312 (binary load, BASIC)

Description

Data-X Rev. B (XL/XE) and File Converter by Jeffrey A. Summers, 312 (binary load, BASIC)

From the Antic disk of December 1988 (Vol. 7 No. 8) — disk A.

From the Antic Software Archive at atarimagazines.com. The program remains the property of its author and publisher.

What is in this file

Atari BASIC program · 2.1 KB

Dialect
Atari BASIC
Lines
34
Variables
F$, F1$, ID$, PROOF$, PROOF1$, FLD$, R$, X
BASIC listing (34 lines)
10 REM REV.A <= => REV.B CONVERTER
20 REM BY J. SUMMERS
30 REM (c)1988, ANTIC PUBLISHING
80 DIM F$(20),F1$(20),ID$(18),PROOF$(18),PROOF1$(18),FLD$(300),R$(1)
90 PROOF$="\SUMMERS\DATA.BAS\":PROOF1$="\SUMMERS\DATA1BAS\"
100 GRAPHICS 0:CLOSE #1:OPEN #1,4,0,"E:":POKE 710,2:POSITION 6,7:? "File conversion program"
110 POSITION 6,8:? "Converts Rev A to Rev B":POSITION 6,9:? "Database files and back again"
120 POSITION 6,11:? "Source filename: ";:INPUT #1,F$
130 IF F$="" THEN 31000
140 POSITION 6,12:? "Dest filename: ";:INPUT #1,F1$:IF F1$="" THEN 31000
150 TRAP 1000:CLOSE #2:OPEN #2,4,0,F$:TRAP 1100:CLOSE #3:OPEN #3,8,0,F1$:TRAP 1200:INPUT #2,ID$
160 IF ID$=PROOF$ THEN 500
170 IF ID$<>PROOF1$ THEN 1200
200 REM CONVERT REV B TO REV A
210 POSITION 6,13:? "Convert rev B file ";F$:POSITION 6,14:? "to rev A file ";F1$
220 POSITION 6,15:? "Correct? (Y/N): ";:INPUT #1,R$:IF R$(1,1)<>"y" AND R$(1,1)<>"Y" THEN 31000
230 ? #3;PROOF$:GET #2,X:PUT #3,X:GET #2,X:IF X<>0 THEN 1300
240 GET #2,X:PUT #3,X:GET #2,X
250 TRAP 270
260 GET #2,X:PUT #3,X:GOTO 260
270 CLOSE #2:CLOSE #3:POSITION 6,16:? "Done.  Press RETURN":INPUT #1,R$:GOTO 31000
500 REM CONVERT REV A TO REV B
510 POSITION 6,13:? "Convert rev A file ";F$:POSITION 6,14:? "to rev B file ";F1$
520 POSITION 6,15:? "Correct? (Y/N): ";:INPUT #1,R$:IF R$(1,1)<>"y" AND R$(1,1)<>"Y" THEN 31000
530 ? #3;PROOF1$:GET #2,X:PUT #3,X:PUT #3,0
540 GET #2,X:PUT #3,X:PUT #3,0
550 TRAP 570
560 GET #2,X:PUT #3,X:GOTO 560
570 CLOSE #2:CLOSE #3:POSITION 6,16:? "Done.  Press RETURN":INPUT #1,R$:GOTO 31000
1000 ? "Error trying to open source":? "Press RETURN":INPUT #1,R$:GOTO 31000
1100 ? "Error trying to open dest":? "Press RETURN":INPUT #1,R$:GOTO 31000
1200 ? "File compatibility error":? "Press RETURN":INPUT #1,R$:GOTO 31000
1300 ? "File too large for conversion":? "Press RETURN":INPUT #1,R$:GOTO 31000
31000 GRAPHICS 0:END