Masterfile, MF-Print, Graphic 24 and LKDOS

See all articles from Sinc-Link v11 n1
Author(s): Ken Shoenberger
Publication: Sinc-Link
Pub Details: Sinc-Link v11 n1 (Volume 11, Issue 1)
Date: January/February 1993
Pages: 9-11

What follows is a review of my pirating of several programs furnished me by heretofore upstanding citizens. I wanted a file program for my library of “Big Band” music which is on 252 reel-to-reel tapes. Presently I have 17 boxes of locator cards arranged in alphabetical order by song title. Each card lists the title, vocalist (if any), band, date of recording (if known), tape#-index count-track, and length (if prevously timed). PRO-FILE did not seem to offer itself to the use I wanted to make of the file after processing for computer use.

The set-up for screen display was done using MF basic modified by George Chambers to replace the Microdrive LOAD and SAVE instructions with LKDOS drives 0-4. The tape saves were left pretty much intact. The BASIC program interacts with the MC program using GO TO USR R. (R=59363) Before returning to BASIC the BC register is loaded with the BASIC line number to which to go.

After starting to enter the titles into the MASTERFILE program that I then had, I wanted a means to print them to pages of loose leaf note book paper. My copy of MASTERFILE lacked the MF-PRINT programs. (When you pirate, you don’t always know what is available.) What was available was GRAPHIC 24 which at the time was imbedded within the OMNIBUS program (of which I didn’t know at the time.) George had sent me a disassembly print-out of the program which was located at 24580 to 24821.

Listing #1 is the AUTOLOAD program, which will boot the screen copy to large printer program into DOS so that NMI stop and “F” or PRINT #4: DATA 0 will print to the large printer whatever is on the screen. “POKE 16152, 5182” makes the printout only 20 lines. “POKE 16152, 5694” will get you 22 lines. Without the POKE you get all 24 lines. The next four POKEs eliminate the beginning and end blank line. The CLEAR 57327 is required on my version of MASTERFILE before loading. If you version calls for a different location then that is what should go here. I “purged” the copy I used and called it “EMPTY1.B1.” The rest of the program is the AUTOLOAD SAVE.

Listing #2 is the modified MASTERFILE BASIC program which I call “EMPTY1.B1”

Since the screen print only uses half the page width, I added a “USER” routine (Lines 4900 – 4990) to set the margin for printing to left or right side of the page. My records were displayed with 4 lines and a blank line. This put 4 records and the first two lines of the fifth on the screen. These extra 2 lines were eliminated from the printing by POKEing the program in LKDOS RAM at 16153 with 20 instead of 24 for the number of lines to print. I also POKEd 16106-16108 and 16233-16235 with zeros to disable the line feeds which were not needed. I re-placed the “COPY” command in line 4010 with “PRINT #4: DATA 0.” This now allows you to print to the large printer the records selected while in DISPLAY and pressing “P.” One caution about this: If you ask for All, have sufficient paper to print the “All” you have selected.

All of this was then rendered essentially useless after “discovering” MFP. Now I use the screen copy to print screens which I need to remember later, such as the formats and specifications developed when setting up the display and print spec’s.

I have modified the tape or disk drive and catalog calling routine not to change its use but to prevent its being called on other occasions when the same routine is used for a keyboard input.

It is possible to use MF-PRINT by following the User Guide, however you must be able to visualize the end print-out before tackling the specification set-up. I ended with “Title” and “Vocal” on the first line in compressed PICA and the rest on the second line. Getting the first line in compressed PICA was elusive. Your printer must accept the print codes which you put in the spec using the MFP utility program. The printer codes are for the whole line. Since my first line was to be “Title” and “Vocal”, at first I tried printer codes to make “Title” compressed and “Vocal” regular. That came out all regular. To send printer codes LKDOS must be conditioned not to eliminate character codes. This is done in LINE 4211 by POKE 16093, 32. However this now messed up the Newline intruction. POKE 60630, 0 fixed this by NOPing a RET at 60630 in the overlay program which then let the carriage return routine go to the line feed routine before RETing.

The “file” saving (F$) is so set up that by answering the request for name with “ENTER” you will get the name that is held in C$ and shown on the Main Menu, if that is not what you want, then type in the name (up to 6 char) that you do want.

I have modified the program saving routine by making the “mfcode” have “C2” as a suffix. I have the “mfpovl” program in and this is saved with the program save.

I don’t remember reading anywhere “How and What” to print, but it is the “Selected” group of records in the order set up by your display format. The Master File program is a dream (nightmare?) to select records to display/print. Although it will only show 22 lines on the screen, with enough paper you can print the whole file in one swoop. I wanted to print front and back on the paper so I used the “paper out” stop on the printer by feeding only one sheet at a time and then printing the reverse side with the next group.

I hope this stirs some interest in using MASTERFILE. I think it is a very good program for most file uses.

Ken Shoenberger, [address omitted]

Listing #2

   1 LET od=VAL "4": IF dt=od THEN PRINT #od: OPEN #VAL "3","lp"
