Relocating Machine Language Programs
This month we have some information for you that should reinforce your confidence in Radio Shack's wanting to support what we sell. One question which is asked several times a day is, "Why won't Pyramid (or Raaka-Tu, or Eliza, or any other Machine Language Tape Based program) run from my disk system? I just paid $400.00 to upgrade to disk and nothing will run."
The answer to that question is very simple. These games were designed to load into a 16K computer, and therefore, load very low in user RAM. That just happens to be the same area where TRSDOS loads. When you load a game on top of TRSDOS, the computer will either re-boot or just "hang up."
First, let me assure you that it has never been a matter of not wanting to help you. Due to the work of many dedicated individuals, we are now able to give you a routine which will allow you to relocate the programs to an area of memory which does not interfere with TRSDOS. So much for the answer. Now on to the solution.
In general, to get a tape based, machine language program onto disk, you are going to go into DEBUG to enter two very short machine language programs. The first will move your program up into high memory (out of the way of TRSDOS) and the second will move it back to its normal place and execute it.
The Hexadecimal values shown in the tables are the actual program addresses. For a machine language program, any address used must have the LSB (Least Significant Byte) first, then the MSB (Most Significant Byte) when entered into the two move routines.
Example:
Desired MSTART - 7C20 Enter as 20 70
Desired LENGTH - 0D10 Enter as 10 0D
Desired ENTRY - 4AF6 Enter as F6 4A
To help, we've broken them into columns and labeled them as Si & S2 (the 2 byte start address), E1 & E2 (the 2 byte execute address), L1 & L2 (the 2 byte length address), and M1 & M2 (the 2 byte Move Start address). Remember, these are only the "variable names." Use the values from the Address Allocation Table in this article.
Here is the Move-Up routine:
Now, the Move-Back routine:
LD HL,START LD DE,MSTART LD BC,LENGTH LDIR
JP REBOOT
So, what does this mean? Let's take an example. For Pyramid, we-would type in, under DEBUG, 21 00 4311 20 80 01 FE 3C ED B0 C3 00 00. We will continue to use Pyramid in the examples, but you should follow the table for any of the other programs. Just change the values for S2, S1, M2, M1, L2 and L1.
21 M2 Ml 11 S2 SI
01 L2 Ll ED B0
C3 E2 El
LD HL,MSTART LD DE,START LD BC,LENGTH LDIR
JP ENTRY
From the table:
START 4300
END 7FFE
ENTRY 4300
LENGTH 3CFF
MSTART 8020
MEND BD40
MENTRY BD30
MOVE-UP 8010
1. From TRSDOS Ready, type: (For Model I, press <BREAK) after pressing <ENTER).
DEBUG <ENTER> M
8010 <SPACE BAR> (Move up from table)
2. Enter the Move-Up routine: (For Model I, press (SPACEBAR) after each pair of numbers.)
3. Press < ENTER) to finish that entry and < M) again to enter the Move-Back routine:
BD30 <SPACE BAR> (MENTRY from1the table)
4. Enter the Move-Back program:
5. Exit to ROM BASIC by holding down the BREAK key while pressing RESET.
6. Press <ENTER) to answer the prompt(s), then type SYSTEM (ENTER). When *? appears, type PYRMD <ENTER). When *? appears again, type /32784 <ENTER). (The address 32784 is from the Exec Moveup Column of the table, and causes execution of the Move-Up program.)
SYSTEM <ENTER> *? PYRMD <ENTER> *? /32784 <ENTER>
(TRSDOS will automatically re-boot)
7. Then, at TRSDOS Ready, type the following to create your disk file:
(for a Model III)
DUMP PYRMD/CMD (START=8020,END=0BD40,TRA= 0BD30) <ENTER>
DUMP PYRMD/CMD (START=X'8020',END=X'0BD401, TRA=X10BD30') <ENTER>
Notice that a zero has been added before any number which begins with a letter.
Now let's do another example—Invasion Force. From the table:
START 5000
END 7100
ENTRY 5000
LENGTH 2101
MSTART 7120
MEND 9240
MENTRY 9230
1. From TRSDOS Ready, type:
DEBUG <ENTER> M
7110 <SPACE BAR> (Move up from the table)
2. Enter the Move-Up routine:
3. Press <ENTER) to finish that entry and <M> again to enter the Move-Back routine:
9230 <SPACE BAR> (MENTRY from the table)
4. Enter the Move-Back program:
5. Exit to ROM BASIC by holding down the BREAK key while pressing RESET.
6. Answer the Prompt(s). When Ready appears, type in
SYSTEM <ENTER>. After *? appears, type in INVADE <ENTER) and let the program load. When *? appears, type in /28944. This will cause the Move-Up program (which is located at 7110 Hex or 28944 Decimal) to execute.
SYSTEM <ENTER>
(TRSDOS will automatically re-boot)
7. Then, at TRSDOS Ready, type the following to create your disk file:
DUMP INVADE/CMD (START=7120,END=9240,
Or, on a Model I, when DOS READY appears, type:
DUMP INVADE/CMD (START=X171201,END=
If you follow the procedure outlined here EXACTLY as shown, you shouldn't have any trouble. If your "moved" program fails to execute, check the following:
1.Correct addresses used for the program moved, M1,M2,S1,S2,L1,L2,E1 and E2.Correct addresses used and correct programs entered for Move-up and Move-Back.
2.Correct decimal execute address used for Move-up
Address Allocation Table
NOTICE TO MODEL I OWNERS: This information has not been tested on a Model I. We know that you will have problems on programs like Raaka-Tu and Pyramid. A follow-up article in the near future will give you a reliable way to move these other programs.
START END ENTRY LENGTH MSTART MEND MENTRY Required
Program Name S1 S2 E1 E2 L1 L2 M1 M2 Move Move Exec Memory
Back Up Moveup Size
START END ENTRY LENGTH MSTART MEND MENTRY Required
Program Name S1 S2 E1 E2 L1 L2 M1 M2 Move Move Exec Memory
Back Up Moveup Size
|
EDITOR ASSEMBLER |
43 00 |
5D 40 |
46 |
BA |
1A |
41 |
70 |
00 |
8A 60 |
8A |
50 |
60 |
00 |
24576 |
32K | |
|
SERIES 1 | ||||||||||||||||
|
EDITOR ASSEMBLER |
4A EE |
63 10 |
4B |
EA |
18 |
23 |
70 |
00 |
88 40 |
88 |
30 |
63 |
20 |
25376 |
32K | |
|
T-BUG |
43 |
80 |
48 24 |
43 |
A0 |
04 |
A5 |
70 |
00 |
74 CO |
74 |
BO |
60 |
00 |
24576 |
32K |
|
PROGRAM CONVERSION |
4A |
F6 |
4F 7D |
4A |
F6 |
04 |
88 |
70 |
00 |
74 A0 |
74 |
90 |
60 |
00 |
24576 |
32K |
|
DATA CONVERSION |
43 |
00 |
45 25 |
43 |
00 |
02 |
26 |
70 |
00 |
72 40 |
72 |
30 |
60 |
00 |
24576 |
32K |
|
IN MEMORY-INIT |
43 |
80 |
47 8C |
43 |
80 |
04 |
OD |
70 |
00 |
74 20 |
74 |
10 |
60 |
00 |
24576 |
32K |
|
IN MEMORY-RETREV |
43 |
80 |
4B 8C |
43 |
80 |
08 |
OD |
70 |
00 |
78 20 |
78 |
10 |
60 |
00 |
24576 |
32K |
|
IN MEMORY-SORT |
43 |
80 |
46 DE |
43 |
80 |
03 |
5F |
70 |
00 |
73 70 |
73 |
60 |
60 |
00 |
24576 |
32K |
|
TERM |
50 |
00 |
50 BF |
50 |
00 |
00 |
CO |
70 |
00 |
70 E0 |
70 |
DO |
60 |
00 |
24576 |
32K |
|
ELIZA |
50 |
00 |
78 00 |
50 |
00 |
28 |
01 |
78 |
20 |
A0 40 |
AO |
30 |
78 |
10 |
30736 |
32K |
|
TALKING ELIZA |
46 |
00 |
7C 00 |
46 |
00 |
36 |
01 |
7C |
20 |
B2 40 |
B2 |
30 |
7C |
10 |
31760 |
32K |
|
MICRO MOVIE |
43 |
00 |
4C FF |
43 |
00 |
0A |
00 |
70 |
00 |
7 A 20 |
7A |
10 |
60 |
00 |
24576 |
32K |
|
MICRO MUSIC |
43 |
00 |
49 70 |
43 |
00 |
06 |
71 |
70 |
00 |
76 90 |
76 |
80 |
60 |
00 |
24576 |
32K |
|
MICRO MARQUEE |
4A |
00 |
4F FF |
4B |
00 |
06 |
00 |
70 |
00 |
76 20 |
76 |
10 |
60 |
00 |
24576 |
32K |
|
INVASION FORCE |
50 |
00 |
71 00 |
50 |
00 |
21 |
01 |
71 |
20 |
92 40 |
92 |
30 |
71 |
10 |
28944 |
32K |
|
CHECKERS-80 |
50 |
00 |
77 00 |
50 |
00 |
27 |
01 |
77 |
20 |
9E 40 |
9E |
30 |
77 |
10 |
30480 |
32K |
|
PYRAMID |
43 |
00 |
7F FE |
43 |
00 |
3C |
FF |
80 |
20 |
BD 40 |
BD |
30 |
80 |
10 |
32784 |
32K |
|
RAAKA-TU |
43 |
00 |
7F FF |
43 |
00 |
3D |
00 |
80 |
20 |
BD 40 |
BD |
30 |
80 |
10 |
32784 |
32K |
|
HAUNTED HOUSE |
42 E9 |
4F FF |
42 |
E9 |
0D |
17 |
70 |
00 |
7D 30 |
7D |
20 |
60 |
00 |
24576 |
32K | |
|
SNDFLR |
43 5E |
4E A0 |
43 |
5E |
OB |
43 |
70 |
00 |
7E 60 |
7E |
50 |
60 |
00 |
24576 |
32 K | |
|
ASTROLOGY |
43 |
00 |
7F FF |
43 |
00 |
3D |
00 |
80 |
20 |
BD 40 |
BD |
30 |
80 |
10 |
32784 |
32 K |
|
PADDLE PINBALL |
50 00 |
74 C1 |
60 |
B0 |
24 |
C2 |
75 |
00 |
99 E0 |
99 |
DO |
74 |
DO |
29904 |
32K | |
|
FLYING SAUCER |
42 EA |
4F FA |
42 |
EA |
OD |
11 |
70 |
00 |
80 30 |
80 |
20 |
70 |
00 |
28672 |
32K | |
|
TAPE SCRIPSIT MI |
43 |
00 |
69 C5 |
43 |
00 |
26 |
C6 |
70 |
00 |
96 E0 |
96 |
DO |
69 |
DO |
27088 |
32K |
|
TAPE SCRIPSIT Mill |
42 |
E9 |
6C A0 |
43 |
03 |
29 |
B8 |
70 |
00 |
99 DO |
99 |
CO |
6C |
BO |
27824 |
32K |
|
TINY PASCAL MI |
58 40 |
7F FD |
58 |
40 |
27 |
BE |
80 |
00 |
A7 DO |
A7 |
CO |
A7 |
DO |
42960 |
32K | |
|
PAS32K (32K Tiny Pascal) |
4D 90 |
73 C6 |
4D |
90 |
26 |
37 |
74 |
00 |
9A 50 |
9A |
40 |
73 |
DO |
29648 |
32K | |
after you loaded your program from disk.
3.Correct addresses used for DUMP to disk, especially the execute address (TRA = xxxx) NOTE
This procedure WILL NOT make Model I-only programs (PASCAL, TALKING ELIZA, T-BUG, etc.) work on a Model III. Neither will this make your tape program use the disk for anything other than being able to load the program from it. If the program used cassette storage for data before you moved it to disk, it will still use cassette for data storage.
To execute Pyramid from disk at TRSDOS Ready
PYRMD <ENTER> LOAD PYRMD/CMD <ENTER> BASIC2 <ENTER> <ENTER>
SYSTEM <ENTER> /48432 <ENTER> (Decimal equivalent, of MENTRY from the table.)
Computer Customer Services Address and Phone Numbers
Post a comment