“Miz.B4” (A Mizzery Saver)

See all articles from Update July 1989
Author(s): Bill Jones
Publication: Update Magazine
Pub Details: Update July 1989
Date: July 1989
Pages: 4

OR- A program for Programmers

Dontated to Public Domain by: Update Magazine

This one is for the hard working programmers who contribute their works to magazines or to their user group. We will set the scenario. You have worked away with an assembly program and finally it is checked out and working. You are tired of the program, and you’d like to go on to something else. But you aren’t through yet! It is pure misery to have to construct a LOADER program with a table of Decimal Code numbers to POKE the code to memory and save the code program to disk. But you have to do that in order to tell people how to work your code into memory and into a disk file.

We will name this program “Miz.B4”, because it relieves you of creating a loader program “that B-4 Now has caused you so much Mizzery”- (miz.B4 now, that is).

“Miz.B4” publishes your code loader/saver in the form of a Basic LLIST of the loader program. The data lines are created by PEEKING your Code program from memory. Your “pupil” who types the program in is given the Loader already prepared to key in. Miz.B4 provides a check sum at the end for the “Joe or Jane” to key in to check their key-in accuracy. And YOU, the programmer, can go on to working on another program without the mizzery of having to create that long table of decimal numbers. For a proof of this, look at the “LOADER PROGRAM LISTING” given with the program “TS-2068 Data Input” elsewhere in this issue. That Loader program was created by “this-un”.

As most programmers can tell, line 90 initializes LKDOS for printing a 32 column LLIST, and lines 100 and 250 uses LKDOS syntax for LOAD and SAVE. Change these lines to suit your DOS requirements.

Instead of a lot of other line number explanations, just key in the program and work it on one of your code programs that you know the starting address number in memory and the Byte Length. Then <RUN> and watch it create your LOADER/SAVER LLIST Prgram, complete with Filled-in DATA lines, ready to publish. Have some fun next time, instead of working on another Loader program and decimal table after your next MC Code creation.

_BJ-

80 REM **** Create a Loader   program with DATA lines for a   CODE Program in disk. ****
85 REM ** Donated to Public Domain by Update Magazine ** "
90 BORDER 0: PAPER 0: INK 7: CLS : RANDOMIZE USR 100: OPEN #3,"lp": RANDOMIZE USR 100: POKE 16096,0: RANDOMIZE USR 100: POKE 16090,31: RANDOMIZE USR 100: POKE 16092,0: RANDOMIZE USR 100: POKE 16094,8: LPRINT
100 LET a=2000: LET p=0: RANDOMIZE USR 100: CAT ".C1",: INPUT "Code File + EXT?";x$: RANDOMIZE USR 100: LOAD x$CODE : INPUT "Start Adr or Where to SAVE the Code?";x1: INPUT "Byte Length?";x2: LET x=0
105 LLIST 200
110 FOR n=x1 TO x1+x2-1 STEP 20
120 LPRINT a;" DATA ";: LET a=a+2
124 FOR y=n TO n+19: LET p=PEEK y: IF y>x1+x2-1 THEN GO TO 170
126 IF y<n+19 THEN LPRINT p;",";: LET x=x+p
128 IF y=n+19 THEN LPRINT p: LET x=x+p
130 NEXT y
160 NEXT n: STOP
170 LPRINT p: LET x=x+p: LPRINT a;" REM Check sum=";x: STOP
200 REM *** LOADER PROGRAM LISTING **
210 CLS : INPUT "Input Check Sum of Program";ck: INPUT "Input Start Addres to SAVE Code ";x1: INPUT "Input Byte Length:";x2
220 RESTORE 2000: LET x=0: FOR n=x1 TO x1+x2-1: READ a: LET x=x+a:: POKE n,a: REM *Poker*
225 NEXT n
230 LET b=0: FOR n=x1 TO x1+x2-1: LET b=b+PEEK n: REM * Get Actual Sum *
232 NEXT n
234 IF b=ck THEN GO TO 250
240 BEEP 2,6: PRINT "ERROR! Recheck work.": STOP
250 CLS : INPUT "Key In a Code Name To SAVE. Include Extension-";a$: INPUT "Input Starting Address for SAVE ";x: RANDOMIZE USR 100: SAVE a$CODE x,x2
260 CLS : PRINT AT 10,0;"The code program has been SAVED at address ";x: STOP

See Page 51 for “Data Input” and its Loader created with this program.

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