.TITLE FCSCAL .IDENT /V02/ .DSABL GBL .LIST MEB .ENABL LC ;+ ; FCSCAL allows C programs to call FCS routines and other ; routines which are passed one or two arguments in R0 and R1. ; Its first argument is the address of the FCS routine to be called, ; the second, a value to be placed in R0 (probably an fdb), ; and the third, a value to be placed in R1 (probably an FNB or UIC). ; If there is no third argument, no harm is done; whatever is in ; 10(R5) will be placed in R1. ; ; The FCS routine will be called and FCSCAL will return 1 or 0 ; (YES or NO), depending on the carry bit when the FCS routine returns. ;- .GLOBL FCSCAL .GLOBL .SAVR1 .PSECT C$TEXT FCSCAL: JSR R5,.SAVR1 ;STACK UP .SAVR1, R1-R5 OVER RETURN TO CALLER MOV 20(SP),R0 ;GET R0 FOR CALL MOV 22(SP),R1 ;GET R1 (HARMLESS IF NOT SPECIFIED) CALL @16(SP) ;CALL FCS ROUTINE MOV #1,R0 ;RETURN VALUE = 1 (YES) SBC R0 ;OR 0 (NO) IF CARRY SET RETURN ;REGISTERS WILL BE RESTORED .END