Date: Mon, 14 Aug 1995 23:46:06 -0400 (EDT) From: Cuthalion / Sliced Bread To: DJGPP Listserver Subject: DPMI stuff Hi. I'm trying to write an IRQ handler under DJGPP. (I'm using int86(0x31,....), because of skimpy docs on many of the DPMI functions..) But some of the dpmi functions (lock linear region, for instance) take linear addresses. I don't know what a linear addres is! What I'm doing to get these addresses is adding &myvar to the selector base for _my_cs(), but that ends me up with something absurd for my selector base (for _my_cs()) ranging from 0x1000000 to 0xda62bc02 or something huge like that depending on which DPMI server I use. (The weird number is with Windows. I get 0x80003000 under QDPMI.) It seems to me that these values are quite obviously not right (I don't have 2 GIG of ram, even WITH Swapping!) and sure enough, the second lock linear memory I try to do fails. (Oddly enough, the first one works..) (Fails: Has regs.x.cflag set on exit. (Is this a valid way to check success?) So any ideas as to what I should be doing here? I looked at the info pages for lock linear memory region or whatever, and found: Syntax: ------- #include int __dpmi_lock_linear_region Description: ------------ (The DPMI spec's not too much better here..) The thing is it doesn't say what parameters it needs. I can only assume that it will need parentheses to compile; there are no mention of them in the online help! /*************************************************************** *** Jesse Morris *** enrico AT max DOT tiac DOT net *** jmorris AT ace DOT com *** ***************** Cuthalion / Sliced Bread *******************/