RDROYA01@ULKYVX.BITNET.UUCP (05/15/86)
There are two related questions I have about CP/M. Using CP/M-68K, I have been working on a way to call the CCP from within a program, a trivial task. I have it set up to do any built-in service, but if I, mistakenly, ask it to run a program, then I cause a priviledge violation and my program aborts. I would like to set up an exception handler that traps priviledge violations and returns control to my program. Ideally, the CCP should just service the built-in calls and the exception handler should recover from the error caused by trying to invoke a transient utility. At this point, I'm not really interested in being able to load other programs in memory but simply avoid the abort caused by the exception. My question is How do I use the C language signal() function to do this? I would rather use the C function primarily because it is supposed to preserve all the registers and keep up with the sloppiness. Assembly language would probably be better, but I cannot live without ambiguity. I have had problems using the BDOS set exception vector. The trap #0 and trap #1 instructions that are supposed to stay memory resident through a "warm start" do not stay resident. They are reset as soon as a program exits. This is a real problem for setting up RSXs and running more than one application at a time.