MC - machine code
program name
Basic - basic program
name
Screen - screen string
program name
1. LOAD the program until the screen display is displayed then BREAK and LIST. This listing will give you the starting address of the machine code (found in the line RAND USR #), the name of the MC, and SCREEN$ programs.
2. LOAD the MC program (LOAD “MC” CODE)
3. PEEK the MC program looking for the length. This can be done by looking in the MC until you find a long group of 0’s (say 32).
4.
SAVE "Basic"LINE 1
SAVE "Screen"SCREEN$
SAVE "MC"CODE #1,#2
#1 is the starting address from RAND USR, #2 is the length of the MC routine determined by subtracting the starting address from the ending address found when you peeked the MC and found the start of the 0’s or by using the top of memory 65535 (IE. say start address from RAND USR 42000: 65535-42000 = 23535 then SAVE “MC”CODE 42000, 23535).
Try this short program making sure that you reload the basic loader program should you over write part of it. This will help you find the end of the machine code program.
1 LET k=starting address of MC
2 IF PEEK k=0 THEN PRINT k
3 LET k=k+1
4 GOTO 2
CAUTION DO NOT TRY TO VERIFY THE SCREEN DISPLAY. IT WILL NOT VERIFY.