Home »
Digital Archaeology »
Computer Arcana »
Commodore »
Commodore 8-bit »
Ceiling/Floored Modulus in cc65?
Ceiling/Floored Modulus in cc65? [message #359652] |
Tue, 26 December 2017 05:39 |
Harry Potter
Messages: 1304 Registered: March 2012
Karma: 0
|
Senior Member |
|
|
I am a little confused about the difference between ceilinged and floored divide/modulus: which handles negative divisors returning negative of absolute remainders and which returns reverse-order positive remainders. I am looking for the latter in a cc65 C program. If I'm not making myself clear, let's say I'm dividing -2 by 3. I want the remainder to 1, not -2. How do I do that? C seems to by default give -2 as the remainder. I also want a vocabulary check as mentioned.
BTW, this is for compression software.
|
|
|
Goto Forum:
Current Time: Mon May 13 17:07:27 EDT 2024
Total time taken to generate the page: 0.06564 seconds