Hello everyone,
I'm new to programming the 6502 (and the NES) and need to know the best way to obtain the modulus of a given (unknown) number and 80 and 81 (X%80 and X%81). Right now I'm using an 8bit / 8bit division routine I found in an old text book. Seemed to me the only way to obtain the mod for those off numbers (80 and 81).
So, I'm asking, does anyone have a clever solution to doing this other then using a normal 8bit / 8bit subroutine (it is still a good bit of instructions).
Thank you in advance. And thanks for keeping this site up. I wouldn't be working on an NES game without it.
I'm new to programming the 6502 (and the NES) and need to know the best way to obtain the modulus of a given (unknown) number and 80 and 81 (X%80 and X%81). Right now I'm using an 8bit / 8bit division routine I found in an old text book. Seemed to me the only way to obtain the mod for those off numbers (80 and 81).
So, I'm asking, does anyone have a clever solution to doing this other then using a normal 8bit / 8bit subroutine (it is still a good bit of instructions).
Thank you in advance. And thanks for keeping this site up. I wouldn't be working on an NES game without it.