1 SUB M11SCD (SCREEN%) & 2 !******************************************************************** & ! & ! & ! M11SCD & ! & ! Displays a predefined text display on the CRT terminal & ! & ! & !******************************************************************** & ! 3 ! Subprogram : M11SCD & ! Version : 00 29-DEC-81 & ! Programmer : John Montrym & ! Releaser : & ! & ! & ! 11 !-------------------------------------------------------------------- & ! & ! & ! C O P Y R I G H T & ! & ! & ! & ! (C) Copyright 1981 & ! Digital Equipment Corporation, Maynard, Massachusetts & ! & ! This software is furnished under a license for use only & ! on a single computer system and may be copied only with & ! the inclusion of the above copyright notice. This & ! software, or any other copies thereof, may not be pro- & ! vided or otherwise made available to any other person & ! except for use of such system and to one who agrees to & ! these license terms. Title to and ownership of the & ! software shall at all times remain in DIGITAL. & ! & ! The information in this software is subject to change & ! without notice and should not be construed as a commit- & ! ment by Digital Equipment Corporation. & ! & ! DIGITAL assumes no responsibility for the use or relia- & ! bility of its software on equipment that is not sup- & ! plied by DIGITAL. & ! & ! & !-------------------------------------------------------------------- 100 ! & ! Summary & ! & ! & ! Description & ! & ! & ! This subprogram reads 3 records from the Smart Mailer & ! Screen File starting at record number SCREEN%, and displays & ! them on the user's terminal. It clears the screen before & ! displaying any information. The necessary characters should be & ! part of the Screen File text to properly position the text. & ! & ! Calling modules: Any module which needs to display a screen & ! & !-------------------------------------------------------------------- 200 ! & ! & ! Interfaces & ! & ! Common areas: & ! & ! COMERR - Error conditions variables & ! COMCON - General system constants & ! & ! & ! Arguments: & ! & ! SCREEN% input number of the first record of the screen & ! within the Screen File & ! & !--------------------------------------------------------------------- 300 ! & ! & ! Input / Output & ! & ! & ! Channel Filename Map name Status at entry/exit & ! ------- --------- -------- -------------------- & ! CH.KB% User keyboard None Open/Open & ! CH.SCR% Screen file None Open/Open & ! 350 !-------------------------------------------------------------------- & ! & ! & ! DATA Statements & ! & ! & !-------------------------------------------------------------------- 400 !-------------------------------------------------------------------- & ! & ! Variable and Array Definitions & ! & ! & ! & ! ERL Line in which error occurred & ! ERR Set to error number after error & ! & ! 600 !-------------------------------------------------------------------- & ! & ! & ! COMMON Declarations & ! & ! & !-------------------------------------------------------------------- 650 !-------------------------------------------------------------------- & ! & ! & ! MAP Statements & ! & ! & !--------------------------------------------------------------------- 700 ! & ! & ! Subprograms & ! & ! & ! none & ! & !-------------------------------------------------------------------- & ! 800 ! Subroutines & ! & ! none & ! & !-------------------------------------------------------------------- & ! & ! Functions & ! & ! none & ! 900 !-------------------------------------------------------------------- & ! & ! & ! DIMENSION Declarations & ! & ! & !-------------------------------------------------------------------- & 1000 !******************************************************************** & ! & ! & ! S T A R T S U B P R O G R A M L O G I C & ! & ! & !******************************************************************** & 1010 ON ERROR GOTO 19000 & \ ERR.SUBNAM$ = "M11SCD VER:00" & ! Set standard error trap. Set up COMMON for error reporting. & 1020 NO.RECS% = 3% & ! Set up program constants. & 1040 PRINT #CH.KB%, HOME.UP$ + ERASE.EOS$; & ! Clear screen. & 1050 FOR I% = SCREEN% TO SCREEN% + NO.RECS% - 1% & 1080 GET #CH.SCR%, RECORD I% & ! Try to get the record. & 1100 MOVE FROM #CH.SCR%, HELP.TEXT$ = RECOUNT & \ LEN.HELP% = RECOUNT & \ GO TO 1120 IF ASCII (SEG$ (HELP.TEXT$, N%, N%)) > 0% & FOR N% = LEN.HELP% TO 1% STEP -1% & ! Bring in a screen record, then find last non-null character. & 1120 HELP.TEXT$ = SEG$ (HELP.TEXT$, 1%, N%) & \ SLEN% = LEN (HELP.TEXT$) & \ WHILE SLEN% > 0% & \ A$ = SEG$ (HELP.TEXT$, 1%, 128%) & \ MOVE TO #CH.KB%, A$ & \ PLEN% = LEN (A$) & \ PUT #CH.KB%, RECORD 4096%, COUNT PLEN% & \ HELP.TEXT$ = SEG$ (HELP.TEXT$, 129%, SLEN%) & \ SLEN% = LEN (HELP.TEXT$) & \ NEXT & ! Throw away the trailing nulls in the 3-record screen. & ! Print the screen text in 128 byte sections from wherever & ! the cursor may be. 'RECORD 4096' means escapes appear & ! as escapes -- not dollar signs. & 1150 GO TO 9000 IF N% < LEN.HELP% & \ NEXT I% & ! If we've already found a null, we're done; otherwise & ! Loop until all are printed. & & 9000 !*************************************************************** & ! & ! & ! E N D O F P R O C E S S I N G & ! & ! & !*************************************************************** & 9900 ERR.SUBNAM$ = "" & \ GOTO 32767 & ! Go to the end of the subprogram. & 19000 !*************************************************************** & ! & ! & ! S T A N D A R D E R R O R H A N D L I N G & ! & ! & !*************************************************************** & 19800 ERR.MSG$ = "Unexpected fatal error." & \ ERR.MSG$ = "Problem reading from the screen file." IF ERL = 1080 & ! Handle anticipated errors. & 19900 ERR.CODE% = FATAL.ERROR% & \ ERR.ERL% = ERL & \ ERR.ERR% = ERR & \ ON ERROR GO BACK & ! On a fatal error, set the error code, & ! then resume at the end of the program. & 32767 END SUB