Atari DOS 2.5: XF551 Owner's Manual page 81

Atari dos 2.5 disk drive
Table of Contents

Advertisement

The
following
program
listing and sample
run
ill
ustrate
one
way
of
using NOTE
to store keyboard
input
into a specified file loca-
tion.
Following is a
sample
program that uses NOTE
to store informa-
tion entered
from the keyboard
in a
Random-Access disk file
.
Type
in
the program
,
enter some
numbers
,
and
press
[f'leW"n
i
to
end.
The
sample
run uses
numbers,
but you
can type
any string
for
A$ up to 40
characters.
1 REM NOTEST
-
NOTE
STATEMENT DEMO
2
REM THIS PROGRAM READS
LINE OF
DATA
3 REM FROM THE
KEYBOARD
AND
STORES
4
REM THEM
ON
DISK IN FILE D'DATFIL.DAT.
5
REM
POINTERS
ARE
STORED
IN D'POINTS.DAT
.
20
DIM
AH40)
25 OPEN
#1,8,0,"D:DATFIL.DAT"
27
opn~
#2,8,0',
"D:
POHnS. DAT"
30
REM READ LINE OF DATA FROM
K'
40 HIPUT A$
41 PRIIH A$
42 REM IF RETURN ONLY, THEN
STOP
45 IF
LENCA$)=0 THEN
100
50
t·lOTE
#l,X,'('
55 REM
STORE
LINE OF DATA.
6£'
PRIIH
#L
A$
61 REM
STORE
POINTER TO BEGINNING OF
62 REM LINE OF DATA.
65
PRINT #2;X;",";Y
70
PRItH "SECTOR #
= ";
::<,
"BYTE #
=
'30 GOTO
4~1
95 REM INDICATE
END
OF FILE
100
PRItH
#
2;0.;",
"
;~1
110
EfW
"
.
'.J
,
,
This sample program was
run
on a diskette that
contained
the
DOS.SYS, DUP.SYS, and MEM.SAV files
.
Your
sector and byte
numbers may be different. Sample entries were 45
,
55
,
75, 80,
90,
100,
and 110.
71

Advertisement

Table of Contents
loading

This manual is also suitable for:

Xf551

Table of Contents