Page 1 of 1

Compiling under another architecture

Posted: Mon Jun 02, 2003 11:00 pm
by Edge
Hi y'all!

I've just began teaching myself some basics of OS-programming, and I have just pulled through the stage where I get to learn how to write my own bootloader (and load it into the first sector of a floppy/hd) in assembly. Now, I want to move on to the point where I start making my own kernel. How to do this? I have read very little about that it is possible to do in C/C++ (with some asm-mixing). But how exactly?  And the compiling of my source won't be too easy either, since the only PC I've got here at home is an old Compaq Presario 7210 (75 MHz) and I can't get networking to work under windows on that thing (or under any other OS either for that reason). That computer is the one I use for testing and currently also writing and compiling my bootsector code (using NASM, which I moved from a Mac of mine using a floppy-disk). So, here at home I've got 1 iMac DV SE 500MHz running Mac OS X 10.2 (Darwin) and one PowerMac 7600/132 64MB RAM running Mac OS 9.1 on one harddrive and Darwin 1.4.1 on another (so I can switch as I like).
Since I can't get DJGPP or any other windows compiling software to the PC, I really wonder how to do the compiling.

Can anyone help me and guide me through this so I can get started?


Major thanks!

  Regards,
     Anton Kiland : Jonkoping, Sweden.

RE:Compiling under another architecture

Posted: Mon Jun 02, 2003 11:00 pm
by darklife
This is a shot in the dark but maybe you can look into serial
cable null-modem file transfers. This way you can download DJGPP on
your Mac and upload it into your PC through cable. Building your own
cable isn't hard at all as long as you can get your hands on
connectors and a soldering iron. Once I just took a serial-serial
cable and cut it and rewired it to work like a null-modem cable and
it worked fine.
There are tons of web sites out there on how to do this kindof stuff.
Just an idea.

TCC

Posted: Tue Jun 03, 2003 11:00 pm
by Edge
Hm.. Yeah. That would work, I suppose!

I have already somewhat solved the problem (temporarily at least). I downloaded the Turbo C Compiler (tcc) and moved it to the Windows-machine using a floppy and installed it there.

Now I'm just wondering if TCC is good enough for OS-development. Anyone have any experience of this software and knows how to compile stuff with it into COM (or do I have to use EXE2COM?) and how to link it together with assembly files (or should I use LD for Windows?)

Thanks!