cjs
Experienced Member
Thank you very much for this! That's great, and very interesting that it completed without errors. BTW can you tell me about how long it took to run on the 2 MHz 8080? I'm guessing about 2-4 minutes?OK!
I received the CPUTEST.COM file (thanks) and I ran the program on my Altair 8800c with replica 8080 CPU board running at 2MHz with 64K RAM & CP/M.
The issue I've been experiencing is related to this. (This is from the _Intel MCS 8080/8085 User's Manual,_ which I've found to be the most accurate of the Intel manuals covering the 8080, but the description has not actually changed since the original programmer's manual.)
You'll note that it's not entirely clear about how the AC should be set, but I assumed it should be set as per subtraction. That's not actually defined in any Intel documentation I can find, but I reckoned that if the low nybble of the result is $F, that would indicate that it had previously been 0 and thus a borrow would have been necessary. That fails the test for DCR that this program does on a certain value (it doesn't say what that value is) with the half-carry coming out as 0 when it is expected to be 1. I tried just hardcoding the DCR half-carry to 1, but while that doesn't print any failures, it also seems to put the program in an infinite loop.
I'm open to any thoughts on what might be going wrong here. Perhaps the half carry should be calculated as if an add had been done, rather than a subtract, since the 8080 only supports DAA for adds?