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

Post Reply
jacotton
Member
Posts: 26
Joined: Fri Nov 24, 2017 1:35 am

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

Post by jacotton »

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
User avatar
dom
Well known member
Posts: 1194
Joined: Sun Jul 15, 2007 10:01 pm

Post by dom »

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?
Post Reply