Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

I'm fairly sure that the CP/M-86 documentation says that a chained program returns to its caller, not the CCP. And BDOS function 0 with DL=1 will exit while keeping the program resident in memory.

MP/M used PRL files: https://www.seasip.info/Cpm/prl.html



> I'm fairly sure that the CP/M-86 documentation says that a chained program returns to its caller, not the CCP

From my own review of https://bitsavers.org/pdf/digitalResearch/cpm-86/CPM-86_Syst... – the section on CHAIN (PDF page 160) says CHAIN frees the memory of its caller, which isn't consistent with returning to it after execution is complete.

However, it also describes (PDF page 60) function 59 (PROGRAM LOAD), which can be used to load a child process. Like DOS 1.x, spawning a child process is somewhat of a manual process, you apparently have to use function 59 to load the CMD file, functions 51 and 52 to set the default DMA base and offset (which CCP normally does for you), and then manually do a far jump to the start of the program. At least, unlike DOS 1.x, the image loader is in the BDOS kernel not CCP.

But, this is not unique to 8086 CPU architecture, this function is also implemented by CP/M-68K–which (I believe) relocates all executables as it loads them – see PDF page 106 of http://www.bitsavers.org/pdf/digitalResearch/cpm-68k/CPM-68K... - (it is also implemented by CP/M-80 3.x, but there it can only load RSXs not standard executables.) And I believe CP/M-8000 implements it too

> And BDOS function 0 with DL=1 will exit while keeping the program resident in memory.

Yes, you are right, I wasn't aware of that. Now I read more about this, my impression is RSXs are CP/M-80 only, and CP/M-86, CP/M-68K and CP/M-8000 use TSRs instead.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: