The user-supplied output routine, which is named OUTSUB in the above example call to HLP_HELP but can have any name, is an integer function subprogram which accepts one argument, the string to be output, and returns a status of +1 if OK. The output routine is responsible for knowing where to write the information, how to handle pagination, and so on.
The HLP package contains a simple example of an output routine. It is called HLP_OUTSUB and is the one used in the TSTHLP demonstration program.
Note that there is no obligation for applications simply to display the lines of text retrieved by the help system. For example, information could be encoded into the help text which allows the application to plot graphs, log usage information, change the display colour etc.