Put MSCRIPT on EPROM

MSCRIPT is a very useful program. This article is for improving MSCRIPT, although it does not change any of the coding. What we are going to do is make it load faster by transferring it to an EPROM. The following for putting MSCRIPT on an EPROM is only for the original tape version. It will not work on Jack Dohany’s improved and customized versions. This article is for the hardened 2068 user. It requires that you have, or can lay your hands on, the following: one unused 8K X 8 EPROM (2764), one cartridge board (John Oliger or equivelent), one 2068 compatable EPROM programmer (John Oliger or equivelent). One more item that is helpful, but not necessary, is a copy of HOT-Z 2068. You will be entering data from tables 1,2, and/or 3. For the normal version of MSCRIPT, enter data from only tables 1 and 2. If you want fat characters, as in SyncWare News 2:4, then enter the data in tables 1 and 3 only. Also, the data at address 36628 (8F14h) must be changed from 34d to 61d for the fat characters. This point has been marked with an “*” in TABLE 1. Data is entered from the tables left to right and top to bottom. If you will be using the Tasman version of Mscript, there are special instructions for the TASMAN INTERFACE VERSION at the end of this article. If you have HOT-Z (especialy HOT-Z AROS), I recommend using it at this point. Load HOT-Z. Load the machine code portion of MSCRIPT into HOT-Z. Then enter either assembly listings 1&2 for normal characters or assembly listings 1&3 for the fat character version. Remember to include the modifications for the TASMAN Interface if you are using it. Jump on ahead to the BURNING YOUR EPROM section. If HOT-Z is unavailable to you, the first thing to do is to load your MSCRIPT program. Load it using the following comand:

LOAD ""CODE

Load only the machine code portion. Do Not load the basic loader or the screen logo. Next, enter the following basic poker program. This program was borrowed from the Tom Woods’ BREAKTHROUGH newsletter.

10 FOR X=36608 TO 36668 (36694 FOR FAT CHARACTERS)
20 INPUT (X;"=";);Y$
30 IF Y$="" THEN GOTO 60
40 IF LEN Y$=5 THEN LET X=VAL Y$: PRINT X;"=";PEEK X:
GOTO 20
50 POKE X,VAL Y$
60 PRINT X;"=";PEEK X
70 NEXT X: STOP

Save this program. If anything goes wrong you can use it to re-check your code. To run this program use GOTO 10. You will see a number at the bottom of the screen. This number is the address of the data that you will enter into the program. Hit enter after you type in each data value and it will move to the top of the screen. The next address will apear at the bottom of the screen. Remember, for those of you who are going to use the fat characters, the following data has to be changed: the data at addr 36628 has to be changed to 61d. Again, this point has been marked with an “*” in TABLE 1.

Burn Your EPROM

I suggest that you go back and check the code you just entered. This is easily done by flipping the pages in HOT-Z. It’s just as easily done with the basic poker program too. Enter GOTO 10 again. Now instead of entering data, you just hit enter. This will show the address and its data. Check them against the tables. The code you just entered is the AROS I.D. code and the program transfer code. The first 8 bytes are the AROS I.D. code. The rest is the transfer code (and fat character code if included). If you were using the basic poker, save your new code and MSCRIPT as one block of code. Do this by using one of the following two commands:

SAVE "ESCRIPT"CODE 36608,8192
SAVE "FATESCRIPT"CODE 36608,8192

To save from HOT-Z, set the curser to 8F00 and END to AEFF. Now that you have protected yourself from an unforeseen disaster, we will get on to the actual programming of the EPROM. Before we start programming the EPROM, install any other modifications to MSCRIPT you desire. Once the code is in EPROM, the only way you can change it is by burning a new EPROM. If you make any other changes to MSCRIPT, save the entire program to tape as already described when finished. The following is based on using the Oliger EPROM programmer. If you have a different programmer, its program may be different, but everything else will be the same. If you have the most resent version of HOT-Z AROS, then you have the capability to burn your EPROM from HOT-Z. Just follow the instructions in the documentation. Enter the following basic program unless you’re using the above mentioned version of HOT-Z:

10 LET X=8192
20 FOR N=36608 TO 44800
30 POKE X, PEEK N:PRINT AT 10,11,N
40 LET X=X+1:PAUSE 3:NEXT N
50 BEEP 1,1

Zap It

Now save this program. Once it is saved, turn off the computer. Connect the programmer board with EPROM installed to the computer. Connect the programmer power supply and set it to 4.5V. Then turn the computer back on and reload your new MSCRIPT program and the programmer program. Enter the following command: GOTO 10. Switch the programmer voltage to 21V, then hit ENTER. Now sit back and relax for about 12 minutes. The program will beep when it is done. Turn the programmer supply to 4.5V and turn off the computer. Turn off the programmer supply and remove the programmer and the EPROM. Install the EPROM in a properly prepared cartridge board. The EPROM has been programmed to run from 8000H to 9FFFH. Now comes the big test. Plug your cartridge board into the computer and turn it on. MSCRIPT should now be up and running. If it is not, you did something wrong and you will have to go back and recheck your work. You are now finished. I hope you have a working copy of MSCRIPT on an EPROM. I realize that this may seem like a lot of work, but I feel anything that can make using a program easier is worth while. I believe that MSCRIPT is worth the trouble. If you do not want to invest in a disk system, then putting your most used programs on a cartridge is worth the bother. If this helps in making your computer a little less of a hassel to use, you may use it more. In using it more, you may find that it wasn’t such a bad investment after all.

TABLE 1

