jayacotton / inettools-z80

Inet tools for z80-rc2014 tcp/ip stack code.
MIT License
17 stars 2 forks source link

Just noticed that the year is wrong #14

Closed jayacotton closed 4 years ago

jayacotton commented 4 years ago

In date, and today the year number is wrong. It was working, not need to diff code and find what got changed.

Murks08 commented 4 years ago

Hi Jay so at first glance I can not discover where the problem is. It is not due to DATE.COM. The time / date fetched with an old NTP is displayed correctly. I would guess that it is a subfunction of NTP ... But you will have found out yourself. What I still lack for the complete "Make" is the "telnetd.h" file. Can you give me information about this? Gerd

Murks08 commented 4 years ago

I noticed a change that has nothing to do with the current problem, but that still irritates me (the code is also not translated because of the #ifdef NOTNOW): In the spi.c file, the HL register is (_l_buffer) and A loaded with (_l_len). I suspect that HL should point to the buffer and A indicates the length. I would have guessed that the parentheses would have to be removed here - but I would like to be instructed otherwise. Gerd

asm

ld  c,_shift_rdtr 
ld  hl,(_l_buffer)
ld  a,(_l_len)
ld  b,a
inir

endasm

Murks08 commented 4 years ago

How does the "--O3" option come about? And are the other reported errors only consequential errors? Or is the error in front of my screen?

make ntp zcc +cpm -O3 --list --c-code-in-asm -c w5500.c zcc +cpm -O3 --list --c-code-in-asm -c dhcp.c zcc +cpm -O3 --list --c-code-in-asm -c spi.c zcc +cpm -O3 --list --c-code-in-asm -c socket.c zcc +cpm -O3 --list --c-code-in-asm -c ethernet.c zcc +cpm -O3 --list --c-code-in-asm -c dns.c zcc +cpm -O3 --list --c-code-in-asm -c wizchip_conf.c zcc +cpm -O3 --list --c-code-in-asm -c sysface.c zcc +cpm -create-app --O3 --list --c-code-in-asm -ontp ntp.c w5500.o dhcp.o spi.o socket.o ethernet.o dns.o wizchip_conf.o sysface.o Unknown option --O3 sccz80:"ntp.c" L:338 Warning:Implicit definition of function 'localtime' it will return an int. Prototype it explicitly if this is not what you want. [-Wimplicit-function-definition] sccz80:"ntp.c" L:338 Warning:Assigning 'tp', type: struct tm *tp from int [-Wincompatible-pointer-types] sccz80:"ntp.c" L:339 Error:Unknown member: 'tm_year' of struct 'tm' sccz80:"ntp.c" L:339 Error:Expected ';' sccz80:"ntp.c" L:340 Error:Unknown member: 'tm_mon' of struct 'tm' sccz80:"ntp.c" L:340 Error:Expected ';' sccz80:"ntp.c" L:342 Error:Missing token, expecting ) got t sccz80:"ntp.c" L:342 Error:Too few arguments to call to function 'set_via_romwbw' sccz80:"ntp.c" L:341 Error:Unknown member: 'tm_sec' of struct 'tm' sccz80:"ntp.c" L:342 Error:Unexpected end of file sccz80:"ntp.c" L:342 Error:Unexpected end of file sccz80:"ntp.c" L:342 Error:Unexpected end of file

Maximum (10) number of errors reached, aborting! Compilation aborted Makefile:65: recipe for target 'ntp' failed make: *** [ntp] Error 1

jayacotton commented 4 years ago

I checked in fixes for the year bug. I did a test pull and found the same error.
I think I will close this bug, and open a new one for the build issues.