VU-Calc and the Tasman I/F

[phone number omitted], [address omitted]

Here is a short program which will allow you to use your “80 Column” Printer to print a real spread sheet for presenting data (including tables you’ve already SAVEd) from the Psion Software program VU-CALC. Required hardware and software are:

1. T/S 2068 Computer 2. Tasman Centronics Printer I/F 3. 80 Column Printer 4. Tape Recorder 5. VU-CALC 6. Tasman printer software – “tasintcode” – properly customized for your printer.

Below is a set of Basic program lines which are to be MERGEd with the Basic portion of VU-CALC. To do this, proceed as follows:

1. Reset the computer and key in the lines listed herein.

2. SAVE and VERIFY them on a bank cassette. This is only a transfer tape and will not be the final “product,” so use any name you like.

3. Reset the computer and MERGE the Basic part of VU-CALC. (That’s the first part on the tape.) You must use MERGE to prevent the program from Auto starting. Stop the tape without rewinding it immediately after the border shows that the program is finished loading. Without rewinding the tape, remove it from the recorder. This will set the tape at the right place for loading in the other portions of VU-CALC later.

4. LIST the VU-CALC Basic. Use the Immediate Command MERGE””. Merge in the previously Saved lines from 1 & 2 above.

5. SAVE “vcalcP” LINE 10 and again VERIFY. Be careful to note (if possible) the position on the tape where your Basic ends. This will be your actual working tape.

6. Reset the computer. Replace the VU-CALC tape and use the immediate command LOAD “” CODE 40000,6912:LOAD “” CODE 29328,5225. Then play the other two parts of VU-CALC into the computer. Rewind the commercial tape and put it away.

7. Now replace the tape with “vcalcP” and get to the end of the Basic you just recorded. Leaving a few seconds after the Basic, SAVE “s” CODE 40000,6912. VERIFY. Now following this on the tape, SAVE “vc” CODE 29328,5225 and VERIFY. Take note of where you are on the tape and remove it from the recorder.

8. Now put your tape containing “tasintcode” (the standard Tasman I/F driver program as previously configured for your printer) into the recorder. LOAD “tasintcode” CODE 64716,652. Rewind this tape and put it away.

9. Put your “vcalcP” tape back in and a few seconds past the end of “vc,” SAVE “t” CODE 64716,652 and VERIFY.

That’s it! Now, reset the computer and use LOAD”” to test the program for proper operation.

  10 CLEAR VAL "29327": BORDER L
N PI: PAPER LN PI: INK LN PI: CL
S : LOAD ""SCREEN$ : LOAD ""CODE
: LOAD ""CODE : GO TO VAL "3200
"
50 RANDOMIZE USR VAL "64719"
51 LPRINT CHR$ VAL "27";CHR$ V
AL "27";CHR$ VAL "77";CHR$ VAL "
27";CHR$ VAL "0";
52 INPUT "Title: ";a$
53 LPRINT CHR$ VAL "27";CHR$ V
AL "14";" ";a$
60 LPRINT CHR$ VAL "27";CHR$ V
AL "15";
62 INPUT "Left Margin (Condens
ed) ";s
63 LPRINT CHR$ VAL "27";CHR$ V
AL "27";CHR$ VAL "77";CHR$ VAL "
27";CHR$ s
68 INPUT "Start Column ";n: IF
n<1 THEN LET n=1
69 INPUT "Finish Column ";m: I
F m>(n+18-(INT ((s+6)/7))) THEN
LET m=n+18-(INT ((s+6)/7))
70 INPUT "Start Line ";q: IF q
<1 THEN LET q=1
71 INPUT "Finish Line ";r: IF
r>50 THEN LET r=50
72 IF m>50 THEN LET m=50
73 FOR a=1 TO (m-n+1)
75 LPRINT TAB (1+(a*7)-LEN STR
$ (a+n-1));a+n-1;
80 NEXT a
90 LPRINT
120 FOR i=((q-1)*350) TO ((r-1)
*350) STEP 350
125 LPRINT CHR$ VAL "32";
130 FOR k=((n-1)*7) TO 350
140 LPRINT CHR$ PEEK (34573+k+i
);
145 IF k=((m*7)-1) THEN LET k=3
50: LPRINT CHR$ VAL "27";CHR$ VA
L "13"
150 NEXT k
160 NEXT i
173 FOR a=1 TO (m-n+1)
175 LPRINT TAB (1+(a*7)-LEN STR
$ (a+n-1));a+n-1;
178 NEXT a
179 LPRINT
180 LPRINT CHR$ VAL "27";CHR$ V
AL "18"
190 RETURN
2000 GO TO USR e3
3000 GO SUB 1200: PRINT AT 9,2;"
ENTER 1 : EXIT PROGRAM"'TAB 9;
"2 : CLEAR WORKSHEET"'TAB 9;"3
: RETURN TO VU-CALC"'TAB 9;"4 :
PRINTOUT": INPUT "OPTION? ";a
3010 IF a>0 AND a<5 THEN GO TO (
3000+a*100)
3200 CLEAR 29327: DIM b$(100): D
IM c$(20): GO SUB VAL "1200"
3400 CLS : GO SUB 50: GO TO 3000
4000 GO SUB VAL "1100": SAVE a$C
ODE zz,(PEEK bfre+256*PEEK (bfre
+1)-zz): CLS : PRINT AT 5,1;"Rew
ind and Play Tape to Verify"''"
GO TO 3000 on ERROR and ReSAVE":
VERIFY ""CODE : CLS : GO TO USR
e2

