I've got a question for those who have dabbled with OptROM code.

Question: What is the proper way to exit out of the OptROM and back to BASIC.

Reason: The NEC 8201a doesn't have the LINE function build into the system ROM. 
There is a RAM version of the utility. I managed to relocate the code so that 
it runs in the ALT LCD section of memory. But to prevent having to load the 
LINE code from a TPDD device, I put code into some of the empty space I have in 
the SARDOS ROM to load that code. I call it similar to how the cold start 
recovery routine of TS-DOS is called. I poke a value and then check for it when 
EXEC 62394 is called. That works, and I am able to load the code into ALT LCD, 
but I can't seem to get out of the OptROM cleanly. If I try RET then it ends up 
in an infinite loop. If I do a RST 1, similar to how the TS-DOS recovery code 
does, it loads properly but kicks an SN error in BASIC.

Hope somebody can shed some light on this because I've got about 11k of space 
in the SARDOS ROM that I would like to put some of the NEC utilities in.

Kurt

Reply via email to