From: "John S. Fine" 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: Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit 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/