.TITLE HELP_RELAY Relay call to LBR$OUTPUT_HELP .IDENT /V1.0A/ ; STATUS = HELP_RELAY(LINE, LIBRARY, FLAGS) ; Relays a call from Datatrieve to the LBR$OUTPUT_HELP routine. ; Needed because we can't specify an address or literal ; in DTRFND.MAR and don't know the internal routine names ; B. Z. Lederman ; The following definition (without the ";! " in front of each line ; will define the DTRFND.MAR call to this routine. ;! ; FN$HELP - Get Help from a Library ;! ; B. Z. Lederman ;! ; ;! ; Input: text containing a help string (may be a null string) ;! ; help library name (may be null, but no help will come back) ;! ; formatting flags (normally 0 or 1 or 31 decimal) ;! ; ;! ; Output: system outputs text directly to terminal. ;! ; ;! ; Must call a relay program because we can't put constants or ;! ; addresses as inputs to called functions here. ;! ;! $DTR$FUN_DEF FN$HELP, HELP_RELAY, 3 ;! $DTR$FUN_EDIT_STRING ^\T(80)\ ;! $DTR$FUN_HEADER HDR = <> ;! $DTR$FUN_NOOPTIMIZE ;! $DTR$FUN_NOVALUE ;! $DTR$FUN_OUT_ARG TYPE = FUN$K_STATUS ;! $DTR$FUN_IN_ARG TYPE = FUN$K_DESC, DTYPE = DSC$K_DTYPE_T, ORDER = 1 ;! $DTR$FUN_IN_ARG TYPE = FUN$K_DESC, DTYPE = DSC$K_DTYPE_T, ORDER = 2 ;! $DTR$FUN_IN_ARG TYPE = FUN$K_REF, DTYPE = DSC$K_DTYPE_LU, ORDER = 3 ;! $DTR$FUN_END_DEF .PSECT $PDATA,LONG,PIC,USR,CON,REL,LCL,SHR,NOEXE,RD,NOWRT,NOVEC ZERO_WIDTH: .LONG 0 ; Width of zero defaults to 80 .PSECT $CODE,PIC,USR,CON,REL,LCL,SHR,EXE,RD,NOWRT,NOVEC,LONG ; Offsets on AP to arguments LINE_DESC = 4 ; Help Line passed LIBR_DESC = 8 ; Library specification passed FLAGS_IN = 12 ; flags passed .ENTRY HELP_RELAY, ^M ; We won't check arguments because DTR has checked them before ; passing them to us. PUSHAW G^LIB$GET_INPUT ; use system for prompting PUSHL FLAGS_IN(AP) ; flags from caller PUSHL LIBR_DESC(AP) ; library_name from caller PUSHL LINE_DESC(AP) ; input line from caller PUSHAL ZERO_WIDTH ; default output width (80) PUSHAW G^LIB$PUT_OUTPUT ; use system for output CALLS #6, G^LBR$OUTPUT_HELP ; call system routine ; Status is returned in R0. We pass that back unchanged to our caller. RET .END