(c) 1985 C.P. Morrissey. All rights reserved. Do not copy or reprint in whole or part without express written permission of the author. Commercial use strictly prohibited.

NOTES:

a) This program was written for use on the Star SG-10 Printer. Lines in the program which may require modification for your printer are: 51, 53, 60, 63, 69, 145 and 180. With only one change (same in LINES 51 & 63) the program runs on the Blue Chip M120/10.

b) With only minor modifications, this program will also drive “136 Column” printers (e.g. Star SG-15, Epson FX-100). This should give you the capability to print up to 32 columns of VU-CALC data!

c) Although there is room to add a few more Basic lines to the program, I have not put in the usual REMark lines to properly document the revisions internally. I present here the notes which have been omitted from the program to conserve memory:

50 Initialize “t” (“tasintcode”) and printer.

51 Initialize left margin to 0. The number “77” herein is one code that doesn’t work with the Blue Chip. Change it to “108”.

53 Commands “One line expanded print”, prints a$ (title).

60 Commands “Condensed print.”

63 Commands “Set left margin = s”. See Note for LINE 51.

69 Checks for more columns than will fit sheet. If you use a print font other than “condensed” (17 cpi) you will likely want to change this the number 18 to a smaller value. See Note e) below. It is also where you would put in a larger value for a “136 Column” printer.

73-80 and 173-180 print the column numbers at the top and bottom, respectively, of the hard copy. Delete or change these to suit your needs. I like the top and bottom system, because it gives me a place to put my ruler when I draw column separating lines.

120-160 The data “fetch”/LPRINT routine. Good luck with modifications. One idea that might be worth the effort is a change to leave spaces between columns. I prefer the extra columns of printout afforded by the existing omission of the spaces. This also avoids splitting text that extends over more than one column.

180 Commands “Pica print” (Stops Condensed print).

2000 See Note d) below.

3200 See Note f) below.

d) Line 2000 disables the “#p” command accessed from the spreadsheet data display. Adding Line 2000 simply causes the program to ignore “#p.” If you like, don’t include line 2000 below (i.e., leave the original line in VU-CALC alone). That will allow you to alternate between printers at your command. Just be sure that if you use “#p”, your T/S 2040 is connected. If this command is invoked, as in the original program, without the T/S 2040 Printer connected, the program will appear to hang. You can get back in action without losing data by using BREAK, GO TO 3000 and then “3: Return to VU-CALC”. Since making these modifications to the program I’ve found the T/S 2040 superfluous.

e) The quality of print from the SG-10 is sufficient to allow use of condensed print for hard copy. If your printer doesn’t have condensed print or isn’t clear enough in that mode, you will get fewer columns per report. The sample herein shows 19 columns, the max I can squeeze on a standard page. Change Line 69 from 18 to one less than your requried maximum number of columns.

f) Line 3200 has been listed before as a cure for the “2: Clear Worksheet” bug in the commercial program. See TIMELINEZ Vol. 2, No. 5 – May 84 – Page 34. If it’s already part of your program, you don’t need to re-enter it here.

g) I’ve also added a VERIFY routine to check data SAVEd from the Program.

For those of you with modems that can download programs, this program is available at the number listed above. It’s your nickel.

During the development of the program modifications, a number of bugs jumped up from unexpected corners. Those bugs are gone. But, if you find others PLEASE let me know. Thanks.