From: "Radek Zajic" Newsgroups: comp.os.msdos.djgpp,comp.lang.asm.x86,alt.lang.asm Subject: Re: Buffers Date: Sat, 05 Aug 2000 00:12:11 GMT Organization: Tele Danmark Internet Cyberspace Launchpad Lines: 65 Approved: ccrayne AT pacific DOT net (comp.lang.asm.x86) Message-ID: References: X-Complaints-To: newsabuse AT supernews DOT com X-Track: -20 X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 5.00.2919.6700 X-Mimeole: Produced By Microsoft MimeOLE V5.00.2919.6700 X-Newsreader: MR/2 Internet Cruiser Edition for OS/2 v2.09c c09c To: djgpp AT delorie DOT com DJ-Gateway: from newsgroup comp.os.msdos.djgpp Reply-To: djgpp AT delorie DOT com You should take a look at the DPMI functions at INT 0x31 in RB's IntList. Below is a snippet of RB's IntList release 61: DPMI function Simulate RM interrupt. This is the (only?) way how to call real-mode interrupts from protected mode under DMPI. I hope it helps. -- Radek Zajic rzajic AT seznam DOT NOSPAM DOT cz (to e-mail me, remove ".NOSPAM" from my e-mail address) --------E-310300----------------------------- INT 31 P - DPMI 0.9+ - SIMULATE REAL MODE INTERRUPT AX = 0300h BL = interrupt number BH = flags bit 0: reset the interrupt controller and A20 line (DPMI 0.9) reserved, must be 0 (DPMI 1.0+) others: reserved, must be 0 CX = number of words to copy from protected mode to real mode stack ES:(E)DI = selector:offset of real mode call structure (see #03148) Return: CF clear if successful real mode call structure modified (all fields except SS:SP, CS:IP filled with return values from real mode interrupt) CF set on error AX = error code (DPMI 1.0+) (8012h,8013h,8014h,8021h)(see #03143) protected mode stack unchanged Notes: 16-bit programs use ES:DI as pointer, 32-bit programs use ES:EDI CS:IP in the real mode call structure is ignored for this call, instead, the indicated interrupt vector is used for the address the flags in the call structure are pushed on the real mode stack to form an interrupt stack frame, and the trace and interrupt flags are clear on entry to the handler DPMI will provide a small (30 words) real mode stack if SS:SP is zero the real mode handler must return with the stack in the same state as it was on being called SeeAlso: AX=0302h,AX=FF01h,INT 21/AX=2511h,INT 21/AH=E3h"OS/286" SeeAlso: INT 2C/AX=0026h,INT 2F/AX=FB42h/BX=000Dh Format of DPMI real mode call structure: Offset Size Description (Table 03148) 00h DWORD EDI 04h DWORD ESI 08h DWORD EBP 0Ch DWORD reserved (00h) 10h DWORD EBX 14h DWORD EDX 18h DWORD ECX 1Ch DWORD EAX 20h WORD flags 22h WORD ES 24h WORD DS 26h WORD FS 28h WORD GS 2Ah WORD IP 2Ch WORD CS 2Eh WORD SP 30h WORD SS