Chapter 9- TRAP Routines & Subroutines

0.0(0)
studied byStudied by 0 people
learnLearn
examPractice Test
spaced repetitionSpaced Repetition
heart puzzleMatch
flashcardsFlashcards
Card Sorting

1/12

encourage image

There's no tags or description

Looks like no tags are added yet.

Study Analytics
Name
Mastery
Learn
Test
Matching
Spaced

No study sessions yet.

13 Terms

1
New cards

how are subroutines different from TRAP routines

subroutines are not part of the OS

2
New cards

JSR

jumps to a location and saves current PC (address of next instruction) in R7

3
New cards

JSR diagram

knowt flashcard image
4
New cards

JSRR

just like JSR, except it uses different addressing mode

5
New cards

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

6
New cards

JSRR diagram

knowt flashcard image
7
New cards

RET

this is really a JMP R7

returns to the instruction following the JSR(R)

8
New cards

arguments

the value that is PASSED IN to a subroutine

9
New cards

return values

the value PASSED OUT of a subroutine

10
New cards

JSRR diagram

11
New cards

system call

  1. user program invokes system call

  2. operating system code performs operation

  3. returns control to the user program

this is done through TRAP mechanism

12
New cards

TRAP diagram

knowt flashcard image
13
New cards

TRAP operation

LOOKUP starting address

TRANSFER to service routine

RETURN (JMP R7)