Skip to content

Commit

Permalink
Fix address computation overlow.
Browse files Browse the repository at this point in the history
  • Loading branch information
charlesUnixPro committed Jun 8, 2024
1 parent c6b9402 commit 9fb4ca0
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion Ibm1130/ibm1130_cpu.c
Original file line number Diff line number Diff line change
Expand Up @@ -653,7 +653,7 @@ t_stat sim_instr (void)

eaddr = word2; /* assume standard addressing & compute effective address */
if (TAG) /* if indexed */
eaddr += ReadIndex(TAG); /* add index register value */
eaddr = (eaddr + ReadIndex(TAG)) & 0xFFFF; /* add index register value */
if (INDIR) /* if indirect addressing */
eaddr = ReadW(eaddr); /* pick up referenced address */

Expand Down

0 comments on commit 9fb4ca0

Please sign in to comment.