knudsen@ihnss.UUCP (11/04/83)
I could get my CS PhD revoked for this, but... You really can run self-mod code legally under OS-9, if you ignore all the assembler warnings and care only for the SPIRIT of the law. That is, it will still be re-entrant, sharable, etc. The trick is to copy the speed-critical routines into the Data area (which is re-cloned for each invocation of a module) and JSR to them there. Really tight stuff goes in Direct Page (every invocation has its own) for max speed. Of course it all has to be PIC, and data references are also relative to PCR, *not* to U. This might not work on Level 2 OS9 hardware with memory management, if RAM segments have read/write/exec attributes like disk files. Meanwhile, we digital signal processing types (speech, music, games?) who are tired of the 6809 timings relative to 6502 will scramble for every microsec we can scarf up...mike k