Anyway, my C code looks like this:
Code: Select all
#include <stdint.h>
#define UART_REG 0x5000
#define REG_DATA(x) ((volatile uint8_t*)(x))[0]
void main (void)
{
REG_DATA(UART_REG) = 'H';
REG_DATA(UART_REG) = 'e';
REG_DATA(UART_REG) = 'l';
REG_DATA(UART_REG) = 'l';
REG_DATA(UART_REG) = 'o';
while(1){};
}
So modifying the Makefile in the "samples" directory to use "sim6502" as the target, These commands were executed:
Code: Select all
$ make
../bin/cc65 -Ors --codesize 500 -T -g -t sim6502 hello.c
../bin/ca65 hello.s
../bin/ld65 -o hello -t sim6502 -m hello.map hello.o sim6502.lib
What steps do I need to do in order to make the appropriate jump into my C program? Ideally, I would like to output a raw hex file that contains $FFFF bytes, so I can easily load the values into my simulated RAM.
Thanks!