Path: utzoo!utgpu!attcan!uunet!lll-winken!lll-ncis!helios.ee.lbl.gov!pasteur!ucbvax!hplabs!hpda!hpcupt1!andrews From: andrews@hpcupt1.HP.COM (Edward E. Andrews) Newsgroups: comp.sys.ibm.pc Subject: Writing a debugger question Message-ID: <5930023@hpcupt1.HP.COM> Date: 6 Jan 89 17:14:23 GMT Organization: Hewlett Packard, Cupertino Lines: 13 While writing a debugger I've run across the DOS function 4B with subfunction 1. This is supposed to load a program without executing it. I've found that the initial CS:IP and SS:SP are returned. Also, the termination address in the PSP of the just loaded program point back to the instruction just after the INT 21h. My questions are: do all debuggers use this? is this the best way to load a program for debugging? are there any "gotchas" by loading a program this way? how is the program "unloaded" when the debugger itself terminates (i.e. the program doesn't do DOS fucnction 4c)? Thanks in advance.