Hi, I compile a small test piece (at bottom here) with command lines:
sdcc -mhc08 -c --stack-loc 0x00FF hello.c sdcc -mhc08 --code-loc 0xE000 --data-loc 0x40 -o hello.S19 hello.rel And appart from the non used main parameter warnings and unreachable return the compile is clean. And when it runs I get the following on my terminal X = ? and then the program presumably crashes as I get nothing further. I presume a lot in my target/compiler setup is correct because my own tiny printf is functioning. I also suspect that the stdio/printf is ok, woudl be hard to miss something this obvious. Instead I suspect something is wrong with my compile options but have not been able find out what. Any suggestions? Is 192 bytes of stack enough for the printf? I've seen implementations that require 3 x max line lengt (250) bytes... br Kusti #include <stdio.h> //#include "printf.h" data at 0x00 char PTA; data at 0x04 char DDRA; data at 0x03 char PTD; data at 0x07 char DDRD; void putchar(char x) { (void)x; _asm jsr 0xFEAF _endasm; } int main(int argn,char** args) { int x; DDRD=0x03; PTD=0x03; PTA=0x00; DDRA=0x00; x=0; while (1) { x++; printf("X = %d\n",x); } return 0; } ------------------------------------------------------------------------- This SF.net email is sponsored by: Microsoft Defy all challenges. Microsoft(R) Visual Studio 2008. http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/ _______________________________________________ Sdcc-user mailing list Sdcc-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/sdcc-user