next up previous contents
Next: Building MOSS Up: Using MOSS Previous: Building and running MOSS

Example MOSS application

For example, here is how you can build the ubiquitous ``hello world'' test program:

$ cat >test.c
  printf("hello world!\n");
$ i386-moss-gcc test.c

Now you should have a file called `a.out' in your current directory. Copy that file to your DOS machine, along with MOSS.EXE, the DOS extender itself, which should be in /usr/local/i386-moss/bin/moss.exe (or the corresponding path if you installed MOSS in a different place). For example, if you can FTP from your DOS machine to your development machine:

C:\> ftp develmachine
Username: me
ftp> get a.out
ftp> get moss.exe
ftp> quit
C:\> moss
hello world!

Bryan Ford