Skip to content
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

Bad comment in RTC-checking code #1059

Open
aaaaaa123456789 opened this issue Jul 21, 2023 · 3 comments · May be fixed by #1072
Open

Bad comment in RTC-checking code #1059

aaaaaa123456789 opened this issue Jul 21, 2023 · 3 comments · May be fixed by #1072
Assignees
Labels

Comments

@aaaaaa123456789
Copy link
Contributor

and %10000000 ; Day count exceeded 16383

This code here checks for the RTC overflow bit, which gets set when the RTC day count exceeds 512. However, since it is bit 6 of the control register, which also contains the upper portion of the day count, someone accidentally documented it as an actual check for $4000. (In actuality, bits 1-5 of that register are unmapped.)

This should just say it is checking whether the RTC overflow bit is set.

@mid-kid
Copy link
Member

mid-kid commented Jul 21, 2023

please consider making a PR instead
also, the RTC overflow bit may want to be defined in constants/hardware_constants.asm

@aaaaaa123456789
Copy link
Contributor Author

aaaaaa123456789 commented Jul 21, 2023

please consider making a PR instead

This is my "I don't want to fork the repo while I'm doing 200 other things, but I don't want to forget about the issue" contribution :P

By the way, if you're going to define bit 6 for overflow, you might also want to define bit 7 for on/off.

@mid-kid
Copy link
Member

mid-kid commented Jul 21, 2023

I don't want to fork the repo while I'm doing 200 other things

Maybe you'll find some use in the Github CLI. I find that the git clone → make changes → git commitgh pr create workflow is quite comfortable, it even forks the repo for you. It's so good that I literally only use gh for that command.
Alternatively, sometimes the web interface works for simple things.

@aaaaaa123456789 aaaaaa123456789 linked a pull request Aug 16, 2023 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants