Why not just put all the LINE code into your optrom and run it from there? You can do a far call to the opt ROM. Maybe that's what you're doing. Just don't see why altlcd is in involved.
The procedure for a far call and return is a trick but it is covered in Secrets of the ROM book by Mo Budlong. You don't have that? I can write a wiki page based on it. Presumably you should be able to sneak the far call and return into your basic program as a special string or as a hidden high numbered line. -- John. On Tue, Sep 10, 2019, 6:37 AM Kurt McCullum <[email protected]> wrote: > 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 >
