Hi, my SDCC installation and tool chain for HC08 seem to be working pretty much okey, I can compile, link and run small C-programs.
However, when ever write code that involves the compiler suppor C integer math functions the math comes out bad, mosty result is 1. The code does not chras and the calling side (looking at the .rel or .lst files) seem sane, passing arguments and results in a way I would expect it to do. But the result is just bad. A simple statement like this: printf("%6d %6d \n",readChannel(4),readChannel(4)/10); prints out something like 12345 1 And I've tested even simpler ones, but this is verbatim from my latest trial. So, propably something is still wrong in my set up, don't think there could be this fundamental problem with libs but I'm stuck at the moment. Any suggestions? br Kusti My make file looks like follows: ------------------------------------------------------------ SDCC = ~/sdcc/bin/sdcc OBJS = autocol.rel printf.rel LIBS = TARGET = autocol SDCCFLAGS = -mhc08 --stack-loc 0x043F --code-loc 0xC000 --stack-auto %.rel : %h %.rel : %.c $(SDCC) -c $(SDCCFLAGS) $(CPPFLAGS) $< -o $@ $(TARGET): $(OBJS) Makefile $(SDCC) $(SDCCFLAGS) -o $(TARGET) $(OBJS) $(LIBS) all: $(TARGET) ------------------------------------------------------------ My SDCC version is: ------------------------------------------------------------ sdcc -v SDCC : mcs51/gbz80/z80/avr/ds390/pic16/pic14/TININative/xa51/ds400/hc08 2.7.4 #4988 (Jan 9 2008) (Mac OS X i386) ------------------------------------------------------------ br Kusti ------------------------------------------------------------------------- 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