-
Notifications
You must be signed in to change notification settings - Fork 74
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Incorrect branch instruction in report.i65 for converting hex characters #20
Comments
Remember, that in the 6502 world borrow = -carry (borrow is the complement of carry). Besides the routine has worked for many users for thousands of times now. |
wow my bad, you were right of course :) I apologize for that. I come from a 6809 background so that borrow inversion tricked me. I am pretty close to having a successful test but I seem to be stuck in the "tadd" loop which keeps calling "chkadd" over and over and doesn't throw a trap as usual. any tips on what might be wrong? theres alot of nested increments/decrements so i can't quite figure out what the test it trying to do. |
The loop at "tadd" iterates through all possible operands for an add instruction and calls "chkadd" twice, first with C clear and second with C set. This is 256 * 256 *2 iterations and may take a long time. "tadd" exits when "inc ad2" overflows to 0 again. So the best approach is to find the operands "ad1" and "ad2" in memory and see, wether they increment and wether "ad2" actually gets back to 0 to stop the loop. |
yes! that was it exactly. I started to monitor ad2 and saw how slowly it was incrementing, so I let it run. took about 30 mins to complete, but when it did, my emulator passed all your tests! (I am emulating a 6502 on a 6309 CPU (another 8-bit cpu with a larger instruction set) so I expected it wouldn't be the fastest in the world :) your tool was super useful, thanks alot for making it! |
Hi, I really like your 6502 testing suite but I found an error in report.i65 that converts values to hexadecimal characters for IO debugging output:
Line 189: bcc rchar
This line in the "rnib" subroutine should actually be a BCS instead. Thanks :)
The text was updated successfully, but these errors were encountered: