9 saving the macro buffers to disk – Measurement Computing Micro 488/EX rev.2.1 User Manual
Page 63
Section 4
General Programming
4.21
file.
Lines 230-350
Sets up the file header with comments. These comments
include the HELLO response, the DAY TIME DATE and
the user's comment line from Line 200.
Lines 390-400
Determines the log buffer size or character COUNT.
Lines 430-470
The main program loop. Tests to determine if the number
of serial characters received is >50 or equal to COUNT.
If either is true, the subroutine at Line 480 is called.
Lines 480-560
Transfers the characters from the PC's serial input to the
disk output file. Before it transfers the characters, it
issues an Xoff character to the Micro488/EX to prevent
the PC's serial buffer from being overrun. It adjusts
COUNT
by the number of characters transferred and
issues the Xon character before returning to the main
loop.
Lines 570-800
Gets the output file name from the user. If a file
extension is not specified, the extension 'LOG' is used.
After the user enters the file name, it tests to determine if
the file already exists by opening the file for input. If the
file does not exist, an error is generated and the program
vectors to Line 790. Line 800 causes the program to
resume at the Line 750 which opens the new output file.
4.4.9 Saving the MACRO Buffers to Disk
The following program example reads and records all of the
Micro488/EX's macro buffers and sends the information they contain to an
ASCII text disk file for later recall or edit. The example is written in PC
basic. Serial handshaking has not been implemented in this program. Basic
maintains a 255 character buffer and most macros will contain less than 127
characters. Since the macro is completely transfered to disk prior to
requesting a READ of another macro, serial input buffer overrun on the PC
is unlikely. Only defined macros contained in the Micro488/EX are sent to
the disk file.