Authors
Publication
Pub Details
Date
Pages
BASIC Terms
MC – machine code program name
Basic – basic program name
Screen – screen string program name
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 machine code and the SCREEN$ program.
LOAD the machine code program (LOAD “MC” CODE).
PEEK the machine code program looking for its length. This can be done by looking at the machine code until you find a long group of 0s (say 32).
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 machine code routine determined by subtracting the starting address from the ending address found when you peeked the machine code and found the start of the 0s or by using the top of memory 65535 (ie. say start address from RAND USR 42000. 65525-42000 = 23535. Then SAVE “MC” CODE 42000,65535).
Try this short program making you reload the BASIC loader program should you overwrite part of it. This will help you find the end of the machine code program.
1 LET k=starting address of machine code
3 IF PEEK k=0 THEN PRINT k
3 LET K=K+1
4 GO TO 2
Caution: do not try to verify the screen display. It will not verify.