You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In this version of LC-3 handbook, PC is saved using R7. However, according to the appendix of the latest textbook, the incremented PC is directly pushed onto the system stack. TRAP should do this instead:
TEMP = PSR;
if (PSR[15] == 1)
Saved_USP = R6 and R6 = Saved_SSP
PSR[15] = 0
Push TEMP.PC on the system stack
PC = mem[ZEXT(trapvect8)];
TRAP routines seem to modify
R7
to the incremented PC, causingR7
to be changed unexpectedly.The text was updated successfully, but these errors were encountered: