On Mon, Nov 4, 2024 at 12:05 AM dwight via cctalk <cctalk@classiccmp.org> wrote: > > I/O addresses for the 8080 come to mind.
BASIC-09 under OS-9 (6809 processor) lets you execute a system call from a BASIC program. The problem is that a system call is coded as a software interrupt instruction followed by a byte giving the call number. So doing that implies self-modifying code. But under OS-9, code modules are re-entrant and can be called by any process running on the machine. You could find the process is switched between storing the call number byte and executing the instruction. It gets round this by building a trivial program (basically a software interrupt, the call number byte, and a return instructio) on the user stack (which is local to each process) and then calling it there. On the HP9825 with a String Variables ROM and an Advanced Programming ROM, there is a documented instruction to store the contents of a string variable as a program line which of course you can then execute. This is one of the few high level languages I've seen with a specific instruction for self-modifyng code. -tony