-
Notifications
You must be signed in to change notification settings - Fork 19
Writing your first C Program for NitrOS‐9
Andrew Diller edited this page Oct 5, 2024
·
4 revisions
Building Hello World in C
-
Macintosh running OSX
- will run the c compiler (cmoc)
- will host the DriveWire server
-
Foenix 256x (jr or K) with 6809 CPU and Nitros9 installed
-
cmoc - http://perso.b2b2c.ca/~sarrazip/dev/cmoc.html
- CMOC is a 6809-generating cross-compiler for a large subset of the C language. I
-
lwtools - http://www.lwtools.ca/
- LWTOOLS is a set of cross-development tools for the Motorola 6809 and Hitachi 6309 microprocessors
-
DriveWire Server - https://github.com/boisy/DriveWire
- DriveWire defines a standard for guest computers to access input/output resources on a host computer
- download and they should compile with OSX command-line-tools, make, sudo make install etc...
- drivewire server requires Xcode, so make sure you have it downloaded. It runs on the latest, 16 in Sequoia.
#include <cmoc.h>
main()
{printf("hello world\n");}
$ cmoc -v
cmoc (cmoc 0.1.86)
$ cmoc --os9 hello.c
Prepare a disk to host with drivewire:
/usr/local/bin/os9 format hello.dsk
/usr/local/bin/os9 copy hello hello.dsk,hello
/usr/local/bin/os9 attr -epe hello.dsk,hello
/usr/local/bin/os9 dump hello
/usr/local/bin/os9 ident hello
-
mount hello.dsk in DriveWire Server (xcode app- run xcode, load project and then run it)
-
Connect Macintosh to Foenix via USB to Serial Adapter
-
boot F256,
dir /x0
and you should see your hello program on the hosted disk image.
- Directions on how to host your apps on FujiNet Drivewire!
NitrOS-9: Empowering 6809 CPUs with a modern, efficient operating system @2024