From: utzoo!decvax!harpo!npoiv!npois!ucbvax!ARPAVAX:C70:info-cpm Newsgroups: fa.info-cpm Title: Completion Codes Article-I.D.: ucb.1795 Posted: Wed Aug 18 14:20:46 1982 Received: Sat Aug 21 04:49:21 1982 >From G.dag@Ucb-C70 Wed Aug 18 14:20:30 1982 I have a pseudo-ccp similar to ZCPR that I am currently attempting to enhance. I would like to allow an application program to set a completion code (successful, fail, etc..) so that a command language routine can determine the next command to execute. The way my ccp replacement works is as follows: 1) The hccp (the pseudo-ccp) loader is sysgenned into the place of the former ccp. When CP/M attempts to read in the ccp, it reads in the loader and executes it. 2) The loader then loads a transient program that is the actual ccp replacement. This transient program needs to get the completion code. I would like to get that completion code from a spot in memory unused by CP/M, application programs, the BIOS, or the BDOS. This pseudo-ccp also has to be portable from system to system, so putting a byte in the BIOS won't work. I could handle the completion code problem by putting the code in a file (argh!) and requiring the application to open a file and insert a code. Aside from the massive overhead, this would be cumbersome and slow. The location in memory I need would have to be secure, so that an inconsistency in systems won't cause a problem. For instance, if the user prints a program, then if the print worked and the file was printed, the command file deletes the file. You can see the hassle (understatement here) if the flag byte was corrupted. I think a possible solution might have the flag byte at the absolute top of transient memory (before the ccp). The major problem would be that large programs won't be able to overlay the ccp (as well as not allowing my pseudo-ccp to overlay it). Any comments or suggestions would be greatly appreciated. Thanks, David