( This is an example FORTH PROGRAM that uses the IO routines in the debug
  monitor to print out simple messages. 

  1- Set the code address to free RAM memory

  2- Compile this file with the -lo options

       fc -lo hello

     Make sure that the compiler can find the main.x file generated
     when the monitor was compiled.

  3- Use the download command in the monitor to load the program
   
     rtx> x
     { download file hello.ols , then send an escape character }
     0000
     rtx>

     After downloading the file main.ols and sending an escape character,
     the monitor should respond by printing 0000 to indicate an error
     free download.

   4-  Use the g command to start the program 

    rtx> g XXXX
   
    where XXXX is the code address set in step 1.
)

( The file main.x is produced when the monitor is compiled )
#include main.x

0x5000 code

: test ( -- )
 "Hello World\n" emit_string
 "Next we will push stuff onto the stack and print it out in hex\n" emit_string
 3
 2
 1
 .x .x .x   ( .x prints a hex number )
 newline
 "Thats all\n" emit_string
;  ( returns to the monitor )  
