mirror of
https://github.com/rcornwell/sims.git
synced 2026-02-08 09:11:45 +00:00
KA10: Cleanup sblk count handling.
This commit is contained in:
@@ -385,14 +385,16 @@ t_stat load_sblk (FILE *fileref)
|
||||
and then comes the data. Last is a checksum word. */
|
||||
while (get_evac (fileref, &word) == 0 && (word & SMASK)) {
|
||||
check = word;
|
||||
count = (int)((((word >> 18) ^ RMASK) + 1) & RMASK);
|
||||
count = (word >> 18) & RMASK;
|
||||
addr = word & RMASK;
|
||||
while (count-- > 0) {
|
||||
while (count != 0) {
|
||||
if (get_evac (fileref, &word))
|
||||
return SCPE_FMT;
|
||||
M[addr++] = word;
|
||||
check = (check << 1) + (check >> 35) + word;
|
||||
check &= FMASK;
|
||||
count++;
|
||||
count &= RMASK;
|
||||
}
|
||||
if (get_evac (fileref, &word))
|
||||
return SCPE_FMT;
|
||||
|
||||
Reference in New Issue
Block a user