Download Print this page

Epson MX-80 User Manual page 42

Hide thumbs Also See for MX-80:

Advertisement

Chapter 9
The Screen Dump
The computer's memory locations which hold the information printed on the
screen have address numbers 15360 to 16320. To print what they're holding (and
thus what's on the screen), all we need do is PEEK at these locations and LPRINT
their contents. It's almost that simple.
Type in this important program. It's our "DUMP" program:
3 0 0 0 0
REM
* SCREEN DUMP PROGRAM *
3 0 0 1 0
FOR L = 1 5 3 6 0
TO 1 6 3 2 0
STEP 64
' B E G I N N I N G OF EACH L I N E
3 0 0 2 0
FOR P = 0 TO 6 3
'EACH P O S I T I O N ON THAT L I N E
3 0 0 3 0
A = P E E K ( L + P )
' A = A S C I I
# OF ADDRESSES
CONTENTS
3 0 0 3 5
I F A < 3 2 A=A+64
' ( O P T I O N A L )
ADDS MSB 4TH
B I T
3 0 0 4 0
I F A > 1 2 7
AND A < 1 9 2 A=A+32
' O F F S E T THE GRAPHICS ONLY
3 0 0 5 0
L P R I N T C H R $ ( A ) ;
' S E N D A S C I I
# TO P R I N T E R
3 0 0 6 0
NEXT P
'MOVE OVER TO NEXT P O S I T I O N
3 0 0 7 0
L P R I N T
'MOVE PAPER UP ONE L I N E
3 0 0 8 0
NEXT L
' S T A R T ALL OVER ON THE NEXT L I N E
Save it on disk or tape. You may use it frequently.
Now let's give it a try. Press:
CLEAR to clean off the screen.
Then LIST the program, to put something on the screen.
Then RUN the program, watching the screen contents dump out to the Printer.
Yes, it's a bit slow, but we're doing the dump in BASIC to keep it simple — and it
does work.
Not too bad, eh? Note that the Printer even "prints" those screen lines that don't
have anything on them. Since the dump program is in BASIC, we can stop it any-
time by just hitting the BREAK key.
44

Advertisement

loading