Hey! I've been playing around with easy68k and its pretty cool, but I would like to trying programming on it with c. I've compiled m68k-gcc-elf and I've written this code:
Code:
int main(){
char *text="Hello World!";
asm volatile("LEA %0,%%A1\n"
"MOVE.B #14,%%D0\n"
"TRAP #15\n"
"MOVE.B #9,%%D0\n"
"TRAP #15\n"
:/*no outputs */
:"m"(text)
:"%d0","%a1"
);
return 0;
}
I compiled it using
Code:
m68k-elf-gcc test.c -o test.elf -ffreestanding -nostdlib -m68000
m68k-elf-objcopy -O binary test.elf test.bin
I then used Easybin to convert the .bin file to a .s68. When I got to run the code in the simulator I get this error:
Code:
Address Error: Instruction at 4 accessing address fffffb
Has anyone ever got gcc working with easy68k? or does anyone have any idea on how I could get it to work?