z88dk forums

z80 Development Kit

You are not logged in.

#1 2019-03-26 19:37:19

jacotton
Member
Registered: 2017-11-24
Posts: 26

Error at file 'w5100.c' line 330: symbol 'l_asr_u_hl_by_e' not defined

This popped up last night.  Real stumper until I looked as the c/asm file.

This is what  the offending line of text looks like.

Error at file 'w5100.c' line 264: symbol 'l_asr_u_hl_by_e' not defined
                   ^ ----                 cmd[2] = ((addr >> 3) & 0xe0) | 0x0c;

addr is unsigned int  and cmd is unsigned char

to fix this I added
#asm
        GLOBAL  l_asr_u_hl_by_e
#endasm

to the front of the c source file.

Here is the compile command.

zcc +cpm -O3 -vn -s -m --list -create-app --c-code-in-asm -no-cleanup -odriver -D_DHCP_DEBUG_ main.c spi.c ethernet.c w5100.c dhcp.c

Offline

 

#2 2019-03-26 21:08:59

dom
Administrator
Registered: 2007-07-15
Posts: 1446
Website

Re: Error at file 'w5100.c' line 330: symbol 'l_asr_u_hl_by_e' not defined

That's really odd, it was added in change bac837e4d0f7ea768f7d1660aecf45b788131d5e back in March 2018.

It's defined in lib/z80_crt0.hdr which is included in every compiled file so I'm really not sure why it's reporting an error unless your install is a bit wonky or there's a bad typo somewhere - can you point me to your source so I can see if I can reproduce it?

Offline

 

Board footer

Powered by PunBB
© Copyright 2002–2005 Rickard Andersson