.title is_arg_defined - test if a parameter is defined .ident "V1.0-0" ;++ ; ; Functional description: ; ; This routine test the definition of an argument passed to the ; routine witch call it. Previous AP is found using Call Frame ; (pointed by FP). To be defined, an argument must : ; 1) be present in the parameter list (argument number <= number ; of arguments passed to the routine). ; 2) have a non null value in the parameter list. ; ; Calling sequence: ; ; status = is_arg_defined (arg_number) ; ; Input parameters: ; ; Arg_number : contains the argument number to test ; Type : unsigned longword ; Access : read only ; Mechanism : by value ; ; Implicit inputs: ; ; Use FP to locate caller's AP value. ; Read argument list. ; ; Output parameters: ; ; None ; ; Implicit outputs: ; ; None ; ; Completion codes: ; ; R0 can be : ; ss$_wasset if the parameter is defined ; ss$_wasclr if the parameter is not defined ; ; Side effects: ; ; None ; ; Modification history : ; ; V1.0-0 07-May-1991 Francois FOUCHET ; Initial creation ; ;-- .psect _code,exe,nowrt,shr,pic,long .entry is_arg_defined,^m<> movl 8(fp),r0 ; Get previous AP movzbl 4(ap),r1 ; Get arg # beql 10$ ; Arg # is zero cmpb r1,(r0) ; Is arg in arg list ? bgtru 10$ ; No tstl (r0)[r1] ; Is arg defined ? beql 10$ ; No movzwl #ss$_wasset,r0 ; Set success ret ; See you .. 10$: movzwl #ss$_wasclr,r0 ; Parameter not defined ret ; See you .. .end