Atari MacroDOS:
Part 2
Jerry Allen
Last month we introduced "Atari MacroDOS" and presented a BASIC program which loads the MacroDOS machine language. This month we'll look at some technical details of MacroDOS and present a disassembly of the program.
Assembler users can alter the MacroDOS commands table (CMDTAB) if they so desire. Just remember to change lines which check for command input to reflect the new command letter. Also, revise TAB1 if necessary.
You can append another AUTORUN.SYS program to the end of MacroDOS, such as a menu loader for BASIC.
Assuming you have MacroDOS up and running as AUTORUN.SYS, enter DOS, then load the other AUTORUN.SYS from another disk. SAVE with APPEND ("D:AUTORUN.SYS"). Enter the beginning and ending addresses at the @ prompts. If necessary, return to the cartridge and POKE or otherwise change the INIT and RUN addresses. Return to DOS and SAVE with append again to pick up the addresses just altered.
Finding Load Addresses
If you can't figure out the load addresses, use this program:
10 0PEN#2, 4, 0,"D:YOURPROG.OBJ 20 FOR 1=1 TO 6 30 GET #2,A 40 PRINT A 50 NEXT A 60 CL0SE #2
The first two bytes should be a header of 255 ($FF). The next four bytes will be the beginning and ending addresses of the load (two-byte numbers in low byte, high byte format).
If the file loads to multiple address areas (including RUN and INIT) after the first block of memory is loaded, OS checks for a new header of 255,255. If it is there, the header is ignored, and the next four bytes will be the new from-to load addresses.
Loading With Page 6
Loading RUN with page 6 (1536) would look like:
$EO(224),$02(2),$EO(224),$02(2),$00(0),$06(6)
(without the header). With a little math and modification of the program, you could find all the load addresses of any compound load file. If you don't want to type the programs in, send $3, and a disk or tape with an SASE mailer.
Jerry Allen
1906 Carnegie #E
Redondo Beach, CA 90278
MacroDOS, Machine Language Source Code
Refer to the "Automatic Proofreader" article before typing this program in.