Hi Robbie / Decheng,

> don't know what's the standard (or recommended) development environment
> to develop applications in FreeDOS. Would you please let me know?

That depends on what sorts of applications you want to write.
OpenWatcom is certainly a nice choice for C / C++, as ist NASM
for Assembly language. You can also use JWASM which has more of
the MASM look and feel. If you like GNU C (GCC / G++) then you
should have a look at DJGPP which is GNU C / C++ for DOS with a
complete C library which makes the whole DOS feel a lot like a
"normal GNU / POSIX OS" such as Linux compared to classics like
Borland C which have a lot of DOS in their DOS environment :-)

I do know that DJGPP also has some common(?) IDEs and that some
bigger editors also try to be universal IDEs, but I cannot say
what the typical preferred IDE for OpenWatcom is at the moment.

> I've checked out the subversion repository of FreeDOS...

This only shows you the kernel and the command.com and some
small tools like SYS and MEM. In a way, the SVN of FreeDOS
is more like a kernel.org repository. You probably want to
look at the gnu.org repository equivalent of all those user
land tools which make FreeDOS a complete operating system.

Because FreeDOS does not have such a central repository, a
lot like in Linux land where most of the software also has
individual pages instead of being bundled on gnu.org, you
would not do this using SVN. Instead, you can check the DOS
software list on www.freedos.org/software/ and visit those
pages that are interesting for you. Also, FreeDOS maintains
a big collection of zipped up tools and their sources on
ibiblio. It is just that those are not the place where the
tools are developed, FreeDOS just stores and mirrors them.

> freecom - from the trunk directory it seems it contains the FreeCom shell,
> kernel - from trunk directory it seems it contains the kernel source code,
> mem - from the trunk directory it seems it contains mem.exe source code?

Exactly.

> BTW, my point of interest is in the kernel part and also utility
> applications. As I've always been developing user-mode applications since
> I've learned programming 15 years ago, to develop the kernel it would take
> some time for me to start. To learn about the kernel, I'd also like to know
> how to compile the kernel, e.g. which compiler is the standard or...

The kernel is on one hand a bit like a C library - it provides a
number of utility functions for DOS apps and those functions are
written just in C as any other library would be... On the other
hand, like all kernels, parts of the FreeDOS kernel have to deal
with evil and obscure low level management of hardware, RAM etc.
Lucklily the BIOS is called for some of this and even much of the
low level stuff is written in easier to understand C. Still the
kernel (as FreeCOM, for other reasons) has different memory layout
and management than you might be used to from user applications.

To compile the kernel, you use OpenWatcom C, NASM Assembler and
FreeCOM and UPX as shell in DOS and for compression. Because all
tools exist for Linux, cross-compiling is also supported. Then
you do not need FreeCOM, of course.

> do you have any suggestions on how to test/debug the kernel?

Depends on how badly you want to break it ;-) You can test many
things in DOSEMU which runs on your real CPU but simulates most
other hardware in Linux. It also has a built-in debugger which
runs in another window. More low level is using Bochs or other
complete virtual PC systems. For example Bochs also has a nice
built-in debugger. However, I would only go THAT virtual when I
want to play with a very lowlevel kernel feature or driver such
as a clone of EMM386. For all smaller kernel activities, you can
even just boot the kernel on real hardware and add some debugger
messages here and there or use good old DEBUG to inspect, maybe
edit, memory contents. In the normal worst case, you just have
to press reset to boot a fresh DOS in a few seconds. There is a
number of boot menus (eg metaboot is a simple one) which let you
pick one of multiple kernels at boot, so you can combine stable
and experimental kernels on one drive. Of course the "extreme"
worst case can, as with any kernel, mess up your disk contents,
or in theory even damage hardware, but as said, there is Bochs.

> A short introduction of myself: I graduated from Shanghai Jiao Tong
> University computer science as a bachelor in 2004, and got a master of
> engineering degree from SJTU in 2009 (in computer technology). I've worked
> on C/C++ programming on the Windows platform, C#/ASP.NET/Windows Forms, also
> some C++/CLI; I've self-studied MS-DOS, QBASIC, JavaScript/CSS/HTML. I've

You have a lot of MS experience then... Honestly, I never found MSVC
very debugging-friendly... As for QBASIC, the Freebasic compiler has
a command line option to be more friendly to QBASIC style syntax :-)

As with Java, I do not expect very interesting DOS ports of C# for
DOS to exist. On the other hand, there are decent Perls for DOS...

A lot of your experience also revolves around web and server tools
and languages. Web servers are not a typical application in DOS, as
it is not multitasked. Also, DOS web servers rarely support common
scripting languages such as Perl, Python or ASP. Of course you can
use JavaScript or CSS in your HTML with a DOS server, but BROWSERS
for DOS will often ignore them and just look at the plain HTML. You
might be interested to play with projects which work to change that.

> played with Linux for half a year so got basic knowledge of it. Among the
> computer science knowledge, I did well at data structure/common algorithms,
> assembly programming in 8086/80386 (user mode). I want to advance my skills
> in operating systems so I'd like to learn about FreeDOS first, while also do
> some contribution as long as I can.

I think you will enjoy DOS then. It gives you flexibility to write
user mode apps (with some limitations compared to bigger OS) while
giving you the chance to create small software which has a direct
feeling with the hardware because the OS layer is less heavy there
which in turn makes it interesting to look at and work with the DOS
kernel itself: The kernel has manageable complexity and mortals can
actually understand the whole kernel while in Linux it will be hard
to find an expert who even understands the whole disk subsystem ;-)

> Thanks and best regards,
> 
> Robbie (Decheng) Fan (aka R.Mosaic)

Thanks! Regards, Eric


------------------------------------------------------------------------------
Get a FREE DOWNLOAD! and learn more about uberSVN rich system, 
user administration capabilities and model configuration. Take 
the hassle out of deploying and managing Subversion and the 
tools developers use with it. http://p.sf.net/sfu/wandisco-d2d-2
_______________________________________________
Freedos-devel mailing list
Freedos-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/freedos-devel

Reply via email to