Path: utzoo!attcan!uunet!aplcen!uakari.primate.wisc.edu!sdd.hp.com!ucsd!ucbvax!husc6!spdcc!esegue!compilers-sender From: dwg@bpdsun1.UUCP (David W. Glessner) Newsgroups: comp.compilers Subject: Re: intermetrics z80 inefficiencies Summary: HI-TECH Z80 compiler Keywords: code, z80 Message-ID: <1990Jul18.224655.6435@esegue.segue.boston.ma.us> Date: 18 Jul 90 22:46:55 GMT References: <1990Jul17.231931.513@esegue.segue.boston.ma.us> Sender: compilers-sender@esegue.segue.boston.ma.us Reply-To: dwg@bpdsun1.UUCP (David W. Glessner) Organization: Harris Broadcast Div., Quincy, IL Lines: 80 Approved: compilers@esegue.segue.boston.ma.us In article <1990Jul17.231931.513@esegue.segue.boston.ma.us> "EATON, ROBERT" writes: > I have been running shy on code space for a z80-based embedded system. >This has forced me to begin converting some of the 'C' code, compiled with >the Intermetrics z80 compiler, to assembly code to save space. Have you looked at a different compiler? Last summer, I asked about Z80 cross compilers for a Sun 3 on comp.lang.c. One person was "VERY! unhappy" with an older version of Intermetrics C for the z80 because: 1) Limited implementation of C 2) High rate of compiler errors 3) Relatively poor ROM support 4) Relatively high price Another claimed that support from Intermetrics was poor. Others suggested Microtec, SDSI, and possibly trying to port gcc. We purchased a source license to HI-TECH Z80 C and ported it to the Sun 3/60. We haven't tested the HI-TECH package extensively, but we're quite pleased so far. Following are the results after coverting some of our Z80 C code from Eco-Soft C (CP/M based) to HI-TECH (Sun based). HI-TECH Eco-Soft ROM space 36718 44831 RAM space 8272 8428 Note that ROM space includes about 8000 lines of assembly files. Here is the assembler output for a test program similar to your example. global _func global _ptr global _noptr psect text ;test.c: 1: struct { char a[25]; char friend; } noptr, *ptr; ;test.c: 2: void func(void) ;test.c: 3: { _func: push iy ;test.c: 4: if (ptr->friend == 1) ; ld iy,(_ptr) ld a,(iy+25) cp 1 jp nz,l3 ;test.c: 5: if (noptr.friend == 1) ; l3: ld a,(_noptr+25) cp 1 jp nz,l2 ;test.c: 6: } l2: pop iy ret psect bss _noptr: defs 26 _ptr: defs 2 psect text end HI-TECH's address is: HI-TECH Software P.O. Box 103, Alderley, QLD, 4051, AUSTRALIA Tel: +61 7 300 5011 Fax: +61 7 300 5246 E-mail: hitech@hitech.ht.oz.au -- David WB9VGB quintro!bpdsun1!dwg@lll-winken.llnl.gov uunet!tiamat!quintro!bpdsun1!dwg -- Send compilers articles to compilers@esegue.segue.boston.ma.us {spdcc | ima | lotus| world}!esegue. Meta-mail to compilers-request@esegue.