To make a normal 'Hello world' program, do this:
- Set your default directory to where the OZONE binaries are, normally /ozone/binaries/.
- Create your hello.c program using edt hello.c (edt is another
favoUrite thing of mine from VMS). Use the normal #include <stdio.h> in it.
- Compile it using gcc -DOZ_HW_TYPE_486 -c -o hello.o hello.c
- Link it using ld -d -r -o hello.r hello.o ../objects/oz_crtl_start.o ../libraries/oz_crtl.a
- Convert the executable using elfconv hello.oz hello.o oz_kernel_486.oz (it prints out a long load map)
- Run it using run hello.oz
As you can see, there are rough edges:
- set up gcc to do the -DOZ_HW_TYPE_486 automatically
- fix elfconv so you don't have to be in the ozone binaries directory to link. It needs to be there to find
the oz_kernel_486.oz image (which is just a sharable library to it).
- fix run to run an image that is in any directory. Right now, it has to be in a directory listed in the
OZ_IMAGE_DIR (logical name) list of directories (sort of like unix's PATH variable).