cvs.gedasymbols.org/archives/browse.cgi   search  
Mail Archives: djgpp/1999/04/28/02:56:00

From: "John S. Fine" <johnfine AT erols DOT com>
Newsgroups: comp.os.msdos.djgpp
Subject: Re: Writing an OS
Date: Tue, 27 Apr 1999 18:19:32 -0400
Lines: 27
Message-ID: <372637F4.921@erols.com>
References: <Pine DOT SOL DOT 3 DOT 91 DOT 990427134359 DOT 3388A AT travelers DOT mail DOT cornell DOT edu>
Mime-Version: 1.0
X-Trace: +vJE57RFuaJOsg5pwGL1EHFL6dzuy1Zm9/WXpgVww9s=
X-Complaints-To: abuse AT rcn DOT com
NNTP-Posting-Date: 27 Apr 1999 22:21:11 GMT
X-Mailer: Mozilla 3.01 (Win95; U)
To: djgpp AT delorie DOT com
DJ-Gateway: from newsgroup comp.os.msdos.djgpp
Reply-To: djgpp AT delorie DOT com

arh14 AT cornell DOT edu wrote:

> > I also hate to burst your bubble, but you can't use the
> > printf() statement in an OS unless you write your own low level version.
> 
> Bah!  If you are writing for an x86 system and have x86 code, why can't
> you use it?

  It depends what you mean by "use it".  I just read both extremes
on this question and I think the answer lies somewhere in between.
I am sure you can use DJGPP's printf in your own OS (technical
opinion, not legal opinion).  The problem is that if you simply
call DJGPP's printf other routines in DJGPP's stdlib will get
called directly or indirectly.  Some of those routines can't
run in your new OS (unless you build in a lot of int21h support
in your OS).

  Using printf and many other routines from DJGPP's stdlib may be
the easiest way to get such routines into your OS, but you do
need to figure out which low level routines you must replace
(the free source code makes that pretty easy).  Replacing those
low level routines isn't trivial, but it is probably easier than
writing from scratch printf and many of the other parts of stdlib
that you may want to use.
-- 
http://www.erols.com/johnfine/
http://www.geocities.com/SiliconValley/Peaks/8600/

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019