[Freedos-devel] If I want to compile applications in FreeDOS, which compiler should I use?

2011-08-21 Thread Decheng Fan
Hello everybody,

I'm new to this mailing list, and I want to contribute to FreeDOS in some
way a developer can do. Since I've used FreeDOS just as a replacement for
MS-DOS, I know how to install it and how to run applications in it, but I
don't know what's the standard (or recommended) development environment to
develop applications in FreeDOS. Would you please let me know?

I've checked out the subversion repository of FreeDOS, and there are several
sub-directories:

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

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
recommended to use. And do you have any suggestions on how to test/debug the
kernel?

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
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.

Thanks and best regards,

Robbie (Decheng) Fan (aka R.Mosaic)
--
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


Re: [Freedos-devel] If I want to compile applications in FreeDOS, which compiler should I use?

2011-08-21 Thread dos386
Welcome :-)

Kernel AFAIK compiles with OW 1.9 + NASM (what versions ???).

Tools are OW or BC or NASM or JAWASM.

(BTW: is this documented somewhere ... easy to find and up-to-date ? Wiki ?)

For new code you can use any compiler, though:

http://www.unet.univie.ac.at/~a0503736/php/drdoswiki/index.php?n=Main.Development

--
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


Re: [Freedos-devel] If I want to compile applications in FreeDOS, which compiler should I use?

2011-08-21 Thread Eric Auer

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 

Re: [Freedos-devel] If I want to compile applications in FreeDOS, which compiler should I use?

2011-08-21 Thread Decheng Fan
Hi Eric,

Thank you for so detailed explanation. I'll take time to read your e-mail.
If I have new discoveries or new questions, I'll ping you again.

Best regards,

Robbie Fan

On Mon, Aug 22, 2011 at 1:21 AM, Eric Auer  wrote:

>
> 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,

Re: [Freedos-devel] If I want to compile applications in FreeDOS, which compiler should I use?

2011-08-21 Thread Decheng Fan
On Sun, Aug 21, 2011 at 9:46 PM, dos386  wrote:

> Welcome :-)
>
> Kernel AFAIK compiles with OW 1.9 + NASM (what versions ???).
>
> Tools are OW or BC or NASM or JAWASM.
>
> (BTW: is this documented somewhere ... easy to find and up-to-date ? Wiki
> ?)
>
> For new code you can use any compiler, though:
>
>
> http://www.unet.univie.ac.at/~a0503736/php/drdoswiki/index.php?n=Main.Development
>
>
> --
> 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
>

Hi dos386,
Thank you for this information. I'll look at the wiki page and try them. If
I have further questions I will come to ask you again.

Best regards,

Robbie
--
uberSVN's rich system and user administration capabilities and model 
configuration take the hassle out of deploying and managing Subversion and 
the tools developers use with it. Learn more about uberSVN and get a free 
download at:  http://p.sf.net/sfu/wandisco-dev2dev
___
Freedos-devel mailing list
Freedos-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/freedos-devel


Re: [Freedos-devel] If I want to compile applications in FreeDOS, which compiler should I use?

2011-09-04 Thread Decheng Fan
On Mon, Aug 22, 2011 at 1:21 AM, Eric Auer  wrote:

>
> 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 foun

Re: [Freedos-devel] If I want to compile applications in FreeDOS, which compiler should I use?

2011-09-04 Thread Bernd Blaauw
Op 4-9-2011 13:06, Decheng Fan schreef:

> I've also compiled FreeCOM, but there seems to be some warning messages,
> although I still get the final COMMAND.COM  file.
> The warning messages read like following:
> C:\WATCOM\BINNT\wcc -zq kswap.c -bt=dos @watcomc.cfg
> kswap.c(160): Warning! W102: Type mismatch (warning)
> kswap.c(160): Note! N2003: source conversion type is 'struct __iobuf *'
> kswap.c(160): Note! N2004: target conversion type is 'unsigned int '
> ...
> C:\Nasm209\nasm.exe  -f bin -o vspawn.com   vspawn.asm
> vspawn.asm:342: warning: label alone on a line without a colon might be
> in error
> vspawn.asm:388: warning: label alone on a line without a colon might be
> in error

These are 8086-specific disk-swapping helpers, so you can run a program 
while storing part of FreeCOM's memory on disk. Thus, they're optional.

> After compiling the kernel, I got KWC8616.sys as the kernel.sys file.
> Does this file name mean a kernel that runs on 8086, which supports
> FAT12/FAT16 (and because 80286/80386 is backwards compatible with 8086,
> so this kernel also runs on them?)

A '86' runs on 8086 and above, thus most generic/universal. Ending up 
with a '16' means support for FAT12 and FAT16 only, thus no FAT32. Most 
universal is a KWC8632.SYS renamed to KERNEL.SYS. Most MSDOS (1.00-7.00) 
compatible is a KWC8616 (with version set to 5.00 or 6.22).

> If I want to debug the kernel, say, the boot process, I guess I need to
> use bochs for that purpose?

or QEMU. Both have great logging/debugging ability, though I've not used 
that myself.

> And for device drivers is DOSEMU better for that purpose?

No idea. I know Japheth added some config.sys version to the DEBUG 1.25 
program..somewhere.

>
> My next step would be to understand the boot process as a whole.

Kernel sourcecode would be best studied. Remember you've got a hardware 
boot routine (on x86 it's mostly BIOS, sometimes EFI with or without 
BIOS compatibility), accessing a disk and then is the DOS bootup (disk 
--> MBR --> partition --> bootsector --> kernel --> magic (memory setup, 
disk enumeration) --> config.sys processing --> driver loading --> shell 
loading --> init script --> more driver loading --> console ( stare at 
C:\_ )

> Thanks and best regards,
>
> Robbie (Decheng) Fan

Have fun

--
Special Offer -- Download ArcSight Logger for FREE!
Finally, a world-class log management solution at an even better 
price-free! And you'll get a free "Love Thy Logs" t-shirt when you
download Logger. Secure your free ArcSight Logger TODAY!
http://p.sf.net/sfu/arcsisghtdev2dev
___
Freedos-devel mailing list
Freedos-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/freedos-devel


Re: [Freedos-devel] If I want to compile applications in FreeDOS, which compiler should I use?

2011-09-04 Thread dos386
> And for device drivers is DOSEMU better for that purpose?

I doubt that. Rather BOCHS, if it emulates the device you are
interested in ("PCI bridge" in BOCHS is a dream so far) ...
debugging drivers is always hard :-(

> No idea. I know Japheth added some config.sys version
> to the DEBUG 1.25 program..somewhere.

There is support for a DOS SYS (instead of DOS COM) DEBUG
in the source, so you must compile it yourself using JAWASM
(works for me) and then you can load this DEBUG from
FDCONFIG.SYS and use it to debug other SYS modules (untested).

Anyway, why not code drivers as TSR's rather than DOS SYS ?

> 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.

Arachne is now abandoned and needs a new maintainer.
CSS support is limited and no JS.

--
Special Offer -- Download ArcSight Logger for FREE!
Finally, a world-class log management solution at an even better 
price-free! And you'll get a free "Love Thy Logs" t-shirt when you
download Logger. Secure your free ArcSight Logger TODAY!
http://p.sf.net/sfu/arcsisghtdev2dev
___
Freedos-devel mailing list
Freedos-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/freedos-devel


Re: [Freedos-devel] If I want to compile applications in FreeDOS, which compiler should I use?

2011-09-08 Thread Decheng Fan
On Sun, Sep 4, 2011 at 8:18 PM, dos386  wrote:

> > And for device drivers is DOSEMU better for that purpose?
>
> I doubt that. Rather BOCHS, if it emulates the device you are
> interested in ("PCI bridge" in BOCHS is a dream so far) ...
> debugging drivers is always hard :-(
>
> > No idea. I know Japheth added some config.sys version
> > to the DEBUG 1.25 program..somewhere.
>
> There is support for a DOS SYS (instead of DOS COM) DEBUG
> in the source, so you must compile it yourself using JAWASM
> (works for me) and then you can load this DEBUG from
> FDCONFIG.SYS and use it to debug other SYS modules (untested).
>
> Anyway, why not code drivers as TSR's rather than DOS SYS ?
>
> > 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.
>
> Arachne is now abandoned and needs a new maintainer.
> CSS support is limited and no JS.
>
>
> --
> Special Offer -- Download ArcSight Logger for FREE!
> Finally, a world-class log management solution at an even better
> price-free! And you'll get a free "Love Thy Logs" t-shirt when you
> download Logger. Secure your free ArcSight Logger TODAY!
> http://p.sf.net/sfu/arcsisghtdev2dev
> ___
> Freedos-devel mailing list
> Freedos-devel@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/freedos-devel
>

Hi dos386,

Thanks for these interesting topics. I'm reading about the boot sector
today. But these days I'm quite busy so I'm going to find some time slot
later.
Best regards,

Robbie (Decheng) Fan
--
Doing More with Less: The Next Generation Virtual Desktop 
What are the key obstacles that have prevented many mid-market businesses
from deploying virtual desktops?   How do next-generation virtual desktops
provide companies an easier-to-deploy, easier-to-manage and more affordable
virtual desktop model.http://www.accelacomm.com/jaw/sfnl/114/51426474/___
Freedos-devel mailing list
Freedos-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/freedos-devel


Re: [Freedos-devel] If I want to compile applications in FreeDOS, which compiler should I use?

2011-09-09 Thread Decheng Fan
On Sun, Sep 4, 2011 at 7:27 PM, Bernd Blaauw  wrote:

> Op 4-9-2011 13:06, Decheng Fan schreef:
>
> > I've also compiled FreeCOM, but there seems to be some warning messages,
> > although I still get the final COMMAND.COM  file.
> > The warning messages read like following:
> > C:\WATCOM\BINNT\wcc -zq kswap.c -bt=dos @watcomc.cfg
> > kswap.c(160): Warning! W102: Type mismatch (warning)
> > kswap.c(160): Note! N2003: source conversion type is 'struct __iobuf *'
> > kswap.c(160): Note! N2004: target conversion type is 'unsigned int '
> > ...
> > C:\Nasm209\nasm.exe  -f bin -o vspawn.com 
>  vspawn.asm
> > vspawn.asm:342: warning: label alone on a line without a colon might be
> > in error
> > vspawn.asm:388: warning: label alone on a line without a colon might be
> > in error
>
> These are 8086-specific disk-swapping helpers, so you can run a program
> while storing part of FreeCOM's memory on disk. Thus, they're optional.
>
> > After compiling the kernel, I got KWC8616.sys as the kernel.sys file.
> > Does this file name mean a kernel that runs on 8086, which supports
> > FAT12/FAT16 (and because 80286/80386 is backwards compatible with 8086,
> > so this kernel also runs on them?)
>
> A '86' runs on 8086 and above, thus most generic/universal. Ending up
> with a '16' means support for FAT12 and FAT16 only, thus no FAT32. Most
> universal is a KWC8632.SYS renamed to KERNEL.SYS. Most MSDOS (1.00-7.00)
> compatible is a KWC8616 (with version set to 5.00 or 6.22).
>
> > If I want to debug the kernel, say, the boot process, I guess I need to
> > use bochs for that purpose?
>
> or QEMU. Both have great logging/debugging ability, though I've not used
> that myself.
>
> > And for device drivers is DOSEMU better for that purpose?
>
> No idea. I know Japheth added some config.sys version to the DEBUG 1.25
> program..somewhere.
>
> >
> > My next step would be to understand the boot process as a whole.
>
> Kernel sourcecode would be best studied. Remember you've got a hardware
> boot routine (on x86 it's mostly BIOS, sometimes EFI with or without
> BIOS compatibility), accessing a disk and then is the DOS bootup (disk
> --> MBR --> partition --> bootsector --> kernel --> magic (memory setup,
> disk enumeration) --> config.sys processing --> driver loading --> shell
> loading --> init script --> more driver loading --> console ( stare at
> C:\_ )
>
> > Thanks and best regards,
> >
> > Robbie (Decheng) Fan
>
> Have fun
>
>
> --
> Special Offer -- Download ArcSight Logger for FREE!
> Finally, a world-class log management solution at an even better
> price-free! And you'll get a free "Love Thy Logs" t-shirt when you
> download Logger. Secure your free ArcSight Logger TODAY!
> http://p.sf.net/sfu/arcsisghtdev2dev
> ___
> Freedos-devel mailing list
> Freedos-devel@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/freedos-devel
>

Hi Bernd,

Nice to see your e-mail. I think there is still a long way for me to go,
since I remember seeing a book about MS-DOS 6.00 published in China, which
was about 400 pages. I will pick up topics that are interesting to me along
the way of the exploration.

Best regards,

Robbie (Decheng) Fan
--
Malware Security Report: Protecting Your Business, Customers, and the 
Bottom Line. Protect your business and customers by understanding the 
threat from malware and how it can impact your online business. 
http://www.accelacomm.com/jaw/sfnl/114/51427462/___
Freedos-devel mailing list
Freedos-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/freedos-devel


Re: [Freedos-devel] If I want to compile applications in FreeDOS, which compiler should I use?

2011-09-10 Thread Bernd Blaauw
Op 10-9-2011 2:57, Decheng Fan schreef:
> Hi Bernd,
> Nice to see your e-mail. I think there is still a long way for me to go,
> since I remember seeing a book about MS-DOS 6.00 published in China,
> which was about 400 pages. I will pick up topics that are interesting to
> me along the way of the exploration.

Basic DOS operating support is nowadays available online, for example
[ http://www.bootablecd.de/fdhelp-internet/en/index.htm ] or
[ http://www.vfrazee.com/ms-dos/6.22/help/ ].

That already covers a lot of those 400 pages, I bet.
Other topics are covered all over the internet, http://www.drdos.org is 
a good one.

Programming on/for DOS is an entirely different subject. You'd likely 
start with RBIL (Ralph Brown's Interrupt List) and read into programming 
languages like Assembly (NASM, TASM, WASM etc), Basic (FreeBASIC), C 
(Openwatcom, DJGPP) etcetera.

--
Malware Security Report: Protecting Your Business, Customers, and the 
Bottom Line. Protect your business and customers by understanding the 
threat from malware and how it can impact your online business. 
http://www.accelacomm.com/jaw/sfnl/114/51427462/
___
Freedos-devel mailing list
Freedos-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/freedos-devel


Re: [Freedos-devel] If I want to compile applications in FreeDOS, which compiler should I use?

2011-09-10 Thread dos386
> You'd likely __start__ with RBIL (Ralph Brown's Interrupt List) and

I would NOT do this ... it's obsolete (last update IIRC 1998) and
it's very hard to find the "still useful" stuff inside (but there is some).

> languages like Assembly (NASM, TASM, WAS

FASM

--
Using storage to extend the benefits of virtualization and iSCSI
Virtualization increases hardware utilization and delivers a new level of
agility. Learn what those decisions are and how to modernize your storage 
and backup environments for virtualization.
http://www.accelacomm.com/jaw/sfnl/114/51434361/
___
Freedos-devel mailing list
Freedos-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/freedos-devel


Re: [Freedos-devel] If I want to compile applications in FreeDOS, which compiler should I use?

2011-09-10 Thread Ralf A. Quint
At 10:35 PM 9/10/2011, dos386 wrote:
> > You'd likely __start__ with RBIL (Ralph Brown's Interrupt List) and
>
>I would NOT do this ... it's obsolete (last update IIRC 1998) and
>it's very hard to find the "still useful" stuff inside (but there is some).
Nonsense. DOS is "officially" dead before that, so it if far more 
relevant than you try to make it look...
For almost everything, it is still THE reference today...

Ralf 


--
Using storage to extend the benefits of virtualization and iSCSI
Virtualization increases hardware utilization and delivers a new level of
agility. Learn what those decisions are and how to modernize your storage 
and backup environments for virtualization.
http://www.accelacomm.com/jaw/sfnl/114/51434361/
___
Freedos-devel mailing list
Freedos-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/freedos-devel


Re: [Freedos-devel] If I want to compile applications in FreeDOS, which compiler should I use?

2011-09-10 Thread dos386
> Nonsense. DOS is "officially" dead before that, so it if far more
> relevant than you try to make it look...

There are even virii inside :-)

I want to determine the size of a file. How to search for
this topic in the huge RBIL ?

I want to do file I/O from a TSR. What does RBIL tell me about that?

I want to read out the PIT. Will RBIL provide a good example how to do?

I want to control the screen V frequency. Will RBIL give me any useful
info, except details specific to a few archaic cards that nobody has anymore?

--
Using storage to extend the benefits of virtualization and iSCSI
Virtualization increases hardware utilization and delivers a new level of
agility. Learn what those decisions are and how to modernize your storage 
and backup environments for virtualization.
http://www.accelacomm.com/jaw/sfnl/114/51434361/
___
Freedos-devel mailing list
Freedos-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/freedos-devel


Re: [Freedos-devel] If I want to compile applications in FreeDOS, which compiler should I use?

2011-09-10 Thread Ralf A. Quint
At 11:22 PM 9/10/2011, dos386 wrote:
> > Nonsense. DOS is "officially" dead before that, so it if far more
> > relevant than you try to make it look...
>
>There are even virii inside :-)

...
Yeah, messes even with your DNS >:-}


>I want to determine the size of a file. How to search for
>this topic in the huge RBIL ?

takes about .5 sec with RBILViewer for example...


>I want to do file I/O from a TSR. What does RBIL tell me about that?
>
>I want to read out the PIT. Will RBIL provide a good example how to do?

It's a reference list, not tutorial...
But if you are looking for details on a certain BIOS/DOS call, all 
the information you could possibly need IS in there...

>I want to control the screen V frequency. Will RBIL give me any useful
>info, except details specific to a few archaic cards that nobody has anymore?

Sure, pretty much every newbie HAS To do that...

Get real Bubba, if you are so smart as you claim in regards to DOS, 
how about telling us a more appropriate resource instead...

Ralf 


--
Using storage to extend the benefits of virtualization and iSCSI
Virtualization increases hardware utilization and delivers a new level of
agility. Learn what those decisions are and how to modernize your storage 
and backup environments for virtualization.
http://www.accelacomm.com/jaw/sfnl/114/51434361/
___
Freedos-devel mailing list
Freedos-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/freedos-devel


Re: [Freedos-devel] If I want to compile applications in FreeDOS, which compiler should I use?

2011-09-10 Thread dos386
> Get real Bubba

Done!

--
Using storage to extend the benefits of virtualization and iSCSI
Virtualization increases hardware utilization and delivers a new level of
agility. Learn what those decisions are and how to modernize your storage 
and backup environments for virtualization.
http://www.accelacomm.com/jaw/sfnl/114/51434361/
___
Freedos-devel mailing list
Freedos-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/freedos-devel


Re: [Freedos-devel] If I want to compile applications in FreeDOS, which compiler should I use?

2011-09-16 Thread Aitor Santamaría
Hi,

I was precisely wondering these days about RBIL itself, do you know if
Ralf Brown is already working on future versions, or has definitely
stopped working on it? (in case you have contacted him already). Posts
here in the past seemed to suggest (IIRC) that there actually was a
lot of work to be done and info to be inserted there from various
sources and contributos were welcome.

I don't know what those sources would be, I have always wished there
was more useful information on topics like VxD API functions, printer
codes or such. And even a completely different reference but that
would be useful (and not DOS related, or maybe yes), the DLL functions
in the different Windows DLLs across times, something that you can
hardly find out in books like "Undocumented Windows" and such...
Just dreaming :)

Aitor


2011/9/11 Ralf A. Quint :
> At 10:35 PM 9/10/2011, dos386 wrote:
>> > You'd likely __start__ with RBIL (Ralph Brown's Interrupt List) and
>>
>>I would NOT do this ... it's obsolete (last update IIRC 1998) and
>>it's very hard to find the "still useful" stuff inside (but there is some).
> Nonsense. DOS is "officially" dead before that, so it if far more
> relevant than you try to make it look...
> For almost everything, it is still THE reference today...
>
> Ralf
>
>
> --
> Using storage to extend the benefits of virtualization and iSCSI
> Virtualization increases hardware utilization and delivers a new level of
> agility. Learn what those decisions are and how to modernize your storage
> and backup environments for virtualization.
> http://www.accelacomm.com/jaw/sfnl/114/51434361/
> ___
> Freedos-devel mailing list
> Freedos-devel@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/freedos-devel
>

--
BlackBerry® DevCon Americas, Oct. 18-20, San Francisco, CA
http://p.sf.net/sfu/rim-devcon-copy2
___
Freedos-devel mailing list
Freedos-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/freedos-devel


Re: [Freedos-devel] If I want to compile applications in FreeDOS, which compiler should I use?

2011-09-16 Thread Ralf A. Quint
At 04:20 AM 9/16/2011, Aitor Santamaría wrote:
>Hi,
>
>I was precisely wondering these days about RBIL itself, do you know if
>Ralf Brown is already working on future versions, or has definitely
>stopped working on it? (in case you have contacted him already). Posts
>here in the past seemed to suggest (IIRC) that there actually was a
>lot of work to be done and info to be inserted there from various
>sources and contributos were welcome.

I think that Matthias mentioned long time ago 
that some updates would/could be forthcoming, but 
he has refrained from actively participating here 
probably as long as I have, probably for similar reasons...

>I don't know what those sources would be, I have always wished there
>was more useful information on topics like VxD API functions, printer
>codes or such. And even a completely different reference but that
>would be useful (and not DOS related, or maybe yes), the DLL functions
>in the different Windows DLLs across times, something that you can
>hardly find out in books like "Undocumented Windows" and such...

I think that would be largely beyond the scope of 
an "Interrupt" list, even considering that for a 
long time additional info like memory locations and port info was included.
There hasn't been any updates on DOS for longer 
than there haven't been any on RBIL, so I don't 
see why someone would seriously expect more recent releases.
RBIL just as it is, is still a very valuable 
resource for anyone seriously interested in DOS 
related programming, but it seems the number of 
people still interested (for real) in this is far 
less than the number of updates for RBIL...

Ralf 


--
BlackBerry® DevCon Americas, Oct. 18-20, San Francisco, CA
http://p.sf.net/sfu/rim-devcon-copy2
___
Freedos-devel mailing list
Freedos-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/freedos-devel


Re: [Freedos-devel] If I want to compile applications in FreeDOS, which compiler should I use?

2011-09-16 Thread Rugxulo
Hi,

On Fri, Sep 16, 2011 at 10:17 AM, Ralf A. Quint  wrote:
> At 04:20 AM 9/16/2011, Aitor Santamaría wrote:
>>
>>I was precisely wondering these days about RBIL itself, do you know if
>>Ralf Brown is already working on future versions, or has definitely
>>stopped working on it? (in case you have contacted him already). Posts
>>here in the past seemed to suggest (IIRC) that there actually was a
>>lot of work to be done and info to be inserted there from various
>>sources and contributos were welcome.

Right, I always heard it was in need of a minor update with more to
add or correct (esp. by Matthias Paul), but apparently that never
happened. Well, it's not impossible, just very unlikely after 10
years.   :-/Then again, C99 and C1x    ;-)

These days Ralf seems to be still active in other areas, but
apparently only on other projects:

http://www.cs.cmu.edu/~ralf/
http://sourceforge.net/projects/cmu-ebmt/files/
http://sourceforge.net/users/ralfbrown

However, I have no reason to waste his time, so I won't.:-)

> I think that Matthias mentioned long time ago
> that some updates would/could be forthcoming, but
> he has refrained from actively participating here
> probably as long as I have, probably for similar reasons...

Dunno. He hasn't been active in a long time, at least not publicly,
and his website is quite outdated. He never finished a lot of things.
(Sounds like most of us, heh.) He's probably just busy with real life,
dunno, haven't ever really contacted him, IIRC.

He's obviously a very savvy and smart guy, so his input would be nice!
But yeah, I guess he's got better things to do with his time. He was
heavily involved in DR-DOS back in the day, but am I correct in
understanding that he cooperated a bit with FreeDOS too? (e.g. various
technotes)

Anyways, the most recent mention I had found of him was here (Dec. 2007):

http://www.msfn.org/board/topic/109018-windows-98-in-dr-dos/

>>I don't know what those sources would be, I have always wished there
>>was more useful information on topics like VxD API functions, printer
>>codes or such. And even a completely different reference but that
>>would be useful (and not DOS related, or maybe yes), the DLL functions
>>in the different Windows DLLs across times, something that you can
>>hardly find out in books like "Undocumented Windows" and such...
>
> I think that would be largely beyond the scope of
> an "Interrupt" list, even considering that for a
> long time additional info like memory locations and port info was included.
> There hasn't been any updates on DOS for longer
> than there haven't been any on RBIL, so I don't
> see why someone would seriously expect more recent releases.

I find this hard to believe, but I guess? I can see what you're
saying. "DOS" to most people means "MS-DOS", which is indeed long
dead.

I guess it would be more crucial if there was a portable (a la POSIX)
standard for DOS.   ;-))
Considering all the variants out there, it's not the worst idea in the
world (IMHO)!

> RBIL just as it is, is still a very valuable
> resource for anyone seriously interested in DOS
> related programming, but it seems the number of
> people still interested (for real) in this is far
> less than the number of updates for RBIL...

To each his/her own 

--
BlackBerry® DevCon Americas, Oct. 18-20, San Francisco, CA
http://p.sf.net/sfu/rim-devcon-copy2
___
Freedos-devel mailing list
Freedos-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/freedos-devel


Re: [Freedos-devel] If I want to compile applications in FreeDOS, which compiler should I use?

2011-09-16 Thread Ralf A. Quint
At 06:20 PM 9/16/2011, Rugxulo wrote:

> > I think that Matthias mentioned long time ago
> > that some updates would/could be forthcoming, but
> > he has refrained from actively participating here
> > probably as long as I have, probably for similar reasons...
>
>Dunno. He hasn't been active in a long time, at least not publicly,
>and his website is quite outdated. He never finished a lot of things.
>(Sounds like most of us, heh.) He's probably just busy with real life,
>dunno, haven't ever really contacted him, IIRC.
>
>He's obviously a very savvy and smart guy, so his input would be nice!
>But yeah, I guess he's got better things to do with his time. He was
>heavily involved in DR-DOS back in the day, but am I correct in
>understanding that he cooperated a bit with FreeDOS too? (e.g. various
>technotes)

He used to work in fact for DR/Novell/Caldera's DR-DOS division in 
the UK, until it was shut down

He used to be a regular in here and dropped out around the same time 
as I did
The last email exchange i had with him is from July/August 2003, 
regarding MS-DOS OEM versions and his quest to get his hands on one 
of the very rare Sony 200MB floppy disc drives...

>"DOS" to most people means "MS-DOS", which is indeed long dead.

So is any other DOS. In a technical sense at least. DR-DOS is dead, 
PC-DOS is dead, PT-DOS is apparently dead as well...
And FreeDOS original goal was to create a MS-DOS 6 clone, which would 
be freely distributable after the demise of those commercial versions...

>I guess it would be more crucial if there was a portable (a la POSIX)
>standard for DOS.   ;-))
>Considering all the variants out there, it's not the worst idea in the
>world (IMHO)!

Well, that is/was MS/PC-DOS.
Don't understand what else you mean/refer to as "portable". DOS is 
grown up on the x86 platform, being the very OS that allowed the PC 
world as it exists today to develop. Where do you want to port it to? 
You can't port it to any other CPU platform, as that would prevent 
each and every DOS program every written not to be executable 
anymore, so what's the point?

Ralf 


--
BlackBerry® DevCon Americas, Oct. 18-20, San Francisco, CA
http://p.sf.net/sfu/rim-devcon-copy2
___
Freedos-devel mailing list
Freedos-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/freedos-devel


