A CC95 "Hello, World!" challenge.
Please dust off and fire up your Apple1 hardware and try to get a CC95 compiled "Hello, World!" program to work.
It's been my experience that CC95 programs work with the various emulators out there (it works on POM1 and MESS), but doesn't work on the real thing.
I've got the 6502 Krusader 1.3 version installed on my Replica1 to try to figure this out (this version can trace through code). I'll post my results when I've figured it out.
I'm wondering if anyone else out there has tried this, or has another way of seeing what's happening on real hardware in the meantime.
Good luck!
Here's my copy of hello.c and a build script. You'll have to fix the include line, put in the less than and greater than characters.
#####
#include ***conio.h***
void
main (void)
{
unsigned char hello[] = "Hello, World!";
unsigned char * p = hello;
cputc(0x0D);
while (*p)
cputc(*p++);
cputc(0x0D);
}
#####
#!/bin/sh
HOME=/Users/XXXX/
#CC65_INC=/usr/local/lib/cc65/include
#CC65_LIB=/usr/local/lib/cc65/lib
CC65_INC=$HOME/apple1/cc65/cc65-2.11.0/include
CC65_LIB=$HOME/apple1/cc65/cc65-2.11.0/libsrc
CC65=$HOME/apple1/cc65/cc65-2.11.0/src/cc65/cc65
CA65=$HOME/apple1/cc65/cc65-2.11.0/src/ca65/ca65
LD65=$HOME/apple1/cc65/cc65-2.11.0/src/ld65/ld65
export CC65_INC CC65_LIB
rm -f $1.lst $1.asm $1.o $1
## -v for verbose, -O for optimize
$CC65 -v -t replica1 -T -o $1.asm $1.c
## -l for output listing
$CA65 -v -t replica1 -o $1.o $1.asm
## For local config, use -C replica1.cfg with ld65 instead of -t replica1
$LD65 -v -t replica1 -o $1 replica1.o $1.o apple1.lib
./bintomon $1 > $1.hex
cat $1.hex

