1/12
Looks like no tags are added yet.
Name | Mastery | Learn | Test | Matching | Spaced |
---|
No study sessions yet.
how are subroutines different from TRAP routines
subroutines are not part of the OS
JSR
jumps to a location and saves current PC (address of next instruction) in R7
JSR diagram
JSRR
just like JSR, except it uses different addressing mode
difference between JSR and JSRR
JSRR uses the contents a register as the address to jump to (16 bits), while JSR instruction provides an 11 bit offset to PC
JSRR diagram
RET
this is really a JMP R7
returns to the instruction following the JSR(R)
arguments
the value that is PASSED IN to a subroutine
return values
the value PASSED OUT of a subroutine
JSRR diagram
system call
user program invokes system call
operating system code performs operation
returns control to the user program
this is done through TRAP mechanism
TRAP diagram
TRAP operation
LOOKUP starting address
TRANSFER to service routine
RETURN (JMP R7)