.TITLE VTLSHO - SHOW Action Routines. .IDENT /2.15/ .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: VTLSHO.MAC ; Author: Robin Miller ; Date: July 22, 1983 ; ; Description: ; ; Action routines called for the SHOW command. ; ;- .ENABL AMA .NLIST BEX ;+ ; ; Modification History: ; ; June 13, 1984 by Robin Miller. Edit (05). ; Added routine to show the section size. ; ; June 13, 1984 by Robin Miller. Edit (04). ; Call MOVEF routine to copy and format the search string. ; ; June 2, 1984 by Robin Miller. Edit (03). ; Added routine to show the total skip count. ; ; May 31, 1984 by Robin Miller. Edit (02). ; Enabled the search backward message. ; ; May 24, 1984 by Robin Miller. Edit (01). ; Added routine to display the margin indent. ; ;- ; Messages: VTLVER: .ASCIZ "VTL Version 2.15 - December 4, 1985 - " AUTHOR: .ASCIZ "by Robin Miller." NAMEM: .ASCIZ "The current file name is " EXACTM: .ASCIZ "Exact" GENRLM: .ASCIZ "General" FORWDM: .ASCIZ "Forward" BACKUM: .ASCIZ "Backward" SEARCM: .ASCIZ "Search=" SECTM: .ASCIZ "The section size is " MARKM: .ASCIZ "Marking every " RECRDM: .ASCIZ " records." MARGM: .ASCIZ "The margin indent is " MARGCM: .ASCIZ " characters." .IFDF T$SKIP SKIPM: .ASCIZ "Total records skipped = " .ENDC ; T$SKIP .EVEN ;****************************************************************************** ; Action routine for the "SHOW FILE" command. SHOFIL::MOV IENTRY,R2 ; Copy the file entry address. MOV #NAMEM,R1 ; Set address of starting message. MOV O.FNAM(R2),R2 ; Set address of the file name. CALL WRT2MS ; Display them at the terminal. RETURN ;****************************************************************************** ; Action routine for the "SHOW KEYPAD" command. SHOKEY::JSR R5,$SAVRG ; Save R3 - R5. CALL SETNAR ; Set the terminal to narrow. MOV #PAD,R4 ; Set address of the keypad help. CALL WRITE ; Write keypad to the terminal. CALL PRSPEC ; Prompt the user for a response. JMP REFCMD ; Now refresh the screen. ;****************************************************************************** ; Action routine for the "SHOW MARK" command. SHOMRK::MOV IENTRY,R2 ; Copy the file entry address. MOV #FMTBUF,R0 ; Set the output buffer address. CALL SETMSG ; Setup to write to message line. MOV #MARKM,R1 ; Set address of "Marking" message. CALL MOVEC ; Copy it to the output buffer. MOV O.MARK(R2),R1 ; Copy the mark buffer modulo count. CALL CVTDEC ; Convert it to decimal ASCII. MOV #RECRDM,R1 ; Set address of "records" message. CALL MOVEC ; Copy it to the output buffer. JMP TYPMSG ; Now display message and return. ;****************************************************************************** ; Action routine for the "SHOW MARGIN" command. (01) SHOMAR::MOV IENTRY,R2 ; Copy the file entry address. MOV #FMTBUF,R0 ; Set the output buffer address. CALL SETMSG ; Setup to write to message line. MOV #MARGM,R1 ; Set address of "Margin..." message. CALL MOVEC ; Copy it to the output buffer. MOV O.MARG(R2),R1 ; Copy the margin indent count. CALL CVTDEC ; Convert it to decimal ASCII. MOV #MARGCM,R1 ; Set address of "characters" message. CALL MOVEC ; Copy it to the output buffer. JMP TYPMSG ; Now display message and return. ;****************************************************************************** ; Action routine for the "SHOW SEARCH" command. SHOSEA::MOV IENTRY,R2 ; Copy the file entry address. MOV #FMTBUF,R0 ; Set the output buffer address. CALL SETMSG ; Setup to write to message line. ; Format the "Exact" or "General" search mode. MOV #GENRLM,R1 ; Set address of "General" message. BIT #B.XACT,SWMASK ; Are we doing exact searches ? BEQ 10$ ; If EQ, no (general search). MOV #EXACTM,R1 ; Set address of "Exact" message. 10$: CALL MOVEC ; Append it to the output buffer. CALL 50$ ; Add message delimiters. ; Format the "Forward" or "Backward" search direction. MOV #FORWDM,R1 ; Set address of "Forward" message. BIT #S.FORW,(R2) ; Are we in the forward direction ?(02) BNE 20$ ; If NE, yes. (02) MOV #BACKUM,R1 ; Set address of "Backward" message(02) 20$: CALL MOVEC ; Append it to the output buffer. ; If there is a search string, display it. CALL 50$ ; Append message delimiters. MOV #SEARCM,R1 ; Set address of "Search=" message. CALL MOVEC ; Append it to the output buffer. TSTB FNDBUF ; Is there a search string ? BEQ 30$ ; If EQ, no (we're all done). CALL BOLD ; Put the search string in BOLD. MOV #FNDBUF,R1 ; Set address of the search string. CALL MOVEF ; Append it to the output buffer. (04) 30$: JMP TYPMSG ; Now display message and return. ; Subroutine to append message delimiters. 50$: MOVB #',,(R0)+ ; Append the MOVB #SPACE,(R0)+ ; message delimiter. RETURN ;****************************************************************************** ; Action routine for the "SHOW SECTION" command. (05) SHOSEC::MOV IENTRY,R2 ; Copy the file entry address. MOV #FMTBUF,R0 ; Set the output buffer address. CALL SETMSG ; Setup to write to message line. MOV #SECTM,R1 ; Set address of "Section" message. CALL MOVEC ; Copy it to the output buffer. MOV O.SSIZ(R2),R1 ; Copy the section line count. CALL CVTDEC ; Convert it to decimal ASCII. MOV #RECRDM,R1 ; Set address of "records" message. CALL MOVEC ; Copy it to the output buffer. JMP TYPMSG ; Now display message and return. ;****************************************************************************** ; Action routine for the "SHOW SKIPS" command. (03) .IFDF T$SKIP SHOSKP::MOV #FMTBUF,R0 ; Set the output buffer address. CALL SETMSG ; Setup to write to message line. MOV #SKIPM,R1 ; Set address of the message. CALL MOVEC ; Copy it to the output buffer. MOV #TSKIPS,R1 ; Set address of total skips count. CALL CVTDTD ; Convert it to decimal ASCII. JMP TYPMSG ; Now display message and return. .ENDC ; T$SKIP ;****************************************************************************** ; Action routine for the "SHOW VERSION" command. SHOVER::MOV #VTLVER,R1 ; Set address of version message. MOV #AUTHOR,R2 ; Set address of author message. CALL WRT2MS ; Display it on the message line. RETURN .END