home *** CD-ROM | disk | FTP | other *** search
- ^ register names
- R0 EQU 0
- R1 EQU 1
- R2 EQU 2
- R3 EQU 3
- R4 EQU 4
- R5 EQU 5
- R6 EQU 6
- R7 EQU 7
- R8 EQU 8
- R9 EQU 9
- R10 EQU 10
- R11 EQU 11
- R12 EQU 12
- R13 EQU 13
- R14 EQU 14
- R15 EQU 15
- ^ SVC operations
- DMPSYS EQU 1
- FORK EQU 2
- WAIT EQU 3
- GETSEM EQU 4
- P EQU 5
- V EQU 6
- KILL EQU 7
- ^
- ^ This program checks to see that
- ^ code is shared properly.
- ^
- MAPPED
- ENTRY START
- START SVC R0,,0,GETSEM
- SVC R1,,0,GETSEM
- SVC R2,,0,GETSEM
- SVC R3,,0,GETSEM
- ^
- ^ First check to see that code
- ^ pages are shared among siblings.
- ^
- SVC R4,,SUB1,FORK
- SVC R5,,SUB2,FORK
- SVC R0,,,V
- SVC R2,,,P
- SVC ,,,DMPSYS
- SVC R3,,,V
- SVC R3,,,V
- SVC ,,,WAIT
- ^
- ^ Now check to see that code pages
- ^ are shared properly between parents
- ^ and offspring.
- ^
- SVC R4,,SUB3,FORK
- SVC R0,,,P
- BRSUBR R15,,PAGE7
- SVC ,,,DMPSYS
- SVC R3,,,V
- SVC ,,,WAIT
- ^
- ^ Program should now terminate
- ^ with a HALT at octal location 44.
- ^
- HALT
- ^
- ^ Process SUB1 and SUB2 both
- ^ access virtual page 5. Semaphores
- ^ are used to see that the accesses
- ^ occur in a particular order.
- ^
- ^
- SUB1 SVC R0,,,P
- BRSUBR R15,,PAGE5
- SVC R1,,,V
- SVC R3,,,P
- HALT
- ^
- SUB2 SVC R1,,,P
- BRSUBR R15,,PAGE5
- SVC R2,,,V
- SVC R3,,,P
- HALT
- ^
- ^
- ^ The main process and subprocess
- ^ SUB4 both access virtuyal page 7.
- ^
- ^
- SUB3 SVC R4,,SUB4,FORK
- SVC ,,,WAIT
- HALT
- ^
- SUB4 BRSUBR R15,,PAGE7
- SVC R0,,,V
- SVC R3,,,P
- HALT
- ^
- ^
- SETPC 240b
- PAGE5 BR ,R15
- ^
- SETPC 340b
- PAGE7 BR ,R15
-