Wayne
Beautiful! That is exactly as expected -- and the emulator is the same.
I fixed the CHSF thing -- thanks for the report. An idiot blind oversight
on my part. Now, I wonder what op 0x1b is? puzzled. The behaviour
of 00010100 matches the chip as well.
During this project, I have found two serious bugs in HI-TECH C 3.09:
long = (unsigned char);
long = (long << 8) | (unsigned char);
long = (long << 8) | (unsigned char);
long = (long << 8) | (unsigned char);
is borked: Work around is
int = (unsigned char)
long = int
int = (unsigned char)
long = long << 8
long = long | int
int = (unsigned char)
long = long << 8
long = long | int
int = (unsigned char)
long = long << 8
long = long | int
The OTHER bug I haven't completely isolated/fixed -- and it is a doozy.
It shows up in test6() -- crash under HI-TECH C, works fine under GCC
The
testhw14.com (test1 through test4) and
testhw58.com should work
on-chip, and test most features (no advanced functions). I have grated
the am9511 into zxcc (see
howto.com) and put am9511.bas on as a test
in MBASIC that can use chip, or emulator. Due to the Hi-TECH iissue,
test58.com doesn't work (it works when compiled with gcc and run)
Thank you for rescuing your AM9511 chip! Your help on this project is
very appreciated. My plan is to continue use MBASIC to create a test harness
that can run on chip or on emulator. I have tied emulator into zxcc
(the emulator that allow HI-TECH C to be used on linux). I will tie
am9511 into RunCPM next. I want to also run down that HI-TECH bug,
and get a work-around (so far, not optimizer related, but the optimizer
causes a DIFFERENT crash, and, putting in printf() makes it go away!
This needs DDT). My direct email is fred(underscore)weigel(at)hotmail(dot)com
Fred Weigel