View Single Post
Old Feb 25th, 2008, 12:28 AM   #7
lectricpharaoh
Caffeinated Neural Net
 
lectricpharaoh's Avatar
 
Join Date: Jun 2005
Location: Dry west coast of Canada
Posts: 925
Rep Power: 4 lectricpharaoh will become famous soon enough
Re: Segmentation Question

Quote:
Originally Posted by Grich
Thanks again lectricpharaoh, you are the new DaWei of ProgrammingForums. Ha Ha!
Well, I wouldn't go that far- DaWei's much more knowledgeable than me, particularly about the nitty-gritty low-level stuff. Besides, he's grouchier.
Quote:
Originally Posted by Grich
I was looking into implementation and was getting a bit lost. Thanks.
Yeah, it can be a bit of a headache. I remember way back when, I wrote some DOS-based 360x240 mode-x (remember mode-x?) stuff. One bit was some custom mouse drawing code; as the regular mouse driver had no knowledge of tweaked VGA modes, I had to do the rendering on my own. The benefit was I got support for 256-color mouse cursors. I also did some custom keyboard code (to detect multiple keypresses simultaneously), timer code, and even a bit of joystick code. I intended to use the code in some games, but it never got off the ground. I think it's still kicking around somewhere, probably on my ancient 386 laptop (yes, I have a 386 in a case under the table here).

Of course, these days, it's all API stuff. Directly mucking about with the hardware is a bad thing under a modern OS. Segmented memory models are also gone for all intents and purposes, as the OS typically allocates a large virtual address space to your process, and sets up all the segment registers to point at the descriptors for this space, making everything but kernel and API calls use near pointers.

Is there some particular thing you're trying to achieve, or are you just exploring out of curiosity?
__________________
A man's knowledge is like an expanding sphere, the surface corresponding to the boundary between the known and the unknown. As the sphere grows, so does its surface; the more a man learns, the more he realizes how much he does not know. Hence, the most ignorant man thinks he knows it all. - L. Sprague de Camp
lectricpharaoh is offline   Reply With Quote