leDos is a tiny Java virtual machine and a set of development tools intended to allow you to develop and run Java applications on a MS-DOS system with 8088 and at least 128 KB of RAM.
Current version (0.1) is a (almost) straight port from leJOS project (see below). The aim for next version (1.0) is to provide an enviroment very close to SUN CLDC 1.0 (see below).
What is leDos? -------------- leDos is a tiny Java virtual machine and a set of development tools intended to allow you to run Java applications (well, SMALL ones :-)) on a MS-DOS system with 8088 and at least 128 KB of RAM. At this stage (v.0.1) leDos is a (almost) straight port from leJOS 2.1.0 (see http://lejos.sourceforge.net/index.html). I only made the necessary changes to have it compile under the freely available Borland Turbo C/C++ 1.01 compiler (available at http://community.borland.com/museum/). I also added a Console class to let you print to and read from the DOS console and stripped off some of the code relatd to the RCX. Basically this is only a "proof of concept" that you can run Java on a 8088 DOS machine, in the future I'm planning to add native methods to access the PC hardware and remove (hopefully) some of leJOS limitations (basically b/c we can have a larger footprint). Requirements ------------ - To develop applications for leDos you need a machine with a Java Development Kit installed. I use Java JDK 1.4.x from SUN (see http://java.sun.com) under Windows. You should have no problems using JKD for other platforms. - A DOS box to run leDos and leDos programs (it runs in a DOS window under Windows). Setup ----- Environment: - Set JAVA_HOME to your JDK directory (NOT to its /bin sub-folder). - Set LEDOS_HOME to the directory where you unzipped leDos. - Add %LEDOS_HOME%\bin to your PATH. Compiling, Linking and Running ------------------------------ leDos uses your JDK to compile code, it only changes the -bootclasspath appropriately to use specific leDos (well, leJOS) libraries. Under the folder /test there are a couple of classes we can use to test leDos: Console class provides basic console I/O, while HelloWorld is the usual Hello program. To compile them, use the following commands: ledosc Console.java ledosc HelloWorld.java /bin/ledosc.bat will invoke javac with the necessary parameters to compile the classes. Now there is an extra step needed: to save memory and speed up execution, we will "compact" our .class files using a process not very different from old-style linking. The "linker" we will use is a java application you can find under /jtools folder. To link our HelloWorld program you use the following command: ledoslink HelloWorld -o hello.bin /bin/ledoslink.bat is a batch file that will invoke the java linker and will produce a binary file (hello.bin) that can be executed by leDos. To execute hello.bin type: ledos hello.bin The progrma will ask for your name, enter it followed by <return> and salutations will be printed on screen! Now you are ready to program in Java under DOS :-) Limitations and Bugs -------------------- See leJOS for a list of limitations and known bugs. This version of leDos is not solving any of them, actually, it may introduce some of its own. License ------- I am releasing under the Mozilla Public License (see LICENSE) since that is the one used by leJOS. The founder of leDos is Massimiliano Zattera AKA "Zazzy". Documentation ------------- Please refer to leJOS documentation for more info.