🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.os.msdos.programmer
Article #7792

Protected mode source code example - I'll send it to you.

#7792
From: Dennis Marer
Date: Tue, 26 Jan 1993 21:48
30 lines
2174 bytes
In article <93026.100558KDW103@psuvm.psu.edu> KDW103@psuvm.psu.edu writes:
>    Does anyone have any source code already typed in that they would be
>willing to share with the rest of us?  I want to try programming in protected
>mode, but I HATE typing assembly listings out of books.  Anything from books or
>your own code if you're willing to share it would be appreciated.

For anybody that's interested, I do have such an example.  At this point, I
don't guarantee it's 100% correct, but it initializes Protected Mode from DOS,
setting up the IDT, GDT, LDT, shifting hardware interrupts so they don't
conflict with the reserved Intel interrupts, and so on.  It's very primitive
at this time, but it gets the point across.  Once in Protected Mode, it
writes messages to the screen and tests the new interrupts.  It does NOT
emulate the DOS interrupts, so this causes a few problems:

	1) The floppy drive motor stays on indefinitely
	2) You can't exit back to DOS once running this program

If you're interested, drop me some e-mail and I'll send it to you in a
couple of days.  It's completely free and copyable.  It's also got nothing
to do with my work at Intel - I don't get to play with Protected Mode here! :-(
It's very documented (over documented?) so it should be easy to understand,
given familiarity with the 386.

One more thing - it was written using Turbo Assembler, so it will require a
few modifications to assemble under MASM, etc.

				Dennis Marer
				dmarer@td2cad.intel.com

-- Not speaking for Intel
Technical Details
Message-ID: <C1HDxH.HA2@inews.Intel.COM>
Path: arc1-ca.pugleaf.net!sparky!uunet!das.wang.com!ulowell!m2c!bu.edu!stanford.edu!ames!olivea!inews.Intel.COM!td2cad!dmarer
References: <C1FKLK.776@inews.Intel.COM> <GAH.93Jan26084220@trcrik.trc.mew.mei.co.jp> <93026.100558KDW103@psuvm.psu.edu>

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!sparky!uunet!das.wang.com!ulowell!m2c!bu.edu!stanford.edu!ames!olivea!inews.Intel.COM!td2cad!dmarer
From: dmarer@td2cad.intel.com (Dennis Marer)
Newsgroups: comp.os.msdos.programmer,alt.msdos.programmer
Subject: Protected mode source code example - I'll send it to you.
Message-ID: <C1HDxH.HA2@inews.Intel.COM>
Date: 26 Jan 93 21:48:52 GMT
References: <C1FKLK.776@inews.Intel.COM> <GAH.93Jan26084220@trcrik.trc.mew.mei.co.jp> <93026.100558KDW103@psuvm.psu.edu>
Sender: news@inews.Intel.COM (USENET News System)
Organization: Intel Corporation, Santa Clara, CA USA
Lines: 30
Nntp-Posting-Host: td2cad