First, I will handle questions on the assignment. Perhaps, it would
be best to use the class time for lab time.
This is how I solve these sorts of low-level programming problems. I find
this methodology very useful:
- Solve the problem at a high level.
- Determine the key code fragments. In this case they were:
- Masking and testing an msb or lsb.
- 64-bit shift.
- 64-bit add.
- Binary input.
- Binary output.
- For each of the key fragments, I write individual SAL programs to
try-out and debug my SAL code.
- Assemble and combine the pieces into the final program.
This is much more time effective than writing a big, monolithic program and
trying to debug it as a whole. It's much easier to debug it in these small
pieces.