Page 2 of 3
Thank you
Posted: Tue Jun 20, 2006 8:52 pm
by kenneth_phough
Thank you very much for all the advice and help. I really appreciate it.
-Kenneth
Posted: Wed Jun 21, 2006 8:49 am
by deficite
I use GCC 4.1.1, NASM, and LD on Linux. I'm also making heavy use of bash scripting and some other GNU tools like sed, tr, expr, gawk, and grep. I created my own build system in BASH for my project. It works really nice and needs no modification no matter how many source files you add to it. I use QEMU + KQEMU for my virtualization environment and I made a script that will automatically mount my filesystem with a loopback device, copy my kernel over, unmount, and then run qemu on it. Saves a lot of time.
Alternative to make, jam
Posted: Thu Jun 22, 2006 7:30 am
by chase
If you hate make but your OS is getting bigger then something that you can just write a shell script or batch file for you might want to take a look at jam.
http://www.perforce.com/jam/jam.html It works on all major platforms, the source is avaliable and it seems a lot simpler then make. There is even an example of using jam to build an OpenBeOS kernel.
Posted: Thu Jun 22, 2006 10:26 am
by deficite
chase, I already know about jam. I've been programming for over 5 years, and I've tried several build systems. For OS development, I think mine is the best, and it's simple. I coded it up in two or three hours and it works beautifully. Whenever I'm not doing OS development, I won't touch anything but SCons.
Thanks for the tip anyway, if it was even directed toward me. I'm sure somebody on this board might like it.
Posted: Thu Jun 22, 2006 10:36 am
by chase
deficite wrote:chase, I already know about jam. I've been programming for over 5 years, and I've tried several build systems. For OS development, I think mine is the best, and it's simple. I coded it up in two or three hours and it works beautifully. Whenever I'm not doing OS development, I won't touch anything but SCons.
Thanks for the tip anyway, if it was even directed toward me. I'm sure somebody on this board might like it.
It was kinda for everybody but your post made me start thinking of build systems. I do a lot of Java development so I use Ant often but even though Ant can be used to invoke a C compiler it just doesn't sit well with me. I've never been happy/good with make. I'm still using shell scripts myself but when I came across jam it became an item on my todo list.
Posted: Thu Jun 22, 2006 6:06 pm
by carbonBased
I use ant with my own custom C/C++, ASM, and driver compiler tasks (admitantley, it would have been smarter to use the ant-contrib C compiler tasks, but I didn't know they existed at the time) and it works quite well.
I think ant is one of the better build systems for complex, multi-platform applications. It's quite powerful, especially when you delve into your own customized ant tasks (I've got one that dynamically builds a C string database from all the properties defined in the build system, allowing the kernel to be changed dynamically through simple property files).
--Jeff
Posted: Sun Jun 25, 2006 1:07 am
by kenneth_phough
I have a crazy question. Would it be possible to use the standard i/o library for my os?
Yours,
Kenneth
Posted: Sun Jun 25, 2006 9:27 am
by deficite
You pretty much have two options. You can write your own, or you can port a library to your OS. The design of my OS is going to leave me to write most of my standard library, but there are parts I'll port over.
This is the beauty of free software. Everybody benefits.
Posted: Mon Jun 26, 2006 3:05 pm
by Shark8
I'm using Borland Pascal 7 on Dos/Win98SE. I have a bootloader that loads the compiled file by name AND I can run it from the DOS prompt. (Because I'm not using any DOS functaions, only BIOS functions at this time, I can run the same exe from the boot-loader.)
The nice thing about that is that it allows rapid testing/recompilation of the code. (In fact I don't have to leave the IDE to do a test-run.)
So far it's all in 16-bit Real mode at the moment, but BP7 can compile for protected mode as well, so I'm not too worried about that. I've already got it to the point where I can change screen modes, type in commands, and execte commands.
Right now I'm on the memory manager, and that shouldn't pose a big problem to my current run-ontop-of-DOS-and-test-booting occaisionally stratagy because DOS dosen't do any memory restrictions like that. So, the big problem for that is, as it should be, the implementation.
--------------
Admitedly, I would be using Delphi to do a 32-bit OS. But tht'll require my going in and rewriting the System.pas file, which I'm not ready to do. And besides, I can still learn a lot doing it in 16-bit object oriented BP7m which was the whole purpsoe of the project, to learn.
Oh, and if anyone wants a 4x4 bitmapped VGA font, I have one. (Though I don't see a lot of demand for it, someone might be interested in it.)
Posted: Mon Jun 26, 2006 3:54 pm
by Dex
I written a turbo pascal OS years ago, its very easy, as things like writeln, readln, etc, do not use dos ints if you put:
USES crt;
So all you need is some bootloader like "bootprog" or "MiniDos" and your away.
What assembler is everybody using?
Posted: Mon Jun 26, 2006 4:20 pm
by chase
What assembler is everybody using?
I've used NASM the most with a little MASM, and an even smaller amount of GAS. Problem is that it seems NASM has been dropped again and the only semi-recent copy is at
http://www.kernel.org/pub/software/devel/nasm/, MASM is M$, and I can't stand AT&T syntax so GAS isn't my favorite. I heard years ago that GAS as going to get support for intel syntax but I havn't seen anything about that since.
Posted: Mon Jun 26, 2006 4:32 pm
by Dex
You will not find a better Assembler than fasm, for OS dev:
http://board.flatassembler.net/
As that was what it was designed for, it well supported and very easy to port to your OS (less than a day for mine )
Posted: Tue Jun 27, 2006 12:40 am
by deficite
I stick with NASM. I've been using it for a long time, it's simple (for me), and it's pretty decent. The most I'm doing with my ASM anyway is my entry point code and all that crap for IRQ's and such.
Posted: Tue Jun 27, 2006 4:25 am
by kenneth_phough
Is it true that I do not need to write "bits 16" for fasm? Also what are some opinions on segmented and paging?
Thanks,
Kenneth
Posted: Tue Jun 27, 2006 8:36 am
by JAAman
kenneth wrote:
I have a crazy question. Would it be possible to use the standard i/o library for my os?
deficite wrote:You pretty much have two options. You can write your own, or you can port a library to your OS. The design of my OS is going to leave me to write most of my standard library, but there are parts I'll port over.
have you seen
Public Domain C Library
solar has an OS independant, implementation of the standard C library -- with the design goal being OS independant as much as possible, with as little as possible required of the OSdever to implement it (many parts are completely independant, but some does require some work, but as little as possible -- iirc requires adding a few functions, but generally not modifying anything) and its PD so that means there are absolutely no restrictions on its use)
its listed as "pre-alpha" because the entire library isnt implemented yet
@chase:
i use nasm, though i dont know what i will do -- i intend to use 32bit and 64bit at the same time, mabey i will use masm