My program TextSweeper makes use of both ALTLCD and storing programs in arrays.
Example here: https://github.com/Grimakis/TextSweeper/blob/master-protected/src/TSWEEP.DO On Fri, Apr 11, 2025 at 12:03 PM John R. Hogerhuis <[email protected]> wrote: > There are ways to do that but you cannot just use basic CALL. > > First you need to make sure that that area is available. > > Second there is only one ROM selected at a time and they get mapped to the > same spot in the cpu address space. Normally it's the BASIC ROM that is > selected. So if you CALL from basic without setting up the ROM area it will > call the basic ROM, not your code in opt ROM. You need to embed special > machine language code in your basic program to switch rom, enter the option > ROM, do something, then restore the basic ROM and return. > > I have a book by Mo Budlong that covers this process but I can do a write > up if it would help you. > > I think you're probably better off first experimenting with routines in > cleared RAM, the ALTLCD area or embedded in program variables (like strings > or arrays). > > But let us know what you want to do. > > -- John. > > On Fri, Apr 11, 2025, 6:00 AM Georg Käter < > [email protected]> wrote: > >> Hello community, >> >> >> >> thanks to all of you for your hints. My idea is use the "codefree" area >> in an OptROM for >> >> some own code. My thoughts to call this code >> >> >> from BASIC: CALL 63012,73 (73 is just an example) >> >> >> >> So far in TS-DOS OptROM code I changed following to see if it works. >> >> 0000h: C3 B2 00 -> C3 00 7F >> >> 7F00h: FF FF FF-> C3 B2 00 >> >> This works. >> >> And now my question:Which code to add @ 7F00h to compare against value >> from CALL statement? >> >> >> >> Regards >> Georg >> >> ========== Ihre Nachricht ========================================== >> >> *von* : Ron Hudson <[email protected]> >> *gesendet* : Mittwoch, 2. April 2025, 21:44 >> *an* : "[email protected]" <[email protected]> >> *Betreff* : [M100] How to set CPU register from BASIC >> >> __________ Originalnachricht _______________________________________ >> >> You'd probably have to poke a short assembly/machine code program into >> memory then call it. But after you got back and BASIC started running >> again your value would probably get overwritten. >> >> >> >> >> ------------------------------------------------------------------------------------------------- >> Ronald Hudson. >> >> Sent from my Linux Desktop. >> >> ------------------------------ >> *From:* M100 <[email protected]> on behalf of John R. >> Hogerhuis <[email protected]> >> *Sent:* Tuesday, April 1, 2025 8:18 AM >> *To:* [email protected] <[email protected]> >> *Subject:* Re: [M100] How to set CPU register from BASIC >> >> >> >> On Tue, Apr 1, 2025, 3:45 AM Georg Käter < >> [email protected]> wrote: >> >> Hi community, >> >> >> >> how to set CPU register A, H and others direct from BASIC by i.e. POKE >> command? >> >> >> It depends on what you're doing next. >> >> I'm guessing you're setting the parameter for a CALL you want to make? >> Maybe calling the ROM or some code you are writing? >> >> -- John. >> >> >> >> __________ Ende Originalnachricht __________________________________ >> >> >> *Confidentiality Notice: *This message is confidential. The information >> contained in this message is intended only for the personal >> and confidential use of the recipient(s) named above. If you are not the >> intended recipient, please do not >> read, copy, or use it and do not disclose it to others. Please inform us >> immediately of the delivery error >> and return the original message to us via e-mail. >> >