2 PRINT ;: PAPER VAL "7": GO TO USR VAL "58285"
3 PRINT #od: LOAD "mfputi.B1"
4: PRINT #od: LOAD "mfpovl.C1"CODE : GO TO R/R
5 PRINT #dt: LOAD "mfcode.C1"CODE : GO TO R/R
6 PRINT #dt: SAVE "mfcode.C1"CODE VAL "57328",VAL "8208": GO TO R/R
50 PRINT AT VAL "15",VAL "1";"Larken Dr.(0-4) or Cassette(5)"
60 LET d=CODE INKEY$-VAL "48": IF d<R-R OR d>VAL "5" THEN GO TO VAL "60"
63 IF d<>VAL "5" THEN PRINT #od: GO TO d
65 LET dt=VAL "2": IF d<>VAL "5" THEN LET dt=od: BEEP VAL ".1",R-R
67 RETURN
70 IF dt=VAL "4" THEN RETURN
72 PRINT AT VAL "17",VAL "2";"Verify ? Y/N"
75 IF INKEY$="Y" OR INKEY$="y" THEN BEEP VAL ".1",R-R: PRINT AT VAL "17",VAL "8"; PAPER VAL "8"; BRIGHT R/R;"ing...": GO TO VAL "90"
80 IF INKEY$="N" OR INKEY$="n" THEN RETURN
85 GO TO VAL "75"
90 IF P THEN VERIFY N$: VERIFY ""CODE : RETURN
95 VERIFY n$ DATA f$(): RETURN
96 IF dt=VAL "2" THEN LET n$=c$( TO 10): RETURN
97 LET n$=c$( TO 6): LET n$=n$+".A$": RETURN
98 IF dt=VAL "2" THEN LET n$=c$( TO 10): RETURN
99 LET n$=c$( TO 6): LET n$=n$+".B1": RETURN
100 RETURN
4000 IF c$(1)="G" THEN GO SUB 50: IF d<>VAL "5" THEN CLS : PRINT #4: CAT
4005 INPUT PAPER VAL "7";(c$( TO VAL "32")); LINE c$: GO TO USR R
4010 PRINT #4: DATA 0: GO TO USR R
4020 LET P=R-R: GO SUB VAL "96": PRINT #dt: SAVE N$ DATA f$(): GO SUB VAL "70": GO TO USR R
4025 STOP
4030 LET P=R/R: GO SUB VAL "98": PRINT #dt: SAVE N$ LINE VAL "4037": PRINT #dt: SAVE "mfcode"+(".C2" AND dt=od)CODE VAL "57328",VAL "8208": GO SUB VAL "70": GO TO USR R
4031 GO TO USR R
4037 PRINT #dt: LOAD "mfcode"+(".C2" AND dt=od)CODE : GO TO R/R
4040 LET c$=STR$ (VAL c$( TO VAL "14")/VAL c$(VAL "15" TO VAL "19")): GO TO USR R
4050 GO SUB VAL "96": CLS : PRINT '("Play the tape..." AND dt=VAL "2")+("Loading... " AND dt=od);n$ AND dt=od: PRINT #dt: LOAD N$ DATA f$(): GO TO USR R
4200 GO SUB 50: CLS : PRINT #od: CAT : PRINT AT VAL "2",r-r; BRIGHT r/r; PAPER VAL "6";"Give name of print spec to load": INPUT N$: IF N$="" THEN GO TO R/R
4201 LET n$=n$+".A$": PRINT '("Play the tape..." AND dt=VAL "2"): PRINT #dt: LOAD N$ DATA P$(): GO TO USR R
4210 REM See MFP User Guide
4211 PRINT #od: POKE 16090,150: PRINT #4: POKE 16092,8202: POKE 60630,0: GO TO USR r
4290 CLOSE #VAL "2": GO TO USR R
4900 INPUT "Set Column? Y/N ";a$: IF a$="N" OR a$="n" THEN GO TO VAL "9000"
4970 INPUT "Left or Right? ";a$
4980 PRINT #od: POKE VAL "16094",od: IF a$="R" OR a$="r" THEN PRINT #od: POKE VAL "16094",VAL "40"
4990 LPRINT : GO TO 1
7000 LET c$="": GO TO USR R
9000 BEEP R/R,R-R: PAUSE 0: GO TO USR R
9900 PRINT #4: SAVE "EMPTY1.B1" LINE VAL "4037"

Listing #1

  10 RANDOMIZE USR 100: OPEN #4,"dd": RANDOMIZE USR 24580: PRINT #4: POKE 16152,5182: PRINT #4: POKE 16106,0: PRINT #4: POKE 16107,0: PRINT #4: POKE 16233,0: PRINT #4: POKE 16234,0: CLEAR 57327: PRINT #4: LOAD "Final1.B1"
9000 CLEAR 27000: RESTORE 9030: FOR n=23300 TO 23309
9010 READ a: POKE n,a
9020 NEXT n
9030 DATA 205,102,0,62,3,211,244,201,0,0
9040 RANDOMIZE USR 23300
9050 RUN

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