.TITLE $NAM .IDENT /F77007/ ; ; NAM$ Fortran traceback module. Updated to check for errors. ; ; We first check before adding new module to list to see if ; the previous module caused the error condition. The check ; is then repeated on return from current module. ; ; Call by: MOV #^R,-(SP) ; MOV #^R,R4 ; JSR R4,NAM$ ; .PSECT $$OTSI NAM$:: CALL 9000$ ;Check for error MOV @#$OTSV,R3 ;Get Fortran OTS area MOV (R3)+,-(SP) ;Store current sequence # MOV (R3),-(SP) ;Store traceback backpointer MOV SP,(R3) ;Store address of traceback CLR -(R3) CALL (R4) ;Call back Fortran subroutine CALL 9000$ ;Check for error MOV @#$OTSV,R4 ;Get Fortran OTS area MOV (SP)+,2(R4) ;Recover previous module MOV (SP)+,(R4) ;Recover sequence # CMP (SP)+,(SP)+ ;Clean off module name RETURN ;Return to caller 9000$: TST FOO ;Is variable zero? BEQ 9999$ ; If EQ - yes, error RETURN ;Return to caller 9999$: TRAP <200+98.> ;Declare Fortran error 98. .PSECT BAR,RW,D,OVR,GBL . = . + 102 FOO: ;Variable FOO in common BAR .END