From: boylesgj AT lion DOT cs DOT latrobe DOT edu DOT au (Gregary J Boyles) Newsgroups: comp.os.msdos.djgpp Subject: DPMI question Date: 27 Apr 1997 05:27:39 GMT Organization: Comp.Sci & Comp.Eng, La Trobe Uni, Australia Lines: 31 Distribution: world Message-ID: <5juo4b$6h9@lion.cs.latrobe.edu.au> NNTP-Posting-Host: lion.cs.latrobe.edu.au To: djgpp AT delorie DOT com DJ-Gateway: from newsgroup comp.os.msdos.djgpp Precedence: bulk What is the difference between __dpmi_lock_linear_region(...) and _go32_dpmi_lock_code(...)/_go32_dpmi_lock_data(...)? In an example key board handler (assembly language) I have read the code and data are all locked together in one hit with the DPMI lock linear region function. I am writing a key board handler in C++ so is there any reason why I can't just stick dummy functions at the very top and very bottom of my source and lock everything (code and data) in one go with __dpmi_lock_linear_region(...)? With the structure you pass to this function what do you need to stick in the various data members. With the example key board handler it is done as follows leal lock_start,%ecx # Address of lock_start to ecx leal lock_end,%edi # Address of lock_end to edi subl %ecx,%edi # ecx=edi-ecx=size of region addl ___djgpp_base_address,%ecx . . . Does this mean that, for the address of my dummy function which marks the start of my lock region, I should set the address data member to the address of my dummy function + __djgpp_base_address? One other question. If I wanted to reboot the computer from inside a program I presume I would have to set IP to F000:FFF0 but I am unsure how to do so since IP is 16 bits (isn't it?) and F000:FFF0 is 32 bits. Some appropriate inline assembler would be helpfull.