ex-nest.doc Nesting of EX.COM files. 6/24/87 For CP/M 2.2. Roy Lipscomb Logic Associates, Chicago One convenience offered by some successors to CP/M 2.2 is that they allow nesting of batch jobs. This means that one job can suspend its own execution, perform another job, then resume its own execution. If, in addition, the original job can conditionally choose to execute or skip the nested job (IF...THEN...ELSE), this allows for powerful control and linking of tasks and subroutines. Conditional nesting of batch jobs is possible under CP/M 2.2 by using the SUPERMIT shareware utility along with CP/M's standard SUBMIT utility. But SUPERMIT can't easily nest jobs initiated by EX15.COM, the popular replacement for SUBMIT. EX15 actively attempts to forstall nesting. If you try to re-execute EX15 from within a job initiated by EX15, the message "(Ex Already Present)" appears, and the job skips to the next step. However, a simple technique makes it possible to nest EX15 jobs. Execute SAFRAM5.COM as the first step of the job. Now EX15 can be re-executed on any subsequent steps of the job. (SAFRAM5.COM is a public-domain program that assigns a "safe RAM" partition below the CCP. When executed, SAFRAM5 protects the CCP along with whatever resident utilities are currently active--for instance, EX15. It turns out that this feature of SAFRAM5 effectively isolates the currently executing EX15 from later ones, and thus enables EX15 nesting. (SAFRAM5 protection normally remains active until the next cold boot. However, when executed as part of an EX15 job, SAFRAM5 is removed at the end of the EX15 job that called it.) Since the IF...THEN...ELSE feature of SUPERMIT already works with EX15, EX15 jobs are now capable of conditional nesting and execution like that found in some other operating systems. I have run with EX15 nested to six levels (each calling its own copy of SAFRAM5 and EX15), and have found no problems. At the next level, the SAFRAM5 stack starts to encroach on the SAFRAM5 warmboot message. If you need more than five or six levels of nesting, you should increase the size of the SAFRAM5 stack accordingly. Please keep the RCP/M community posted if you discover any other problems with this approach, or develop some interesting applications. Thanks. Roy Lipscomb