Tandy 1000 Basic Reference Manual page 105

Hide thumbs Also See for 1000:
Table of Contents

Advertisement

Chapter 10 i BASIC Keywords
You may specify any segment as the target or source for BLOAD
or BSAVE. This is a useful way to save and redisplay screen im-
ages by saving from or loading to the screen buffer.
Sample Programs
Program 1
1 0 ' S A V E A 5 0
b y t e i m a g e of m e m o r y
2 0 D E F SEG
=
b H l 0
3 0 FOR
I
=
2 5 6
t o
3 0 6
4 0 V L U E
=
P E E K ( 1 )
5 0 L P R I N T " A T
ADDRESS
" ; I ;
"WE
H A V E A V A L U E
6 0 N E X T I
7 0 B S A V E
"prog1",0,50
8 0 P R I N T
" N o w
R u n P r o g r a m
2
t o v e r i f y that t h e
OF " ; V L U E
c o n t e n t 5 s a v e d in t h e f i l e
P R O G l
m a t c h t h o s e
in t h e printout p r o d u c e d by t h i s program."
Program 2
1 0
'Load
a
5 0
b y t e f i l e i n t o m e m o r y a n d v e r i f y
i t
2 0
DEF
SEG
=
& H 1 0
3 0 B L O A D
"progl .bas",
0
4 0 F O R
I
=
2 5 6
t o
3 0 6
5 0 V A L U E
=
P E E K C I )
6 0 L P R I N T " A T
ADDRESS " ; I ;
"the l o a d e d v a l u e
i
5
"
;
V A L U E
7 0 N E X T
I
Program 1 saves a memory image file, and Program 2 reloads
that file and prints it.
103

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents