[Freedos-devel] If I want to compile applications in FreeDOS, which compiler should I use?
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?
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?
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,
Re: [Freedos-devel] If I want to compile applications in FreeDOS, which compiler should I use?
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 e.a...@jpberlin.de 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,
Re: [Freedos-devel] If I want to compile applications in FreeDOS, which compiler should I use?
On Sun, Aug 21, 2011 at 9:46 PM, dos386 dos...@gmail.com 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
[Freedos-devel] ide's
Besides cranky old RHIDE, I like GEANY; it is automatically extensible to C/C++, some basics, and at least NASM, the only asm I like. GEANY has a linux and a windows version, but make sure that for windows you use a very latest version, as a couple or three numbers ago, it would not work in windows. Now it works perfectly. Ironically a compile-time failure does not generate error sigs, just: compilation failed; the command line compilation is more informative. I still like GEANY. Richard Kleinwb2...@gmail.com. -- 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