home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1993 #3 / NN_1993_3.iso / spool / comp / os / msdos / programm / 12501 < prev    next >
Encoding:
Internet Message Format  |  1993-01-28  |  2.2 KB

  1. Xref: sparky comp.os.msdos.programmer:12501 alt.msdos.programmer:3264
  2. Path: sparky!uunet!das.wang.com!ulowell!m2c!bu.edu!stanford.edu!ames!olivea!inews.Intel.COM!td2cad!dmarer
  3. From: dmarer@td2cad.intel.com (Dennis Marer)
  4. Newsgroups: comp.os.msdos.programmer,alt.msdos.programmer
  5. Subject: Protected mode source code example - I'll send it to you.
  6. Message-ID: <C1HDxH.HA2@inews.Intel.COM>
  7. Date: 26 Jan 93 21:48:52 GMT
  8. References: <C1FKLK.776@inews.Intel.COM> <GAH.93Jan26084220@trcrik.trc.mew.mei.co.jp> <93026.100558KDW103@psuvm.psu.edu>
  9. Sender: news@inews.Intel.COM (USENET News System)
  10. Organization: Intel Corporation, Santa Clara, CA USA
  11. Lines: 30
  12. Nntp-Posting-Host: td2cad
  13.  
  14. In article <93026.100558KDW103@psuvm.psu.edu> KDW103@psuvm.psu.edu writes:
  15. >    Does anyone have any source code already typed in that they would be
  16. >willing to share with the rest of us?  I want to try programming in protected
  17. >mode, but I HATE typing assembly listings out of books.  Anything from books or
  18. >your own code if you're willing to share it would be appreciated.
  19.  
  20. For anybody that's interested, I do have such an example.  At this point, I
  21. don't guarantee it's 100% correct, but it initializes Protected Mode from DOS,
  22. setting up the IDT, GDT, LDT, shifting hardware interrupts so they don't
  23. conflict with the reserved Intel interrupts, and so on.  It's very primitive
  24. at this time, but it gets the point across.  Once in Protected Mode, it
  25. writes messages to the screen and tests the new interrupts.  It does NOT
  26. emulate the DOS interrupts, so this causes a few problems:
  27.  
  28.     1) The floppy drive motor stays on indefinitely
  29.     2) You can't exit back to DOS once running this program
  30.  
  31. If you're interested, drop me some e-mail and I'll send it to you in a
  32. couple of days.  It's completely free and copyable.  It's also got nothing
  33. to do with my work at Intel - I don't get to play with Protected Mode here! :-(
  34. It's very documented (over documented?) so it should be easy to understand,
  35. given familiarity with the 386.
  36.  
  37. One more thing - it was written using Turbo Assembler, so it will require a
  38. few modifications to assemble under MASM, etc.
  39.  
  40.                 Dennis Marer
  41.                 dmarer@td2cad.intel.com
  42.  
  43. -- Not speaking for Intel
  44.