.title get_number_of_args - get caller's number of args .ident "V1.0-0" ;++ ; ; Functional description: ; ; ; This routine get the number of arguments passed to the routine ; whitch call it. Previous AP is found using Call Frame (pointed by FP). ; The call stack frame, described in "VAX Architecture Reference ; Manual", page 89, look like this : ; ; +-------------------------------+ ; |Condition handler (initially 0)| <---- FP ; +---+-+-+-------+-+---------+---+ ; |SPA|S|0| Mask |Z|saved PSW| 0 | ; +---+-+-+-------+-+---------+---+ ; | Saved AP | <---- Caller's AP ; +-------------------------------+ ; | Saved FP | ; +-------------------------------+ ; | Saved PC | ; +-------------------------------+ ; |Saved R0 (if specified in mask)| ; +-------------------------------+ ; |Saved R1 (if specified in mask)| ; +-------------------------------+ ; | . | ; . ; | . | ; +-------------------------------+ ; | Saved R11 (if specified) | ; +-------------------------------+ ; Here 0 to 3 bytes specified by SPA ; ; ; Calling sequence: ; ; call get_number_of_args (number_of_args) ; ; Input parameters: ; ; None ; ; Implicit inputs: ; ; Use FP to locate caller's AP value. ; ; Output parameters: ; ; Number_of_args : contains the number of args passed to the ; callers. ; Type : unsigned longword ; Access : write only ; Mechanism : by reference ; ; Implicit outputs: ; ; None ; ; Completion codes: ; ; R0 always contains SS$_NORMAL ; ; Side effects: ; ; None ; ; Modification history : ; ; V1.0-0 17-Apr-1991 Francois FOUCHET ; Initial creation ; ;-- .psect _code,exe,nowrt,shr,pic,long .entry get_number_of_args,^m<> movzwl @8(fp),@4(ap) ; Get previous AP movzwl #ss$_normal,r0 ; Set success ret ; See you .. .end