I tried to submit a bug report and it said that I need to register. So I did.

I did some more investigation about my issue (the compiler generates bad output). If I generate the assembly files then I use aslink  in the assembly file the result is correct. It seems is an issue with the linker.


My machine is a OpenSuse 11.0 X64 (kernel


cc (SUSE Linux) 4.3.1 20080507 (prerelease) [gcc-4_3-branch revision 135036]
Copyright (C) 2008 Free Software Foundation, Inc.

My original post

Tried to compile a very simple c program using the latest sdcc for the z80 (SDCC : mcs51/gbz80/z80/avr/ds390/pic16/pic14/TININative/xa51/ds400/hc08 2.9.4 #5582 (Dec  6 2009) (UNIX))
I know that everybody uses its own CRT,  but this still is a bug

Thanks  Caitlin

sdcc -mz80 test.c

try to run hex2bin and hex2bin crashes. The reason is that the ihx file is not correct

The problem it seems is with the CRT. compiled the same file without CRT and hex2bin works


int  set(int t,int x)
    int n = t+x;
     return n;
int main()
   return 0;

test.ihx (with CRT)


test.ihx without CRT


Windows Live Hotmail gives you a free,exclusive gift. Click here to download.