From: "sauls" Newsgroups: comp.os.msdos.djgpp Subject: Real Mode Callbacks: The Return Date: Sat, 2 Dec 2000 02:35:35 -0600 X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 5.00.2314.1300 X-MimeOLE: Produced By Microsoft MimeOLE V5.00.2314.1300 Lines: 33 Message-ID: <3a293995$0$30011$6d6c75b@news.execpc.com> Organization: ExecPC Internet - Milwaukee, WI NNTP-Posting-Host: ecea686e.news.execpc.com X-Trace: DXC=n<@;PQ7GR[EE4XNZ]a2YgLBITGoVIjmHFbCigiU>8_hH4`>8YbCYbkMF;[IhdZT`FK=CX3hleRV`NG`X]k\ERoDL X-Complaints-To: abuse AT execpc DOT com To: djgpp AT delorie DOT com DJ-Gateway: from newsgroup comp.os.msdos.djgpp Reply-To: djgpp AT delorie DOT com I thought I got a grasp of what was going on with __djgpp_allocate_real_mode_callback, so I tried to write some code... int main() { __dpmi_raddr MouseCallback; if(__dpmi_allocate_real_mode_callback(&MouseFunction, &r, &MouseCallback)) abort(); int Mask = 0x7F; r.x.es = MouseCallback.segment; r.x.dx = MouseCallback.offset16; r.x.ax = 0x000c; r.x.cx = Mask; __dpmi_int(0x33, &r); } with a suitible loop at the end to waste time. But when I tried to run it, it crashed and burned, with either a GPF, or a complete hard freeze. I seem to not be understanding the concept. If someone could show me where I went wrong.... please? Oh yes, and I already realize that what I am doing could be done with the __go32_allocare_real_mode_callback function. This is more for the educational experience, than anything else. Thanks.