.TITLE VTLSET - SET Action Routines. .IDENT /1.6/ .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: VTLSET.MAC ; Author: Robin Miller ; Date: August 4, 1983 ; ; Description: ; ; Action routines called for the SET command. ; ;- .ENABL AMA .NLIST BEX ;+ ; ; Modification History: ; ; December 3, 1985 by Robin Miller. Edit (06), Version 1.6 ; Reset the default number of lines when toggling the AVO flag ; unless the user has specified a line count. This resets the ; line count properly when "SET AVO" is done on a wide screen. ; ; November 26, 1985 by Roin Miller. Edit (05), Version 1.5 ; Save the user specified line count in the file entry table. ; This is used in routine SETUP to determine how many lines to ; display on a terminal without AVO. ; ; June 6, 1984 by Robin Miller. Edit (04), Version 1.4 ; When changing the number of lines to display, if displaying two ; files, clear the display window before saving the new line count. ; ; June 6, 1984 by Robin Miller. Edit (03), Version 1.3 ; Don't reset the default number of lines on the screen when ; toggling the AVO flag. The SETUP routine will adjust this. ; Call REFCMD routine instead of REFSCR routine so the screen ; gets updated properly if in split screen mode. ; ; June 6, 1984 by Robin Miller. Edit (02), Version 1.2 ; Allow the line count to be set as small as two lines. We must ; have at least two lines to setup a scrolling region. ; ; May 31, 1984 by Robin Miller. Edit (01), Version 1.1 ; Repaint the ruler when displaying the record numbers. ; ;- ;****************************************************************************** ; Action routine for the "SET AVO" or /AVO command. SETAVO::MOV #B.AVO,R0 ; Set the AVO bit number. CALL DOSWM ; Turn the switch on or off. MOV IENTRY,R2 ; Copy the file entry address. TST O.ULIN(R2) ; User specify a line count ? (06) BNE 10$ ; If NE, yes (skip the reset). (06) MOV O.DBOT(R2),O.BOT(R2) ; Reset the maximum line number.(06) 10$: CALL CHKOPE ; Is an input file open ? BCC 20$ ; If CC, no (presume /AVO). JMP REFCMD ; Else, refresh the screen. (03) 20$: RETURN ;****************************************************************************** ; Action routine for the "SET BINARY" or /BINARY command. SETBIN::MOV #S.BIN,R0 ; Set the BINARY bit number. CALL DOSWT ; Turn the bit on or off. CALL CHKOPE ; Is an input file open ? BCC 10$ ; If CC, no (presume /BINARY). JMP REPAGE ; Get ready to redisplay the page. 10$: RETURN ;****************************************************************************** ; Action routine for the "SET SCROLL" or /SCROLL command. SETSCB::MOV #B.SCRB,R0 ; Set the SCROLL BOTH bit number. JMP DOSWM ; Turn the bit on or off. RETURN ;****************************************************************************** ; Action routine for the "SET HEADER" or /HEADER command. SETHDR::MOV #B.HDR,R0 ; Set the HEADER bit number. JMP DOSWM ; Turn the switch on or off. ;****************************************************************************** ; Action routine for the "SET LINES n" or /LINES=n command. SETLIN::MOV IENTRY,R2 ; Copy the file entry address. ; Calculate the maximum number of lines allowed. MOV O.DBOT(R2),R1 ; Copy the bottom line number. SUB O.TOP(R2),R1 ; Calculate the number of lines. INC R1 ; Adjust for the top line number. BIT #B.2FIL,STATUS ; Are we displaying two files ? BEQ 10$ ; If EQ, no (displaying one). MOV #10.,R1 ; Yes, set the maximum lines. ; Allow range between 2 and the maximum line count. 10$: MOV .PNUMB,R0 ; Copy the number specified. BEQ 20$ ; If EQ, no number given. CMP R0,R1 ; Is the number too large ? BGT 20$ ; If GT, yes. CMP R0,#2 ; Is the number too small ? (02) BLT 20$ ; If LT, yes. BIT #B.2FIL,STATUS ; Are we displaying two files ? (04) BEQ 12$ ; If EQ, no (displaying one). (04) CALL CHKOPE ; Is an input file open ? (04) BCC 12$ ; If CC, no (presume /LINES=n). (04) CALL CLRWIN ; Yes, clear the display window.(04) 12$: MOV R0,O.ULIN(R2) ; Save the user line count. (05) ADD O.TOP(R2),R0 ; Calculate the bottom line. DEC R0 ; Adjust for top line number. MOV R0,O.BOT(R2) ; Save the new bottom line number. CALL CHKOPE ; Is an input file open ? BCC 15$ ; If CC, no (presume /LINES=n). JMP REFSCR ; Else, refresh the screen. 15$: RETURN 20$: JMP FAIL ; Return failure to .TPARS ;****************************************************************************** ; Action routine for the "SET NAME" or /NAME command. SETNAM::MOV #S.NAME,R0 ; Set the NAME bit number. CALL DOSWT ; Turn the bit on or off. MOV O.RLIN(R2),O.TOP(R2) ; Copy the ruler line number. INC O.TOP(R2) ; Calculate the top display line. BCC 10$ ; If CC, we're enabling the name. ; Disabling the file name display. CMP R2,#IFILE2 ; Is this the bottom file entry ? BEQ 10$ ; If EQ, yes (leave file separator). MOV O.FLIN(R2),O.TOP(R2) ; Start display at file name line. 10$: CALL CHKOPE ; Is an input file open ? BCC 20$ ; If CC, no (presume /NAME). JMP REFSCR ; Else, refresh the screen. 20$: RETURN ;****************************************************************************** ; Action routine for the "SET NUMBERS" or /NUMBERS command. SETNUM::MOV #S.NUMB,R0 ; Set the NUMBER bit number. CALL DOSWT ; Turn the bit on or off. CALL CHKOPE ; Is an input file open ? BCC 10$ ; If CC, no (presume /NUMBERS). CALL CHKRUL ; Repaint the ruler if active. (01) JMP REPAGE ; Get ready to redisplay the page. 10$: RETURN ;****************************************************************************** ; Action routines for "SET SEARCH EXACT or GENERAL". .ENABL LSB SETEXA::BIS #B.XACT,SWMASK ; Show doing exact searches. BR 10$ ; And use common code ... SETGEN::BIC #B.XACT,SWMASK ; Show doing general searches. 10$: BIS #B.DOPR,STATUS ; Show we should reprompt user. RETURN .DSABL LSB ;****************************************************************************** ; Action routine for the "SET PROTECT" or /PROTECT command. SETPRO::MOV #B.PROT,R0 ; Set the PROTECT bit number. CALL DOSWM ; Turn the switch on or off. RETURN ;****************************************************************************** ; Action routine for the "SET QUIET" or /QUIET command. SETQUI::MOV #B.BELL,R0 ; Set the BELL bit number. COM NEGFLG ; Reverse the negate flag. JMP DOSWM ; Turn the bit on or off. ;****************************************************************************** ; Action routine for the "SET RSX11" or /RSX11 command. SETRSX::MOV #B.NATV,R0 ; Set the NATIVE mode bit number. COM NEGFLG ; Reverse the negate flag. JMP DOSWM ; Turn the bit on or off. RETURN ;****************************************************************************** ; Action routine for the "SET SCREEN n" or /SCREEN=n command. SETSCR::MOV IENTRY,R2 ; Copy the file entry address. MOV .PNUMB,O.UWID(R2) ; Save the user specified width. CALL CHKOPE ; Is an input file open ? BCC 10$ ; If CC, no (presume /SCREEN). JMP REFCMD ; Yes, refresh the screen. 10$: RETURN ;****************************************************************************** ; Action routine for the "SET SECTION n" or /SECTION=n command. SETSEC::MOV IENTRY,R2 ; Copy the file entry address. MOV .PNUMB,O.USIZ(R2) ; Save the user specified section. CALL ADJSEC ; Now adjust the section size. RETURN ;****************************************************************************** ; Action routine for the "SET TAB n" command. SETTAB::MOV .PNUMB,R1 ; Copy the new tab count. BNE 10$ ; If NE, non-zero count. JMP FAIL ; Else, return failure. 10$: MOV R1,TABSIZ ; Save the new tab count. JMP REPAGE ; Get ready to redisplay the page. RETURN .DSABL LSB ;****************************************************************************** ; Action routine for the "SET TECO" or /TECO command. SETTEC::MOV #S.TECO,R0 ; Set the TECO bit number. CALL DOSWT ; Turn the bit on or off. BCS 10$ ; If CS, the bit was cleared. BIS #S.SEE,(R2) ; Else, enable see-all mode also. 10$: CALL CHKOPE ; Is an input file open ? BCC 20$ ; If CC, no (presume /TECO). JMP REPAGE ; Get ready to redisplay the page. 20$: RETURN ;****************************************************************************** ; Action routine for the "SET WAIT" or /WAIT command. SETWAI::MOV #B.WAIT,R0 ; Set the WAIT bit number. JMP DOSWM ; Turn the bit on or off. .END