Re: [Freedos-devel] If I want to compile applications in FreeDOS, which compiler should I use?

2011-09-16 Thread Rugxulo
Hi,

On Fri, Sep 16, 2011 at 9:01 PM, Ralf A. Quint  wrote:
> At 06:20 PM 9/16/2011, Rugxulo wrote:
>
>>I guess it would be more crucial if there was a portable (a la POSIX)
>>standard for DOS.   ;-))
>>Considering all the variants out there, it's not the worst idea in the
>>world (IMHO)!
>
> Well, that is/was MS/PC-DOS.

I meant something well-documented, not blindly abandoned and hidden under a rug.

> Don't understand what else you mean/refer to as "portable". DOS is
> grown up on the x86 platform, being the very OS that allowed the PC
> world as it exists today to develop. Where do you want to port it to?

I didn't really mean portable, just standardized.

> You can't port it to any other CPU platform, as that would prevent
> each and every DOS program every written not to be executable
> anymore, so what's the point?

You can port to anything you want, e.g. Mac w/ Rosetta. Some (but not
all) software has sources too. Emulators could exist, there's no
reason to kill binary compatibility.

But really I was just musing about having some kind of DOS Committee.
I don't really expect it to happen.

--
BlackBerry® DevCon Americas, Oct. 18-20, San Francisco, CA
http://p.sf.net/sfu/rim-devcon-copy2
___
Freedos-devel mailing list
Freedos-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/freedos-devel


