.TITLE LExist Aleda Parameter Checker .PSECT Aleda,Gbl,Con .Dsabl GBL ;;********************************************************************** ;; Fortran callable Function to check the parameter provided to see if ;; it exists. The usage is within a Fortran program to check if a ;; parameter was provided by the calling routine. The functional value ;; is a logical of TRUE if it exists (was provided) and FALSE if not. ;; ;; Supports calls of the form: ;; Logical = LExist ( parameter in question ) ;;********************************************************************** ;; Last Modified: 27-Jul-84 DVJensen ;; ;;********************************************************************** ;; LExist:: Mov (R5),R0 ;Get the count of parms passed to LExist. Bic #177400,R0 ;Clear possible high order junk. Beq False ;If zero, no parm - this is actually an error ; but we will just return a false for now. ;; Mov #-1,R0 ;Set to return TRUE Cmp R0,2(R5) ;Does the first (presumed only) parameter exist? Bne LExit ;If not -1, then YES, it exists. False: Clr R0 ;No, return FALSE. LExit: Rts PC ;Return - Logical value is in Register 0. ;;**************************************************************************** .End