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.

Thanks

P
My machine is a OpenSuse 11.0 X64 (kernel 2.6.25.20-0.5-default) 

GCC 


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



test.c

int  set(int t,int x)
{
    int n = t+x;
     return n;
}
int main()
{
    set(1,2); 
   return 0;
} 


test.ihx (with CRT)


:0000000000
:03000000C3000139
:00000800F8
:02000800ED4DBC
:00001000F0
:02001000ED4DB4
:00001800E8
:02001800ED4DAC
:00002000E0
:02002000ED4DA4
:00002800D8
:02002800ED4D9C
:00003000D0
:02003000ED4D94
:00003800C8
:02003800ED4D8C
:00010000FF
:00010000FF
:0C01000031FFFFCD3402CD2402C3040205
:00020000FE
:040200003E02CFC922
:00020400FA
:030204003E00CFEA
:00020700F7
:030207007618FD69
:00023400CA
:01023400C900
:00020A00F4
:00020A00F4
:0E020A00DDE5DD210000DD39DD7E04DD860648
:0C0218004FDD7E05DD8E076967DDE1C962
:00022400DA
:00022400DA
:00022400DA
:0D022400210200E52E01E5CD0A02F1F121D5
:030231000000C901
:00023400CA
:00000001FF


test.ihx without CRT

:00020000FE
:00020000FE
:0E020000DDE5DD210000DD39DD7E04DD860652
:0C020E004FDD7E05DD8E076967DDE1C96C
:00021A00E4
:00021A00E4
:00021A00E4
:0D021A00210200E52E01E5CD0002F1F121E9
:030227000000C90B
:00022A00D4
:00000001FF

                                          

                                          
_________________________________________________________________
Windows Live Hotmail gives you a free,exclusive  gift.
http://www.microsoft.com/windows/windowslive/hotmail_bl1/hotmail_bl1.aspx?ocid=PID23879::T:WLMTAGL:ON:WL:en-ww:WM_IMHM_7:092009
------------------------------------------------------------------------------
Join us December 9, 2009 for the Red Hat Virtual Experience,
a free event focused on virtualization and cloud computing. 
Attend in-depth sessions from your desk. Your couch. Anywhere.
http://p.sf.net/sfu/redhat-sfdev2dev
_______________________________________________
Sdcc-user mailing list
Sdcc-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/sdcc-user

Reply via email to