%CO:A,12,72%



%H2%%H1%GRAPH2.BAS

This Z88 basic program, is based upon the Machine code graphics 
patch by Richard Russell. I have included the ability to 'dump' the
graphics screen to an Epson type printer. What is actually dumped is 
the RAM buffer used to create this screen and NOT the actual screen.

 The data used for the graphs to be drawn can come from a number of 
sources, two types of data, are allowed, straight bytes of data, 
created with the BPUT# command, and data captured from a Pipedream 
spreadsheet column.


%H2%%H1%CAPTURING DATA FROM PIPEDREAM
Having created a spreadsheet the data in a single column may be 
captured and used as input for a graph. The easiest way to capture the 
data is to use a CLI file like the one provided as a sample, called 
capture.ex. this can be edited to capture any column, and to use file 
names of your choice.

.=pd.dat 
#p
|po Y A ~E

If you %H2%Ex%H2%ecute this file it will redirect the printer output to a file 
called pd.dat, and then print column A of your current Pipedream 
Spreadsheet to the file, closing it when finished. It is helpful to 
have used  %H2%<> O%H2%ptions to set the Page length to 0 first, otherwise the 
column data is interrupted at the end of every page. A column of any 
length may be captured, but the first graph will only include the first 
254 items, a second graph from the same file however will continue from 
the 255  item, and will not rescale the graph. The data should not be 
left justified or include leading characters, although the graph input 
routine could be modified to cope with both of these.


%H2%%H1%USING OTHER DATA
The other type of data permisable is that created using BPUT, this has 
been included so that data generated from within Basic programs can be 
used, or data captured from the real world using an I/O port can be 
used. (I have designed a Z88 I/O port).












%H2%%H1%HOW DOES IT WORK
The program when run  sets up two Windows, one for text and one for 
graphics. You are  asked to provide a filename and for the type of 
data, if the file is not present a warning is given and you are asked 
to try again. The data is then processed to check on the validity of 
the data and a scale factor is calculated to fit the data into the 64 
bit high y axis available.
 The whole graph is then drawn and displayed. Next you are given the 
chance to dump the output to a printer, if this option is taken and you 
have not got a printer attached press ESCape and wait! The dump will 
eventually timeout and return to you. During printing the ESCape key 
and the INDEX etc. are live and may be used to suspend printing to 
check the time, alter the panel etc. When finished you may output a 
title for the dump, and then have the option to draw another graph, on 
a clearscreen or overlaid on the original.


Best of Luck.

Richard Bignell
The Advisory Unit
Microtechnology in Education
Endymion Road
Hatfield
Herts
Al10 8AU

The version of PATCH included on this Eprom includes the screen dump 
code, which may be called at any time with the command%H2% CALL 11011

%CO:B,12,60%



















































































%CO:C,12,48%























:redirect printer output to file
:go to pipedream
:print a single column
%CO:D,12,36%%CO:E,12,24%%CO:F,12,12%