.TITLE VTLSCR - VTL VT100 Screen Formatting .IDENT /1.4/ .ENABL LC ;+ ; ; Free software BY ; Project Software & Development, Inc. ; ; This software is furnished for free and may be used and copied as ; desired. This software or any other copies thereof may be provided or ; otherwise made available to any other person. No title to and ; ownership of the software is hereby transferred or allowed. ; ; The information in this software is subject to change without notice ; and should not be construed as a commitment by PROJECT SOFTWARE ; AND DEVELOPMENT, INC. ; ; PROJECT SOFTWARE assumes no responsibility for the use or reliability ; of this software on any equipment whatsoever. ; ; Project Software & Development, Inc. ; 14 Story St. ; Cambridge, Ma. 02138 ; 617-661-1444 ; ; ; Title: VTLSCR.MAC ; Author: Robin Miller ; Date: June 30, 1983 ; ; Description: ; ; These routines do the screen formatting for the VT100. ; ;- .ENABL AMA .NLIST BEX ;+ ; ; Modification History: ; ; June 13, 1984 by Robin Miller. Edit (03), Version 1.4 ; Call MOVEF routine to copy and format the search string in ; the WRT4MS routine. ; ; June 6, 1984 by Robin Miller. Version 1.3 ; Add routine WRTWRK to display the working message. ; ; June 4, 1984 by Robin Miller. Edit (02), Version 1.2 ; Add routine WRT4MS to format and display four strings. ; ; May 23, 1984 by Robin Miller. Edit (01), Version 1.1 ; Home the cursor before changing column modes and before setting ; the scrolling region to avoid bugs in the VT100 terminal. ; ;- ; Local equates: MSLINE = 23. ; The message line number. PRLINE = MSLINE+1 ; The prompt line number. LNBIAS = 10. ; The line bias for no AVO. HORLIN = 161 ; Horizontal line (q). ; Local messages: ACTM: .ASCIZ "Active" ACTS = <.-ACTM>-1 ; Size of active message. WORKM: .ASCIZ "Working ... record " WORKS = <.-WORKM>-1 ; Size of working message. .EVEN .SBTTL CLRMSG - Position/clear the message line. ;+ ; ; CLRMSG - Position/clear the error message line. ; CPYMSG - Copy the position/clear sequence (don't display). ; SETMSG - Same as CPYMSG except the REVERSE attribute is added. ; SET2MS - Same as SETMSG except BOLD and second string is added. ; TYPMSG - Entry point to finish buffer and write the message. ; WRTMSG - Same as SETMSG except append and display the message. ; WRT2MS - Same as WRTMSG except a second message is appended. ; WRT4MS - Same as WRT2MS except four strings are displayed. ; ; The message line is either line 23 or line 13 depending on whether the ; terminal has the AVO or not. If the VT100 doesn't have the AVO, and ; we're in 132 column mode, only 14 lines can be displayed at one time. ; ; Inputs: ; R0 = The output buffer address (entry at CPYMSG/SETMSG/TYPMSG). ; R1 = The message string address (entry at WRTMSG). ; R2 = The second string address (entry at WRT2MS). ; R3 = The third string address (entry at WRT4MS). ; R4 = The fourth string address (entry at WRT4MS). ; ; Outputs: ; R0 = The updated output buffer address (return from CPYMSG/SETMSG). ; ; All other registers are preserved. ; ;- CLRMSG::JSR R2,$SAVVR ; Save R0 - R2. MOV #FMTBUF,R0 ; Set the buffer address. CALL CPYMSG ; Copy the positioning sequence. BIC #B.MSG,STATUS ; Show no message is displayed. JMP VTYPE ; Write it to the terminal. SETMSG::CALL CPYMSG ; Copy the positioning sequence. CALL REVERSE ; Add the REVERSE video attribute. RETURN SET2MS::MOV #FMTBUF,R0 ; Set the buffer address. (02) CALL SETMSG ; Setup the message to write. (02) CALL MOVEC ; Append the 1st message string.(02) CALL BOLD ; Copy the BOLD video attribute.(02) MOV R2,R1 ; Set address of second message.(02) CALL MOVEF ; Now append the second message.(03) RETURN WRTMSG::JSR R2,$SAVVR ; Save R0 - R2. MOV #FMTBUF,R0 ; Set the buffer address. CALL SETMSG ; Setup the message to write. CALL MOVEC ; Append the message string. BR TYPMSG ; Write it to the terminal. WRT2MS::JSR R2,$SAVVR ; Save R0 - R2. CALL SET2MS ; Set to write 2 string message.(02) BR TYPMSG ; And go do it ... (02) WRT4MS::JSR R2,$SAVVR ; Save R0 - R2. CALL SET2MS ; Set to write 2 string message.(02) CALL ATTOFF ; Turn off the video attributes.(02) CALL REVERSE ; Add REVERSE video attribute. (02) MOV R3,R1 ; Set address of third message. (02) CALL MOVEC ; Now append the third message. (02) CALL BOLD ; Add the BOLD video attribute. (02) MOV R4,R1 ; Set address of fourth message.(02) CALL MOVEC ; Now append the fourth message.(02) ; Fall through to write it ... (02) TYPMSG::CALL ATTOFF ; Turn off the video attributes. CALL ADDBEL ; Ring the bell to wakeup the user. BIS #B.MSG,STATUS ; Show a message is displayed. JMP VTYPE ; Write it to the terminal. CPYMSG::JSR R5,.SAVR1 ; Save R1 - R5. MOV #MSLINE,R1 ; Presume VT100 with AVO. BIT #B.132,STATUS ; VT100 in 132 column mode ? BEQ 10$ ; If EQ, no (80 column mode). BIT #B.AVO,SWMASK ; VT100 with advanced video ? BNE 10$ ; If NE, yes. SUB #LNBIAS,R1 ; No, adjust the message line. 10$: CALL MAKLIN ; Make the ASCII line number. MOV #1,R1 ; Set the column number. CALL MAKCOL ; Make the ASCII column number. CALL CEOL ; Clear to end of the line. RETURN .SBTTL CLRWIN - Clear the display window. ;+ ; ; CLRWIN - Clears the display window. ; ; This routine clears all the lines within the current display window. ; The file name and/or ruler (if any) are left on the screen. ; ; Inputs: ; None. ; ; Outputs: ; All registers are preserved. ; ;- CLRWIN::CALL $SAVAL ; Save all registers. MOV IENTRY,R5 ; Get the current entry. MOV #FMTBUF,R0 ; Set the buffer address. CALL CPYTOP ; Set to top of the window. BIT #B.2FIL,STATUS ; Are we displaying two files ? BEQ 20$ ; If EQ, no (single file). CMP R5,#IFILE2 ; Are we doing the bottom file ? BEQ 20$ ; If EQ, yes (use fast method). MOVB O.LMAX(R5),R2 ; Copy number of display lines. 10$: CALL CEOL ; Clear to end of the line. MOVB #LF,(R0)+ ; Position to the next line. SOB R2,10$ ; Loop until done. DEC R0 ; Don't need last line feed. CALL CPYMSG ; Clear the message line CALL CPYPRL ; and the prompt line. CALL CPYTOP ; Position to top of display window. BR 30$ ; Use common code ... ; Use the next call when doing single file display. 20$: CALL CEOS ; Clear to the end of screen. 30$: JMP VTYPE ; Write it to the terminal. .SBTTL WRITPR - Make and write the command prompt. ;+ ; ; WRITPR - Make and write the command prompt. ; ; This routine creates the prompt string from the current record number ; and writes it to the prompt line. ; ; Implicit inputs: ; O.CREC = The current record number. ; ; Outputs: ; All registers are preserved. ; ;- EOFMSG: .ASCIZ %EOF-% ; String for end of file prompt. .EVEN WRITPR::CALL $SAVAL ; Save all registers. MOV #FMTBUF,R0 ; Set the output buffer address. CALL SETPRL ; Prepare to write to prompt line. MOV IENTRY,R5 ; Copy the file entry address. BIT #S.EOF,(R5) ; Are we at end of file ? BEQ 10$ ; IF EQ, NO MOV #EOFMSG,R1 ; Set address of EOF string. CALL MOVEC ; Append it to the output buffer. 10$: MOV R5,R1 ; Copy the file entry address. ADD #O.CREC,R1 ; Point to the current record. CALL CVTDTD ; Convert record number to ASCII. MOVB #'>,(R0)+ ; Finish the prompt MOVB #SPACE,(R0)+ ; string with "> " CALL ATTOFF ; Turn off the video attributes. JMP VTYPE ; Write it to the terminal. .SBTTL CLRPRL - Position/clear the prompt line. ;+ ; ; CLRPRL - Position/clear the prompt line. ; CPYPRL - Copy the position/clear sequence (don't display). ; SETPRL - Same as CPYPRL except BOLD/REVERSE attributes added. ; WRTPRL - Same as SETPRL except append and display the message. ; ; This routine positions to the prompt line, clears the line, then adds ; the BOLD and REVERSE video attributes presuming a message will be ; displayed next. ; ; Inputs: ; R0 = The output buffer address (entry at CPYPRL/SETPRL). ; R1 = The prompt string address (entry at WRTPRL). ; ; Outputs: ; R0 = The updated output buffer address (return from CPYPRL/SETPRL). ; ; All other registers are preserved. ; ;- CLRPRL::JSR R2,$SAVVR ; Save R0 - R2. MOV #FMTBUF,R0 ; Set the buffer address. CALL CPYPRL ; Move positioning sequence. JMP VTYPE ; Write it to the terminal. SETPRL::CALL CPYPRL ; Move positioning sequence. CALL BOLD ; Add the BOLD attribute. CALL REVERSE ; Add the REVERSE attribute. RETURN WRTPRL::JSR R2,$SAVVR ; Save R0 - R2. MOV #FMTBUF,R0 ; Set the buffer address. CALL SETPRL ; Setup the buffer to write. CALL MOVEC ; Append the prompt string. CALL ATTOFF ; Append video attributes off. JMP VTYPE ; Write it to the terminal. CPYPRL::JSR R5,.SAVR1 ; Save R1 - R5. MOV #PRLINE,R1 ; Presume VT100 with AVO. BIT #B.132,STATUS ; VT100 in 132 column mode ? BEQ 10$ ; If EQ, no (80 column mode). BIT #B.AVO,SWMASK ; VT100 with advanced video ? BNE 10$ ; If NE, yes. SUB #LNBIAS,R1 ; No, adjust the prompt line. 10$: CALL MAKLIN ; Make the ASCII line number. MOV #1,R1 ; Set the column number. CALL MAKCOL ; Make the ASCII column number. CALL CEOL ; Clear to end of the line. RETURN .SBTTL NXTPAG - Format for the next page. ;+ ; ; NXTPAG - Format for the next page. ; ; This routine is called to format the screen for the next display page. ; The message and prompt lines are cleared, the cursor is positioned at the ; last display line, and the window is scrolled up one line in preparation ; of the next line to be displayed. ; ; Inputs: ; None. ; ; Outputs: ; All registers are preserved. ; ;- NXTPAG::CALL $SAVAL ; Save all registers. MOV IENTRY,R5 ; Copy the file entry address. MOV #FMTBUF,R0 ; Set the buffer address. CALL CPYMSG ; Clear the message line CALL CPYPRL ; and the prompt line. ; Next, position to the last display line. MOV O.BOT(R5),R1 ; Copy the bottom line number. CALL MAKLIN ; Make the ASCII line number. MOV #1,R1 ; Set for the first column. CALL MAKCOL ; Make the ASCII column number. CALL CPYBLA ; Use CR/LF to scroll the screen up. JMP VTYPE ; Write it to the terminal. .SBTTL CPYBLA - Copy the CR/LF sequence. ;+ ; ; CPYBLA - Copy a carriage return/line feed sequence. ; ; Inputs: ; R0 = The output buffer address. ; ; Outputs: ; R0 = The updated output buffer address. ; ; All other registers are preserved. ; ;- CPYBLA::JSR R5,.SAVR1 ; Save R1 - R5. MOVB #CR,(R0)+ ; Append a carriage return MOVB #LF,(R0)+ ; and a line feed. CLRB (R0) ; Terminate the output buffer. RETURN .SBTTL CPYTOP - Position to top of display window. ;+ ; ; CPYTOP - Copy the positioning sequence (don't display). ; WRTTOP - Write the position to top of display window sequence. ; ; This routine is used to position to the top line of a display window. ; ; Inputs: ; R0 = The output buffer address (entry at CPYTOP). ; R5 = The active file entry address (entry at CPYTOP). ; ; Outputs: ; R0 = The updated output buffer address (return from CPYTOP). ; ; All other registers are preserved. ; ;- WRTTOP::CALL $SAVAL ; Save all registers. MOV IENTRY,R5 ; Get the current entry. MOV #FMTBUF,R0 ; Set the buffer address. CALL CPYTOP ; Move positioning sequence. JMP VTYPE ; Write it to the terminal. CPYTOP::JSR R5,.SAVR1 ; Save R1 - R5. MOVB O.TOP(R5),R1 ; Copy the top line number. CALL MAKLIN ; Make the ASCII line number. MOV #1,R1 ; Set for the first column. CALL MAKCOL ; Now make the column number. RETURN .SBTTL CLRRUL - Clear/position to the ruler line number. ;+ ; ; CLRRUL - Clear/position to the ruler line number. ; CPYRUL - Copy the positioning sequence (don't display). ; SETRUL - Same as CPYRUL except REVERSE attribute added. ; ; This routine positions to and clears the ruler line. ; ; Inputs: ; R0 = The output buffer address (entry at CPYRUL/SETRUL). ; R5 = The active file entry address (entry at CPYRUL/SETRUL). ; ; Outputs: ; R0 = The updated output buffer address (return from CPYRUL/SETRUL). ; ; All other registers are preserved. ; ;- CLRRUL::CALL $SAVAL ; Save all registers. MOV IENTRY,R5 ; Get the current entry. BIC #S.RULR,(R5) ; Show ruler is not displayed. MOV #FMTBUF,R0 ; Set the buffer address. CALL CPYRUL ; Copy the positioning sequence. JMP VTYPE ; Write it to the terminal. SETRUL::CALL CPYRUL ; Copy the positioning seqeuence. CALL REVERSE ; Add the REVERSE attribute. RETURN CPYRUL::JSR R5,.SAVR1 ; Save R1 - R5. MOVB O.RLIN(R5),R1 ; Copy the ruler line number. CALL MAKLIN ; Make the ASCII line number. MOV #1,R1 ; Set for the first column. CALL MAKCOL ; Now make the column number. CALL SWIDTH ; Make this a single width line. CALL CEOL ; Clear to the end of the line. RETURN .SBTTL SCRDWN - Scroll the screen down. ;+ ; ; SCRDWN - Scroll the screen down. ; ; This routine is called to scroll the screen down the specified number ; of lines when we are backing up a partial page. ; ; Inputs: ; R1 = The number of lines to scroll down. ; ; Outputs: ; All registers are preserved. ; ;- SCRDWN::CALL $SAVAL ; Save all registers. MOV IENTRY,R5 ; Copy the file entry address. MOV #FMTBUF,R0 ; Set the output buffer address. CALL CPYMSG ; Clear the message line CALL CPYPRL ; and the prompt line. CALL CPYTOP ; Set to top of display window. 10$: CALL RINDEX ; Move screen down (reverse index). SOB R1,10$ ; Loop until we're done. JMP VTYPE ; Write it to the terminal. .SBTTL SETNAR - Set VT100 to 80 columns. ;+ ; ; SETNAR - Set VT100 to 80 column mode. ; ;- SETNAR::JSR R2,$SAVVR ; Save R0 - R2. MOV #FMTBUF,R0 ; Set the buffer address. CALL NARROW ; Set to a narrow screen. JMP VTYPE ; Write it to the terminal. .SBTTL WRTEOF - Write the end of file sequence. ;+ ; ; WRTEOF - Write the end of file sequence. ; ; This routine is called when a file is being closed to disable the ; scrolling region, put the keypad back in numeric mode, and to set ; the screen narrow if it was set wide. ; ; Inputs: ; None. ; ; Outputs: ; All registers are preserved. ; ;- WRTEOF::JSR R2,$SAVVR ; Save R0 - R2. MOV #FMTBUF,R0 ; Set the buffer address. CALL NOREG ; Remove the scroll region. CALL NUMKEY ; Put keypad back in numeric. BIT #B.132,STATUS ; VT100 in 132 column mode ? BEQ 10$ ; If EQ, no (already narrow). CALL NARROW ; Yes, set to 80 column mode. BIC #B.132,STATUS ; Show we're now in narrow mode. BR 20$ ; And continue ... 10$: CALL CPYPRL ; Position/clear the prompt line. ; ; On RSX-11M we backup the cursor to end up on last line after ; the prompt is displayed (prompt preceded by a line feed). ; TSTB VAXFLG ; Are we running on VAX/VMS ? BNE 20$ ; If NE, yes (all done). CALL CUP ; Back up the cursor a line. 20$: JMP VTYPE ; Write it to the terminal. .SBTTL WRTHDR - Write the screen header. ;+ ; ; WRTHDR - Writes the screen the active file entry. ; ; This routine sets the terminal to either 80 or 132 column mode, positions ; to and writes the file name (if enabled), enables the application keypad, ; sets up the scrolling region, writes a ruler (if enabled), and then leaves ; the cursor positioned at the first display line. ; ; Inputs: ; None. ; ; Outputs: ; All registers are preserved. ; ;- WRTHDR::CALL $SAVAL ; Save all registers. MOV IENTRY,R5 ; Get the current entry. MOV #FMTBUF,R0 ; Set the buffer address. BIT #B.2FIL,STATUS ; Are we displaying two files ? BEQ 10$ ; If EQ, no (only one). CALL PREHDR ; Clear top or bottom of screen. BR 20$ ; And continue ... ; We only change the width when displaying a single file. 10$: CALL CPYWID ; Copy the current screen width. 20$: CALL CPYNAM ; Do the file name processing. CALL APPKEY ; Enable the application keypad. CALL CPYSCR ; Setup the scrolling region. CALL VTYPE ; Write the format buffer. CALL CHKRUL ; Check/write a ruler (if enabled). JMP WRTTOP ; Set to top of the display window. .SBTTL WRTNAM - Write the file name. ;+ ; ; WRTNAM - Write the file name. ; ; Inputs: ; R0 = The output buffer address (entry at CPYNAM). ; R5 = The file entry address (entry at CPYNAM). ; ; Outputs: ; R0 = The updated output buffer address (entry at CPYNAM). ; ; All other registers are preserved. ; ;- WRTNAM::CALL $SAVAL ; Save all registers. MOV IENTRY,R5 ; Copy the file entry address. MOV #FMTBUF,R0 ; Set the output buffer address. CALL CPYNAM ; Copy the file name sequence. JMP VTYPE ; And write it to the terminal. CPYNAM::JSR R5,.SAVR1 ; Save R1 - R5. BIT #S.NAME,(R5) ; Is file name display enabled ? BEQ 100$ ; If EQ, no (we're all done). BIT #B.2FIL,STATUS ; Are we displaying two files ? BEQ 10$ ; If EQ, no (continue ...) BIT #S.RULR,(R5) ; Using ruler in place of name ? BNE 100$ ; If NE, yes (no file name). 10$: MOVB O.FLIN(R5),R1 ; Get the file name line number. CALL MAKLIN ; Make the ASCII line number. MOV #1,R1 ; Set for the first column. CALL MAKCOL ; Make the ASCII column number. BIT #B.132,STATUS ; Are we in 132 column mode ? BEQ 20$ ; If EQ, no (80 column mode). CALL DWIDTH ; Set for double width. 20$: CALL BOLD ; Add the BOLD attribute. CALL REVERSE ; Add the REVERSE attribute. MOV O.FNAM(R5),R1 ; Copy address of the file name. CALL MOVEC ; Copy it to the output buffer. MOVB #SPACE,(R0)+ ; Spaces between MOVB #SPACE,(R0)+ ; the file name MOVB #SPACE,(R0)+ ; and the date. MOV O.FDAT(R5),R1 ; Copy address of creation date. CALL MOVEC ; Copy it to the output buffer. CALL ATTOFF ; Turn off video attributes. 100$: RETURN .SBTTL PREHDR - Prepare to write header. ;+ ; ; PREHDR - Prepare to write the header. ; ; This routine is used to prepare the screen to write the file name for ; one of the file entrys when displaying two files. The idea here is to ; clear the screen for one file while the other file is left on the screen. ; ; Inputs: ; R0 = The output buffer address. ; R5 = The file entry address. ; ; Outputs: ; R0 = The updated output buffer address. ; ; All other registers are preserved. ; ;- PREHDR::JSR R5,.SAVR1 ; Save R1 - R5. CMP R5,#IFILE1 ; Are we doing the top file ? BNE 10$ ; If NE, no (must be the bottom). ; Top file processing: MOV O.BOT(R5),R1 ; Get the bottom line number. CALL MAKLIN ; Make the ASCII line number. MOV #1,R1 ; Set for the first column. CALL MAKCOL ; Make the ASCII column number. CALL CEOL ; Clear to end of the line. CALL CBOS ; Clear to beginning of screen. BR 100$ ; And continue ... ; Bottom file processing: 10$: MOV O.FLIN(R5),R1 ; Get the file name line. CALL MAKLIN ; Make the ASCII line number. MOV #1,R1 ; Set for the first column. CALL MAKCOL ; Make the ASCII column number. CALL CEOS ; Clear to the end of screen. BIT #S.NAME,(R5) ; Is file name display enabled ? BNE 100$ ; If NE, yes (continue ...) ; Put a delimiter between the top and bottom files. CALL SGRAPH ; Turn on special graphics. MOV #80.,R2 ; Presume in 80 column mode. BIT #B.132,STATUS ; Did we guess correctly ? BEQ 20$ ; If EQ, yes. MOV #132.,R2 ; Else, change the loop count. 20$: MOVB #HORLIN,(R0)+ ; Set to write a horizontal line. SOB R2,20$ ; Loop until done. CALL USSET ; Now, back to the ASCII set. 100$: RETURN .SBTTL CPYSCR - Copy the scroll region sequence. ;+ ; ; CPYSCR - Copy the scrolling region sequence. ; WRTSCR - Write the scrolling region sequece. ; ; Inputs: ; R0 = The output buffer address (entry at CPYSCR). ; ; Implicit inputs: ; O.TOP = The top display window line number. ; O.BOT = The bottom display window line number. ; ; Outputs: ; R0 = The updated output buffer address. ; ; All other registers are preserved. ; ;- WRTSCR::CALL $SAVAL ; Save all registers. MOV IENTRY,R5 ; Copy the file entry address. MOV #FMTBUF,R0 ; Set the output buffer address. CALL CPYSCR ; Copy the scrolling region. JMP VTYPE ; And write it to the terminal. CPYSCR::JSR R5,.SAVR1 ; Save R1 - R5. CALL HOME ; Put curser in home position. (01) MOVB O.TOP(R5),R1 ; Copy the top line number. CALL MAKLIN ; Make the ASCII line number. MOVB O.BOT(R5),R1 ; Set the bottom line number. CALL MAKCOL ; Now make the column number. MOVB #'r,-1(R0) ; Convert to set scroll region. RETURN .SBTTL CPYWID - Copy the screen width. ;+ ; ; CPYWID - Copy the screen width. ; ; This routine is used to change the terminal width to either narrow ; or wide. ; ; Inputs: ; R0 = The output buffer address (entry at CPYWID). ; ; Outputs: ; R0 = The updated output buffer address (entry at CPYWID). ; ; All other registers are preserved. ; ;- WRTWID::JSR R2,$SAVVR ; Save R0 - R2. MOV #FMTBUF,R0 ; Set the output buffer address. CALL CPYWID ; Copy the current screen width. JMP VTYPE ; Write it to the terminal. CPYWID::JSR R5,.SAVR1 ; Save R1 - R5. BIT #B.132,STATUS ; Are we in wide screen mode ? BNE 10$ ; If NE, yes. CALL NARROW ; No, set to a narrow screen. BR 100$ ; Use common return ... 10$: CALL WIDE ; Set to a wide screen. 100$: RETURN .SBTTL CPYACT - Copy the active message. ;+ ; ; CLRACT - Clear the active message. ; WRTACT - Write the active message. ; ; This routine is used to clear or write the active message on the file ; name line when we're displaying two files. ; ; Implicit inputs: ; O.FLIN = The file name line number. ; ; Outputs: ; All registers are preserved. ; ;- .ENABL LSB CLRACT::CALL $SAVAL ; Save all registers. CALL 50$ ; Do the initial processing. BCS 100$ ; If CS, don't write anything. CALL CEOL ; Clear to the end of line. JMP VTYPE ; Display it at the terminal. WRTACT::CALL $SAVAL ; Save all registers. CALL 50$ ; Do the initial processing. BCS 30$ ; If CS, show file on message line. CALL REVERSE ; Turn on reverse video attribute. CALL BOLD ; Add the bold attribute also. MOV #ACTM,R1 ; Set the active message address. CALL MOVEC ; Copy it to the output buffer. CALL ATTOFF ; Turn off the video attributes. CALL CPYTOP ; Set to top of the display window. JMP VTYPE ; Display it at the terminal. 30$: CALL SHOFIL ; Show file name on message line. CALL WRTTOP ; Set to top of the display window. BR 100$ ; Use common return ... ; Subroutine to do common code. 50$: MOV IENTRY,R5 ; Copy the file entry address. BIT #B.2FIL,STATUS ; Are we displaying two files ? BNE 60$ ; If NE, yes (continue ...) TST (SP)+ ; No, remove the return address. RETURN ; To dismiss the action message. 60$: SEC ; Presume message is disabled. BIT #S.RULR,(R5) ; Using ruler in place of name ? BNE 100$ ; If NE, yes (don't write message). BIT #S.NAME,(R5) ; Is file name display disabled ? BEQ 100$ ; If EQ, yes. MOV #FMTBUF,R0 ; Set the output buffer address. CALL CPYACT ; Set to the active position. CLC ; Show we should write message. 100$: RETURN .DSABL LSB CPYACT: JSR R5,.SAVR1 ; Save R1 - R5. MOV O.FLIN(R5),R1 ; Copy the top line number. CALL MAKLIN ; Make the ASCII line number. MOV #<80.-ACTS>,R1 ; Presume on a narrow screen. BIT #B.132,STATUS ; Did we presume right ? BEQ 10$ ; If EQ, yes. MOV #<<132./2>-ACTS>,R1 ; Else, set for a wide screen. 10$: CALL MAKCOL ; Now make the column number. RETURN .SBTTL WRTWRK - Display the working message. ;+ ; ; WRTWRK - Display the working message. ; ; This is routine is called after the timer expires to display the ; working message on the screen. ; ; Inputs: ; None. ; ; Ouputs: ; All registers are preserved. ; ;- WRTWRK::JSR R2,$SAVVR ; Save R0 - R2. MOV #FMTBUF,R0 ; Set address of format buffer. MOV #MSLINE,R1 ; Presume VT100 with AVO. BIT #B.132,STATUS ; VT100 in 132 column mode ? BEQ 10$ ; If EQ, no (80 column mode). BIT #B.AVO,SWMASK ; VT100 with advanced video ? BNE 10$ ; If NE, yes. SUB #LNBIAS,R1 ; No, adjust the message line. ; Allow field width of 6 for the record number. 10$: CALL MAKLIN ; Make the ASCII line number. MOV #<<80.-WORKS>-6>/2,R1 ; Presume we're on narrow screen. BIT #B.132,STATUS ; Did we presume right ? BEQ 20$ ; If EQ, yes. ADD #<132.-80.>/2,R1 ; No, adjust for a wide screen. 20$: CALL MAKCOL ; Make the ASCII column number. CALL CEOL ; Clear to end of the line. CALL REVERSE ; Add the reverse video attribute. MOV #WORKM,R1 ; Set address of "Working" message. CALL MOVEC ; Copy it to the output buffer. MOV IENTRY,R1 ; Copy the file entry address. ADD #O.CREC,R1 ; Point to current record number. CALL CVTDTD ; Convert it to decimal ASCII. CALL ATTOFF ; Turn off the attributes. BR VTYPE ; Now go display the message. .SBTTL VTLCLR - Clear the VT100 screen. ;+ ; ; VTLCLR - Clear the VT100 screen. ; ; Inputs: ; None. ; ; Outputs: ; All registers are preserved. ; ;- VTLCLR::JSR R2,$SAVVR ; Save R0 - R2. MOV #FMTBUF,R0 ; Store the message here. CALL CLRSCR ; Clear the entire screen. ;*** BR VTYPE ; Write it to the terminal. .SBTTL VTYPE - Write the format buffer. ;+ ; ; VTYPE - Write the format buffer to the terminal. ; ; Inputs: ; R0 = The updated output buffer address. ; ; Outputs: ; R0 = The starting output buffer address. ; ; All other registers are preserved. ; ;- VTYPE:: JSR R5,.SAVR1 ; Save R1 - R5. MOV R0,R1 ; Copy the buffer address. SUB #FMTBUF,R1 ; Calculate the byte count. MOV #FMTBUF,R0 ; Setup the starting address. CALL WRITIT ; And go write it. RETURN .END