Re: [Freedos-devel] If I want to compile applications in FreeDOS, which compiler should I use?

2011-09-17 Thread Steve Nickolas
On Fri, 16 Sep 2011, Ralf A. Quint wrote:

> At 06:20 PM 9/16/2011, Rugxulo wrote:
>
>> "DOS" to most people means "MS-DOS", which is indeed long dead.
>
> So is any other DOS. In a technical sense at least. DR-DOS is dead,
> PC-DOS is dead, PT-DOS is apparently dead as well...
> And FreeDOS original goal was to create a MS-DOS 6 clone, which would
> be freely distributable after the demise of those commercial versions...

DOS to me has always meant MS-DOS or PC DOS.  I can deal with the clones 
inasfar as they act like MS-DOS, and in general FreeDOS has been better at 
this on the user level, while DR DOS has been better under the hood.

>> I guess it would be more crucial if there was a portable (a la POSIX)
>> standard for DOS.   ;-))
>> Considering all the variants out there, it's not the worst idea in the
>> world (IMHO)!
>
> Well, that is/was MS/PC-DOS.

QFT.

> Don't understand what else you mean/refer to as "portable". DOS is
> grown up on the x86 platform, being the very OS that allowed the PC
> world as it exists today to develop. Where do you want to port it to?

Well, there's a kindasorta DR DOS kernel port over on the 68K, but that's 
deader than x86 considering x86 is still very much alive and well >:P

Besides, it only mimics DOS 2.11.

-uso.

--
BlackBerry® DevCon Americas, Oct. 18-20, San Francisco, CA
http://p.sf.net/sfu/rim-devcon-copy2
___
Freedos-devel mailing list
Freedos-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/freedos-devel