SVC 3 is a SVC entry to the exit routine. The current RB at the time the SVC 3 is issued will be terminated. If no RB’s remain for the TCB the TCB will be terminated. This SVC is entered with interrupts disabled. On entry R4 points to the current TCB and R5 points to the current RB which will be the RB created for the SVC 3 interrupt – not the RB that was active when the SVC was issued. The SVC routine needs to remove the current RB so the Exit Routine will terminate the RB that issued the SVC call.
000000 12 S003EXIT CSECT , 000000 18CF 13 LR R12,R15 ESTABLISH 00000 14 USING S003EXIT,R12 BASE REGISTER 15 * 00000 16 USING @TCB,R4 00000 17 USING @RB,R5 000002 1825 22 LR R2,R5 COPY CURRENT RB ADDRESS 000004 5850 5000 00000 23 L R5,RBNEXT NEXT RB ON CHAIN 000008 5050 4008 00008 24 ST R5,TCBRB UNCHAIN CURRENT RB 25 * 00000C 4110 0050 00050 26 LA R1,RBLEN LENGTH OF RB 000010 BF18 C030 00030 27 ICM R1,B'1000',=AL1(128) SP=128 000014 1802 28 LR R0,R2 RB ADDRESS 000016 58F0 0014 00014 29 L R15,20 POINT TO MVT 00001A 58F0 F01C 0001C 30 L R15,MVTFMAIN-@MVT(,R15) FREEMAIN BRANCH ENTRY 00001E 05EF 31 BALR R14,R15 32 * 000020 58F0 0014 00014 33 L R15,20 POINT TO MVT 000024 58F0 F024 00024 34 L R15,MVTEXIT-@MVT(,R15) EXIT ROUTINE 000028 07FF 35 BR R15
[Next – Wait / Post Overview]