A very specific problem here ... and no, this is not homework (far away ... far behind). Basically I need to calculate the checksum for writing EPROM and Id code in order to write this function in the Ada program in order to practice manipulating my bits in the language.
The section of the firmware data file for EPROM changes me, and this change requires a new valid checksum at the end, so that the resulting system accepts the changed code. This checksum starts with modulo 256 executing a binary sum of all the data it covers, and then other higher-level operations are performed to get a checksum that I will not enter.
So, how do I make a binary addition by type of mod?
I suggested that if I use the "+" operator for a mod type, it will be summed up as an integer value operation ... I don’t want the result. Im really stalled on this. I don’t really want to make a packed array and perform bit wrapping if I don’t need it, especially if it is considered an “old hat”. Im reading links claim that you need to use mod types to provide more portable code when working with binary operations. I'd like to try if possible. I am trying to target multiple platforms using this program, so portability is what I am looking for.
Can anyone suggest how I can do binary add by type of mod?
Any starting places in this language will be very useful.
source share