[C128] Can't target C128 with linux compiler
Divarin opened this issue · comments
Discussed in #2439
Originally posted by Divarin April 5, 2024
Simple hello world program for C128:
#include <stdio.h> #include <c128.h> void main() { printf("Hello World!\n"); }
Compile using Linux compiler:
~/git/cc65/bin/cc65 -t c128 hello.c
~/git/cc65/bin/cl65 term.s -o term.prg
Run in VICE (128), garbage on the screen.
Run in VICE (64) works fine.
Compile same source with windows compiler through wine:
wine ~/work/code/cc65/bin/cc65.exe -t c128 term.c
wine ~/work/code/cc65/bin/cl65.exe term.s -o term.prg
Run in VICE (128) works fine.
Run in VICE (64) nothing happens.
It looks like the Linux version of the compiler is not targeting C128 but actually C64.
- which version of cc65
- if latest git master, maybe you can diff the generated asm or map files of win vs linux version and find out where it goes wrong
No idea what you did there, but if you don't give the target switch to cl65, it will use c64 target - that's expected :)