ADDR   DATA ADDR   DATA ADDR   DATA ADDR   DATA ADDR   DATA
36608     2 36609     2 36610     8 36611   128 36612    15
36613     1 36614     0 36615     0 36616   243 36617    62
36618   240 36619   211 36620   244 36621    33 36622    27
36623   128 36624    17 36625     0 36626   112 36627     1
36628*   34 26629     0 36630   237 36631   176 36632   195
36633     0 36634   112 36635     1 36636#    0 36637    32
36638    17 36639     0 36640#  144 36641    33 36642     0
36643   129 36644    62 36645    48 36646   211 36647   244
36648   126 36649   245 36650   175 36651   211 36652   244
36653   241 36654    18 36655    35 36656    19 36657    11
36658   175 36659   184 36660    32 36661   238 36662   185
36663    32 36664   235

TABLE 2

ADDR   DATA ADDR   DATA ADDR   DATA ADDR   DATA
36665   251 36666   195 36667     0 36668   144

TABLE 3

ADDR   DATA ADDR   DATA ADDR   DATA ADDR   DATA ADDR   DATA
36665    17 36666     0 36667    88 36668   213 36669     1
36670     3 36671    42 36672    54 36673    92 36674    36
36675   126 36676   167 36677    31 36678   182 36679    18
36680    35 36681    19 36682    13 36683    32 36684   246
36685    16 26686   244 36687   225 36688    37 36689    34
36690    54 36691    92 36692   195 36693     0 36694   144

LISTING 1

8F00 02       DATA
8F01 02 DATA
8F02 08 DATA
8F03 80 DATA
8F04 0F DATA
8F05 01 DATA
8F06 00 DATA
8F07 00 DATA
8F08 F3 DI
8F09 3EF0 LD A,F0
8F0B D3F4 OUT (F4),A
8F0D 211B80 LD HL,801B
8F10 110070 LD DE,7000
8F13 012200 LD BC,0022(003D)
8F16 EDB0 LDIR
8F18 C30070 JP 7000
8F1B 010020 LD BC,2000[2072]
8F1E 110090 LD DE,9000[8F00]
8F21 210081 LD HL,8100
8F24 3E30 LD A,30
8F26 D3F4 OUT (F4),A
8F28 7E LD A,(HL)
8F29 F5 PUSH AF
8F2A AF XOR A
8F2B D3F4 OUT (F4),A
8F2D F1 POP AF
8F2E 12 LD (DE),A
8F2F 23 INC HL
8F30 13 INC DE
8F31 0B DEC BC
8F32 AF XOR A
8F33 B8 CP B
8F34 20EE JR NZ,8F24
8F36 B9 CP C
8F37 20EB JR NZ,8F24

LISTING 2

8F39 FB       EI
8F3A C30090 JP 9000

LISTING 3

8F39 110058   LD DE,5800
8F3C D5 PUSH DE
8F3D 010003 LD BC,0300
8F40 2A365C LD HL,(chas)
8F43 24 INC H
8F44 7E LD A,(HL)
8F45 A7 AND A
8F46 1F RRA
8F47 B6 OR (HL)
8F48 12 LD (DE),A
8F49 23 INC HL
8F4A 13 INC DE
8F4B 0D DEC C
8F4C 20F6 JR NZ,8F44
8F4E 10F4 DJNZ,8F44
8F50 E1 POP HL
8F51 25 DEC H
8F52 22365C LD (chas),HL
8F55 C30090 JP 9000

Tasman I/F Notes

For those of you with the Tasman interface, the major difference is that it will not fit on one 2764 (8K X 8) EPROM. You will need two 2764’s or one 27128. The following instructions will be based on programming a 27128 EPROM. Enter the previously described basic poker program but change line ten to read:

10 FOR X=36352 TO 36412 (36438 FOR FAT CHARACTERS)

Enter the data as shown in tables 1&2 for normal characters. If you want fat characters, enter tables 1&3. The data in TABLE 1 must be changed at the following addresses: 36636=114 (8F1Ch=72h) and 36640=143 (8F20h=8Fh). These locations are marked with a “#”. For fat characters, also change the value at 36628 (8F14h) to 61 (3Dh). The starting address for the TASMAN listing is 8E00. This is to allow for the interface code that has been added at 8F00. Once the data has been entered and checked, save your new code and MSCRIPT as one block of code. Do this by using one of the following two commands:

SAVE "ESCRIPT"CODE 36352,8572
SAVE "FATESCRIPT"CODE 36352,8572

From HOT-Z, set the CURSER at 8E00 and END to AF72. Before you start programming the EPROM, install any changes or modifications you wish. Resave if you make any modifications. Enter the following program:

10 RESTORE data: READ src: READ end: READ dest:
READ one: READ three: READ loop: READ line:
READ col
20 POKE dest,PEEK src
30 PAUSE three
40 LET src=src+one
50 LET dest=dest+one
60 PRINT AT line,col;dest
70 IF src<=end THEN GOTO loop
80 DATA 36352,44924,0,1,3,20,10,13

Save this program. Once saved, turn off the computer and connect the programmer board with the EPROM installed to the computer. Connect the programmer power and set it to 4.5V. Turn the computer back on and reload your new MSCRIPT program and the programmer program. Enter the following statment:

LET p=10: LET data=80

Press enter. Make sure the 64/128 switch is in the 128 position. Set the programmer supply to 21V and key in GOTO p and press enter. Now sit back and relax for about 12 minutes. When the programming is done, turn off the programmer supply and turn off the computer. Remove the programmer and the EPROM and install the EPROM on a properly prepaired cartridge board. The EPROM has been programmed to run from 8000H to A200H. Test the EPROM assembly as directed above.