X-Authentication-Warning: delorie.com: mail set sender to djgpp-bounces using -f From: "Rod Pemberton" Newsgroups: comp.os.msdos.djgpp,comp.os.msdos.programmer Subject: Re: resident service providers Date: Mon, 03 Mar 2014 18:59:47 -0500 Organization: Aioe.org NNTP Server Lines: 39 Message-ID: References: NNTP-Posting-Host: CNsg4fVcCsvs3UaOgZtQCw.user.speranza.aioe.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii; format=flowed; delsp=yes Content-Transfer-Encoding: 7bit X-Complaints-To: abuse AT aioe DOT org User-Agent: Opera Mail/12.16 (Linux) X-Notice: Filtered by postfilter v. 0.8.2 Bytes: 2452 To: djgpp AT delorie DOT com DJ-Gateway: from newsgroup comp.os.msdos.djgpp Reply-To: djgpp AT delorie DOT com On Fri, 21 Feb 2014 15:19:42 -0500, Rod Pemberton wrote: [from c.o.m.d. only replies to the thread] > [...] > So, that likely means I have an error in the assembly for the > PM TSR somewhere. > Well, I made a few mistakes with the assembly PM TSR using DPMI: 1) I was switching to 32-bit PM when 16-bit PM was sufficient. 2) I used the DPMI's 16-bit PM CS for my interrupt's code selector. I needed a 32-bit PM code selector for the interrupt. 3) I was attempting to stay resident by trapping Int 0x21, AH=4Ch instead of calling the TSR interrupt ... The TSR interrupt can be called in PM and will be reflected to 16-bit RM. Now, the TSR installs a PM interrupt. I can call the PM interrupt. However, I have an issue with exiting the interrupt. An 'iret' causes a stack fault in the DPMI host (CWSDPMI for DJGPP), while a jump to the DPMI hosts original PM interrupt causes a reboot, which is likely a triple fault. This is probably covered in the DPMI documentation somewhere. But, the basics work! > Thanks for reminding me of that TSR. I might be able to use a > modified version of the DJGPP C TSR code to help me test. > Well, I haven't used it yet. I found TSR's in C with DJGPP to be a pain some years ago and I haven't decided whether I want to revisit the issue or not. Of course, 16-bit DPMI in assembly isn't exactly pleasant. Rod Pemberton