Date: Tue, 22 Aug 2000 20:52:54 +0200 From: "Eli Zaretskii" Sender: halo1 AT zahav DOT net DOT il To: djgpp AT delorie DOT com Message-Id: <9628-Tue22Aug2000205253+0300-eliz@is.elta.co.il> X-Mailer: Emacs 20.6 (via feedmail 8.2.emacs20_6 I) and Blat ver 1.8.5b In-reply-to: <8nu3ij$9ev2v$2@ID-33463.news.cis.dfn.de> (marksmanANTISPAM AT adr DOT dk) Subject: Re: How do I customize libc for custom OS? References: <8nqvcn$9a10a$1 AT ID-33463 DOT news DOT cis DOT dfn DOT de> <4331-Mon21Aug2000144127+0300-eliz AT is DOT elta DOT co DOT il> <8nu3ij$9ev2v$2 AT ID-33463 DOT news DOT cis DOT dfn DOT de> Reply-To: djgpp AT delorie DOT com Errors-To: nobody AT delorie DOT com X-Mailing-List: djgpp AT delorie DOT com X-Unsubscribes-To: listserv AT delorie DOT com Precedence: bulk > From: "Tobias Skytte" > Newsgroups: comp.os.msdos.djgpp > Date: Tue, 22 Aug 2000 15:01:53 +0200 > > ok. whew, looks like alot of work! You didn't think that porting a large library to a new OS would be a piece of cake, did you? ;-) > maybe I could merely change the __dpmi_int and int86 functions? I doubt that: the functions which call __dpmi_int ``know'' quite a bit about DOS, its functions, and its idiosyncrasies. Making them work with another OS will require more than just replacing __dpmi_int. For example, the values you load into the registers before calling Int 21h, the error codes you anticipate, and the bugs in the OS that you work around---all these need changing for a different OS. > the crt0.S scares me, as I am not that good with assembler (especially not > att syntax). Is there any documentation available that explains what this > code does? I have no idea what exactly it does... See http://www.delorie.com/djgpp/doc/eli-m17n99.html#Startup, I think it provides some overview of what crt0.S does. Beyond that, you have the comments in the code, and you can ask specific questions here. > Maybe most of it can just be taken out since its mostly for dpmi? > what would happen if crt0.S contains nothing? The DPMI-specific parts should be taken out, but you need to replace them with the equivalent code for your OS. A program cannot run unless you set up its data, code, and stack, and build the run-time environment that a C program expects (the argv[] array, the standard handles, etc.)