*BSD News Article 19942


Return to BSD News archive

Newsgroups: comp.os.386bsd.development
Path: sserve!newshost.anu.edu.au!munnari.oz.au!news.Hawaii.Edu!ames!agate!howland.reston.ans.net!xlink.net!gmd.de!mururoa!veit
From: veit@mururoa.gmd.de (Holger Veit)
Subject: Re: Doing a screen write from Protected Mode
Message-ID: <1993Aug24.141400.19414@gmd.de>
Sender: veit@mururoa (Holger Veit)
Nntp-Posting-Host: mururoa
Organization: GMD - German National Research Center for Computer Science
References:  <MAILQUEUE-101.930824092308.288@AA.csc.peachnet.edu>
Date: Tue, 24 Aug 1993 14:14:00 GMT
Lines: 28

In article <MAILQUEUE-101.930824092308.288@AA.csc.peachnet.edu>, NEWCOMBE@AA.csc.Peachnet.EDU ("Dan Newcombe" ) writes:
|> [I know this is a little of subject, but please bear with me]
|> 
|> 
|> I am working on program that will run in protected mode.  I have
|> it in protected mode already and the code is being attached to
|> the protected mode statup code via gcc and a few other things.
|> 
|> But how would I do a write to the screen once I'm in protected mode?
|> I know that BIOS interuppts won't work, and that I basically need
|> to write to the address's starting at the video display b8000h, but
|> what do I need to do, as just moving a value there does nothing and
|> I keep having to press reset.

You need to declare a LDT or GDT segment pointing to the physical screen
base 0xb8000, and then you should be able to write to the screen
via a far pointer using the corresponding selector.
Whether this actually succeeds is highly OS dependent (you didn't say whether
you use e.g. *BSD/Linux or DOS with djgpp). At least the Unixes will prevent you
from doing this without further preparation.

-- 
         Dr. Holger Veit                   | INTERNET: Holger.Veit@gmd.de
|  |   / GMD-SET German National Research  | Phone: (+49) 2241 14 2448
|__|  /  Center for Computer Science       | Fax:   (+49) 2241 14 2342
|  | /   P.O. Box 13 16                    | Had a nightmare yesterday:
|  |/    Schloss Birlinghoven              | My system started up with
         53731 St. Augustin, Germany       | ... Booting vmunix.el ...