Atari DOS 2.5: XF551 Owner's Manual page 85

Atari dos 2.5 disk drive
Table of Contents

Advertisement

~
95 REM WRITE NU
MB
ER TO FILE
1[10
PUT
#
1 , :':
110 IF
X=0
THEN CLOSE
~l:GOTO
130
12(1 GOTD
9(1
130 G RAPHICS 0
:
7
,
? "READ
DATA IN
FILE NmF"
:
I NP
UT A$:
?
140
IF A$="NO" THEN END
150
IF
A$<
>
"'r'ES"
THEN
130
160
"HI
RE AD OUT
ROUT
I
t~E
170
OPE t·j
#2,4,O
,
"D:EXAMPLl
.DAT"
180
FOR
E=
1
TO
50
185
REt'l READ
t'~Ut'lBER(S)
FRm-!
FILE
190
GET
#2
,
G:A(E)=G
200
IF
G=0
THEfI
COTO
2.3(1
210
PRitlT
"B'lTE#"; E;
"
=" ;
G
220
t~D~T
E
230 CLOSE
#
2
Note that INPUT/PRINT and
PUT/G
ET
are incompatible
types
of
Input/Output
commands.
PRINT
inserts end-ot·line
(EOl)
char-
acters between records and
INPUT
uses them
to
determine a
record
.
GET and
PUT
merely write
single
bytes to a file without
separating
them with
EOL.
A file
created
using PUT
statements
will look like
one
large record
unless you
place an
EOl
(98
hex)
character
into
the
file. After you
enter
the sample
PUT/G
ET
pro-
gram
,
type
RUN
and press
(
AeW'n
J
.
Use the number entries
2, 5,
67,
54
,
and
68.
When you
run
the program, it prints the numbers
entered from the keyboard together with the byte location where
each
is stored
.
For example:
BYTE#1 = 2
BYTE #2 = 5
BYTE #3
~
67
BYTE
#5 =
68
75

Advertisement

Table of Contents
loading

This manual is also suitable for:

Xf551

Table of Contents