.ENABL LC .TITLE ASTSAV - AST Register Save/Resetore .IDENT /V00.01/ ; ;+ ; Save registers from AST and call caller back as cooroutine. ; On return, restore registers and exit AST. Some entries set ; R3 to the optional parameter (ASTQIO, ASTTIM, ASTCLI, and ; ASTSTS). ; ; Call with: JSR R5,AST??? ; ; Exit with: AST dismissed. ;- .MCALL ASTX$S .ENABL LSB ASTQIO:: ;QIO Completion ASTTIM:: ;Mark Time ASTCLI:: ;Command Arrival ASTSTS:: ;Offspring Status MOV R3,-(SP) ;Save R3 MOV 4(SP),R3 ;Get optional parameter MOV 2(SP),4(SP) ;Save R5 MOV R4,2(SP) ;Save R4 BR 1000$ ; and continue ASTPWF:: ;Power Recovery ASTRCV:: ;Receive Data ASTRRF:: ;Receive-by-Reference ASTEXI:: ;Task Exit (non-extended) MOV R4,-(SP) ;Save R4 MOV R3,-(SP) ; ... R3 1000$: MOV R2,-(SP) ; ... R2 MOV R1,-(SP) ; ... R1 MOV R0,-(SP) ; ... R0 CALL (R5) ;Call caller back ; ; Return here with by RTS PC after AST is processed. ; MOV (SP)+,R0 ;Restore R0 MOV (SP)+,R1 ; ... R1 MOV (SP)+,R2 ; ... R2 MOV (SP)+,R3 ; ... R3 MOV (SP)+,R4 ; ... R4 MOV (SP)+,R5 ; ... R5 ASTX$S ;Exit AST .DSABL LSB .END