BufPrint

See all articles from SINCUS v4 n1

=== BUFPRINT === (Version 3.0) (dmp 1985)

This is a machine code routine that will let you print out parts or all of your MTERM memory buffer to a full-size printer via the TASMAN cpi.

First, LOAD the “tasbuff” code supplied with the TASMAN cpi. Next, type in the following BASIC program to load up the Bufprint code:

  10 LET SUM=0
20 FOR I=64000 TO 64263
30 READ A: LET SUM=SUM+A:POKE I,A
40 NEXT I
50 IF SUM=32333 THEN PRINT "CODE O.K.": STOP
60 PRINT " ERROR IN CODE! RE-CHECK ": STOP
4000 DATA 13,13,20,1,32,80
4006 DATA 114,105,110,116,63,32
4012 DATA 20,0,32,33,141,92
4018 DATA 126,33,143,92,119,33
4024 DATA 60,92,203,134,33,4
4030 DATA 92,126,254,255,32,251
4036 DATA 205,0,91,33,0,250
4042 DATA 6,15,126,215,35,5
4048 DATA 32,250,58,4,92,254
4054 DATA 255,40,249,203,137,58
4060 DATA 8,92,254,121,32,2
4066 DATA 203,201,215,62,13,215
4072 DATA 203,129,42,75,92,17
4078 DATA 86,104,237,82,124,181
4084 DATA 202,234,250,235,33,86
4090 DATA 104,126,254,13,40,11
4096 DATA 254,10,202,2,251,62
4102 DATA 31,150,48,17,126,215
4108 DATA 203,73,40,11,126,205
4114 DATA 248,250,229,33,59,92
4120 DATA 203,142,225,35,27,122
4126 DATA 179,202,234,250,58,4
4132 DATA 92,254,255,202,203,250
4138 DATA 58,8,92,254,112,32
4144 DATA 4,203,201,24,54,254
4150 DATA 109,32,9,62,13,205
4156 DATA 248,250,203,137,24,41
4162 DATA 254,102,32,4,203,193
4168 DATA 24,33,254,115,32,4
4174 DATA 203,129,24,25,254,32
4180 DATA 32,17,229,213,197,1
4186 DATA 0,0,205,233,48,205
4192 DATA 235,31,193,209,225,24
4198 DATA 4,254,226,40,31,229
4204 DATA 33,140,92,54,2,225
4210 DATA 203,65,194,91,250,229
4216 DATA 213,197,6,0,14,2
4222 DATA 205,233,48,205,235,31
4228 DATA 193,209,225,195,91,250
4234 DATA 33,60,92,203,198,203
4240 DATA 73,200,62,13,205,248
4246 DATA 250,201,197,213,229,205
4252 DATA 62,91,225,209,193,201
4258 DATA 62,13,119,195,107,250

You probably won’t need this BASIC again, but SAVE it somewhere just in case. Now RUN it. If you get the error message, you made a mistake typing in the bytes. If everything is “OK”, then save “tasbuff” and “bufprint” together on tape:

SAVE “tasbuff”CODE 23296,256: SAVE “bufprint”CODE 64000,264

** INSTRUCTIONS FOR USING BUFPRINT VERSION 3.0 **

1. When your MTERM buffer contains the data that you want to print out, exit to BASIC via Main Menu option E. Your screen may show some garbage or nothing at all.

2. Enter this command directly:

LOAD “”CODE : LOAD “”CODE : PRINT USR 64015

and start the tape with “tasbuff” and “bufprint.” The program will start with the “PRINT?” prompt.

3. If you press <y>, the buffer will be printed out from the beginning. Be sure your printer is on and ready to go. If you press <n>, the buffer will come out on your screen without printing.

4. While the program is running, the following keys are used to control it:

<p> activates the printer. Whatever follows gets printed.
<m> de-activates printer. Buffer will continue to scroll out on your monitor. This key also gives you Line Feeds if pressed more than once.
(You can flip back and forth between <p> and <m> as many times as you like, to print out sections of the buffer.)
<f> for FAST mode. This kicks Bufprint into high gear to skip through the buffer quickly.
<s> for SLOW mode. Bufprint starts out in slow mode after you answer the “PRINT?” prompt.
(Again, you can flip between FAST and SLOW whenever you want.)
<SPACE> or <BREAK> for temporary stop. Press any other key to resume. Note that if the key you press to resume is a Control Key, it will have its usual effect. If you press <SPACE> or <BREAK> repeatedly, you can creep through the buffer one character at a time.

5. To exit the program before the entire buffer has come out, use the Timex STOP command (Symbol Shift/A).

I recommend that you permanently set your DSPW to 80, so you can take advantage of the full width of your printer.

Note. This program occupies a section of memory that is not occupied by MTERM; however, MTERM does use this section during its normal operation. So, if you LOAD Bufprint and MTERM together, and then go on-line, the Bufprint code will be obliterated. Don’t try to use it or you’ll crash. Just exit to BASIC and load Bufprint.

The advantage of this version of Bufprint (over the BASIC edition I sent up a while ago) is that it uses none of the low-address memory used by the buffer. I have used it to print out a completely full (27256 bytes) buffer.

As always, I would appreciate any of your questions or suggestions for improvements.

David Pranitis
[e-mail address omitted]

Note: Type-in program listings on this website use ZMAKEBAS notation for graphics characters.