.title HELP Help module for IAF .ident /V1.02/ .sbttl Documentation ; ; This is the IAF subroutine that implements the ; HELP command ; ; Eric F. Richards ; 2-Apr-87 ; Gould OSD VAXcluster VAX/VMS V4.5 ; ; .sbttl Macros, constants, and other rot .enable suppression ; clean up the listing file .disable traceback, debug ; hands off with the debugger .macro clrsp space, fill=#0 ; macro for clearing space subl space, sp ; on stack for a data area. movc5 #0, (sp), fill, - ; data area is init'd to space, (sp) ; nulls by this macro .endm clrsp ; that's it! bufsiz = 132 ; size of internal character buffer .psect $code, long, exe, pic, shr, nowrt .sbttl HELP code .page ; ; This subroutine looks up the HELP information ; .entry help, ^m clrsp #bufsiz ; clear buffer for commadn line pushl sp ; build descriptor for it pushl #bufsiz ; ...length for descriptor movl sp, r5 ; save a pointer to the descr pushal topic ; build a descriptor for the pushl s^#topic_len ; ...topic label movl sp, r4 ; save a pointer to that one, too pushal libname ; build a descriptor for the lib name pushl #libname_len ; ...for the help to reference movl sp, r3 ; save a pointer to that desc, too! pushl r5 ; get the help topic to look up pushl r5 ; ...and write it (truncated) here pushl r4 ; ...label is TOPIC calls #3, g^cli$get_value ; get the value blbs r0, 10$ ; on success skip the error handler clrl (r5) ; set the descr length to 0 10$: pushal w^get_input ; call the help routine -- input here pushl #0 ; use default flags, too pushl r3 ; help library name pushl r5 ; parameter line to give it pushl #0 ; use default terminal width pushal w^put_output ; write the output with this calls #6, g^lbr$output_help ; go into help ret ; go back to caller .sbttl Data areas for HELP code .page .psect $pdata, long, noexe, nowrt, pic, shr topic: .ascii /TOPIC/ ; label for HELP topics topic_len = . - topic ; length .end ; that's it!