; 0001 0 MODULE KERTRM (IDENT = '3.0.065' ; 0002 0 ) = ; 0003 1 BEGIN ; 0004 1 ! ; 0005 1 ; 0006 1 !++ ; 0007 1 ! FACILITY: ; 0008 1 ! ; 0009 1 ! KERMIT-32 terminal processing. ; 0010 1 ! ; 0011 1 ! ABSTRACT: ; 0012 1 ! ; 0013 1 ! This module will do all of the terminal processing for KERMIT-32. ; 0014 1 ! It contains the output routines for the terminal to send and ; 0015 1 ! receive messages as well as the routines to output text for debugging. ; 0016 1 ! ; 0017 1 ! ENVIRONMENT: ; 0018 1 ! ; 0019 1 ! VAX/VMS user mode. ; 0020 1 ! ; 0021 1 ! AUTHOR: Robert C. McQueen, CREATION DATE: 25-March-1983 ; 0022 1 !-- ; 0023 1 ; 0024 1 %SBTTL 'Table of Contents' ; 0025 1 ! ; 0026 1 ! TABLE OF CONTENTS: ; 0027 1 ! ; 0028 1 %SBTTL 'Revision History' ; 0029 1 ; 0030 1 !++ ; 0031 1 ! ; 0032 1 ! Start of version 1. 25-March-1983 ; 0033 1 ! ; 0034 1 ! 1.0.000 By: Robert C. McQueen On: 25-March-1983 ; 0035 1 ! Create this module. ; 0036 1 ! ; 0037 1 ! 1.1.001 By: W. Hom On: 6-July-83 ; 0038 1 ! Implement CONNECT command. ; 0039 1 ! ; 0040 1 ! 1.1.002 By: Nick Bush On: 7-July-83 ; 0041 1 ! Fix RECEIVE QIO to time out correctly. ; 0042 1 ! ; 0043 1 ! 1.2.003 By: Robert C. McQueen On: 16-Aug-83 ; 0044 1 ! Get the status correctly for the SS$_TIMEOUT checks. ; 0045 1 ! ; 0046 1 ! 1.2.004 By: Robert C. McQueen On: 9-Sept-1983 ; 0047 1 ! Flag if we just opened the terminal, so that we can ; 0048 1 ! clear the input that is coming into the terminal. This ; 0049 1 ! will clear up some of the junk that we get on start up. ; 0050 1 ! ; 0051 1 ! 2.0.005 Release VAX/VMS Kermit-32 version 2.0 ; 0052 1 ! ; 0053 1 ! 2.0.006 By: Nick Bush On: 10-Nov-1983 ; 0054 1 ! Fix local echo and IBM mode. ; 0055 1 ! ; 0056 1 ! 2.0.013 By: Nick Bush On: 11-Nov-1983 ; 0057 1 ! Make it possible to redirect debugging output to DBG$OUTPUT. ; 0058 1 ! ; 0059 1 ! 2.0.015 By: Nick Bush On: 17-Nov-1983 ; 0060 1 ! Always purge typeahead when posting the receive QIO. ; 0061 1 ! Also eat any received data just before sending a packet. ; 0062 1 ! ; 0063 1 ! 2.0.020 By: Nick Bush On: 9-Dec-1983 ; 0064 1 ! Only abort (when remote) if we seen two control-Y's in ; 0065 1 ! succession. This way a single glitch does not kill us. ; 0066 1 ! ; 0067 1 ! 2.0.021 By: Nick Bush On: 12-Dec-1983 ; 0068 1 ! Add status type-out character (^A), debug toggle ; 0069 1 ! character (^D), and force timeout character (^M) ; 0070 1 ! to those accepted during a transfer when we are remote. ; 0071 1 ! ; 0072 1 ! 2.0.023 By: Nick Bush On: 16-Dec-1983 ; 0073 1 ! Add a default terminal name for the communications line. ; 0074 1 ! If KER$COMM is defined, that will be the default. ; 0075 1 ! ; 0076 1 ! 2.0.027 By: Nick Bush On: 20-Jan-1983 ; 0077 1 ! Fix reset of parity to use the correct field in the ; 0078 1 ! IO status block from the IO$_SENSEMODE. It was using ; 0079 1 ! the LF fill count instead. ; 0080 1 ! ; 0081 1 ! 2.0.031 By: Nick Bush On: 4-Feb-1983 ; 0082 1 ! Change connect code to improve response (hopefully ; 0083 1 ! without worsening throughput or runtime requirements). ; 0084 1 ! When either terminal is idle we will be waiting for ; 0085 1 ! a single character with a larger buffered read queued ; 0086 1 ! up immediately after it. ; 0087 1 ! ; 0088 1 ! 2.0.033 By: Nick Bush On: 6-March-1984 ; 0089 1 ! Change command input and terminal processing so that ; 0090 1 ! we will always have SYS$OUTPUT and SYS$COMMAND open ; 0091 1 ! when they are terminals, and will also always have ; 0092 1 ! the transfer terminal line open. This makes it ; 0093 1 ! unnecessary for the user to allocate a dialup line ; 0094 1 ! in order to go between CONNECT and a transfer command, ; 0095 1 ! and keep anyone else from grabbing the line between ; 0096 1 ! commands. ; 0097 1 ! Also add the command parsing for the rest of the LOCAL/REMOTE ; 0098 1 ! commands. This makes use of the fact that we have ; 0099 1 ! SYS$COMMAND open to allow us to read passwords without echo. ; 0100 1 ! Commands which should only be done when Kermit is local ; 0101 1 ! (GET, BYE, etc.) will now give an error if the transfer ; 0102 1 ! line is the same as the controlling terminal. ; 0103 1 ! SEND will now check for the files existance before calling ; 0104 1 ! KERMSG to send it. ; 0105 1 ! ; 0106 1 ! 2.0.034 By: Nick Bush On: 7-March-1984 ; 0107 1 ! Default the parity type to be that of the default transfer ; 0108 1 ! line. This should make things simpler for systems which use ; 0109 1 ! parity by default. ; 0110 1 ! ; 0111 1 ! 2.0.035 By: Nick Bush On: 8-March-1984 ; 0112 1 ! Add LOG SESSION command to set a log file for CONNECT. ; 0113 1 ! While we are doing so, clean up the command parsing a little ; 0114 1 ! so that we don't have as many COPY_xxx routines. ; 0115 1 ! ; 0116 1 ! 2.0.036 By: Robert C. McQueen On: 20-March-1984 ; 0117 1 ! Fix call to LOG_OPEN to make the debug log file work. ; 0118 1 ! Module: KERTRM ; 0119 1 ! ; 0120 1 ! 2.0.037 By: Robert C. McQueen On: 20-March-1984 ; 0121 1 ! Fix call to LOG_OPEN for debug log file. ; 0122 1 ! Module: KERTRM. ; 0123 1 ! ; 0124 1 ! 2.0.042 By: Nick Bush On: 26-March-1984 ; 0125 1 ! Fix connect processing to make it easy to type messages ; 0126 1 ! on the user's terminal while connected. Use this ; 0127 1 ! to type messages when log file stopped and started. ; 0128 1 ! Include the node name in the messages to keep ; 0129 1 ! users who are running through multiple Kermit's from ; 0130 1 ! getting confused. ; 0131 1 ! ; 0132 1 ! 2.0.043 By: Nick Bush On: 28-March-1984 ; 0133 1 ! Fix SET PARITY ODD to work. Somehow, the table entry ; 0134 1 ! had PR_NONE instead of PR_ODD. Also add status type ; 0135 1 ! out and help message to connect command. ; 0136 1 ! ; 0137 1 ! 3.0.045 Start of version 3. ; 0138 1 ! ; 0139 1 ! 3.0.046 By: Nick Bush On: 29-March-1984 ; 0140 1 ! Fix debugging log file to correctly set/clear file open ; 0141 1 ! flag. Also make log files default to .LOG. ; 0142 1 ! ; 0143 1 ! 3.1.054 By: Nick Bush On: 13-July-1984 ; 0144 1 ! Change TERM_OPEN to take an argument which determines ; 0145 1 ! whether it should post any QIO's. This makes it unnecessary ; 0146 1 ! for TERM_CONNECT to cancel the QIO's, and avoids problems ; 0147 1 ! with DECnet remote terminals. ; 0148 1 ! ; 0149 1 ! 3.1.060 By: Nick Bush On: 16-March-1985 ; 0150 1 ! Increase size of terminal name buffers to account for large ; 0151 1 ! unit numbers (most likely seen with VTA's). ; 0152 1 ! ; 0153 1 ! 3.1.061 By: Nick Bush On: 16-March-1985 ; 0154 1 ! Only attempt to set parity back when closing terminal. ; 0155 1 ! ; 0156 1 ! 3.1.065 By: Nick Bush On: 10-April-1985 ; 0157 1 ! Split IBM handshaking from parity and local echo. Allow ; 0158 1 ! link time setting of IBM_MODE defaults by defining symbols: ; 0159 1 ! ; 0160 1 ! IBM_MODE_CHARACTER = character value of handshake character ; 0161 1 ! IBM_MODE_ECHO = 1 for local echo, 2 for no local echo ; 0162 1 ! IBM_MODE_PARITY = (0 = none), (1 = mark), (2 = even), ; 0163 1 ! (3 = odd), (4 = space). ; 0164 1 ! ; 0165 1 ! If not specified, Kermit will continue to use DC1, local echo ; 0166 1 ! and odd parity for IBM_MODE. ; 0167 1 ! ; 0168 1 !-- ; 0169 1 ; 0170 1 %SBTTL 'Library files' ; 0171 1 ! ; 0172 1 ! INCLUDE FILES: ; 0173 1 ! ; 0174 1 ! ; 0175 1 ! System definitions ; 0176 1 ! ; 0177 1 ; 0178 1 LIBRARY 'SYS$LIBRARY:STARLET'; ; 0179 1 ; 0180 1 ! ; 0181 1 ! KERMIT common definitions ; 0182 1 ! ; 0183 1 ; 0184 1 REQUIRE 'KERCOM'; ; 0389 1 ; 0390 1 REQUIRE 'KERERR'; ; 0455 1 ; 0456 1 %SBTTL 'Structure definitions -- $GETDVI arguments' ; 0457 1 ! ; 0458 1 ! $GETDVI interface fields and structure definition ; 0459 1 ! ; 0460 1 ; 0461 1 LITERAL ; 0462 1 DVI_SIZE = 3; ! Length of a DVI item list entry ; 0463 1 ; 0464 1 ! ; 0465 1 ! Fields for accessing the items in a DVI item list ; 0466 1 ! ; 0467 1 ; 0468 1 FIELD ; 0469 1 DVI_FIELDS = ; 0470 1 SET ; 0471 1 DVI_BFR_LENGTH = [0, 0, 16, 0], ; 0472 1 DVI_ITEM_CODE = [0, 16, 16, 0], ; 0473 1 DVI_BFR_ADDRESS = [1, 0, 32, 0], ; 0474 1 DVI_RTN_LENGTH = [2, 0, 32, 0] ; 0475 1 TES; ; 0476 1 ; 0477 1 ! ; 0478 1 ! Structure definition for item list ; 0479 1 ; 0480 1 STRUCTURE ; 0481 1 DVI_ITEM_LIST [I, O, P, S, E; N] = ; 0482 1 [(N + 1)*DVI_SIZE*4] ; 0483 1 (DVI_ITEM_LIST + ((I*DVI_SIZE) + O)*4); ; 0484 1 ; 0485 1 %SBTTL 'Structures definitions -- Terminal characteristics' ; 0486 1 ! ; 0487 1 ! Terminal characteristics words ; 0488 1 ! ; 0489 1 ; 0490 1 LITERAL ; 0491 1 TC$_CHAR_LENGTH = 12; ; 0492 1 ; 0493 1 ! ; 0494 1 ! Fields for accessing the items in a characteristic block ; 0495 1 ! ; 0496 1 ; 0497 1 FIELD ; 0498 1 TC$_FIELDS = ; 0499 1 SET ; 0500 1 TC$_CLASS = [0, 0, 8, 0], ; 0501 1 TC$_TYPE = [0, 8, 8, 0], ; 0502 1 TC$_BFR_SIZE = [0, 16, 16, 0], ; 0503 1 TC$_PAGE_LEN = [1, 24, 8, 0], ; 0504 1 TC$_CHAR = [1, 0, 24, 0], ; 0505 1 TC$_CHAR_2 = [2, 0, 32, 0] ; 0506 1 TES; ; 0507 1 ; 0508 1 ! ; 0509 1 ! Structure definition for item list ; 0510 1 ! ; 0511 1 ; 0512 1 STRUCTURE ; 0513 1 TC$_CHAR_STR [O, P, S, E; N] = ; 0514 1 [TC$_CHAR_LENGTH] ; 0515 1 (TC$_CHAR_STR + O*4); ; 0516 1 ; 0517 1 %SBTTL 'Literals' ; 0518 1 ! ; 0519 1 ! Literal definitions ; 0520 1 ! ; 0521 1 ; 0522 1 LITERAL ; 0523 1 MAX_NODE_NAME = 128, ! Size of a node name ; 0524 1 TERM_NAME_SIZE = 16, ! Size of a terminal name ; 0525 1 RECV_BUFF_SIZE = MAX_MSG + 20, ! Size of receive buffer ; 0526 1 GET_DEV_EFN = 7, ! For GET_DEV_CHAR ; 0527 1 CONS_O_EFN = 6, ! Event flag for console output ; 0528 1 CONS_EFN = 5, ! Event flag for console input ; 0529 1 TERM_O_EFN = 4, ! Event flag for terminal output ; 0530 1 TIME_EFN = 3, ! Event flag number for receive timer ; 0531 1 TERM_EFN = 2; ! Event flag number to use for Terminal input ; 0532 1 ; 0533 1 %SBTTL 'Storage' ; 0534 1 ! ; 0535 1 ! OWN STORAGE: ; 0536 1 ! ; 0537 1 ! ; 0538 1 ! Communications routines storage ; 0539 1 ! ; 0540 1 ; 0541 1 OWN ; 0542 1 FORCE_ABORT, ! Force abort next receive ; 0543 1 FORCE_TIMEOUT, ![021] Force time out on next receive ; 0544 1 TERM_FIRST_TIME, ! First time QIO to read done ; 0545 1 TERM_CHAN, ! Channel the terminal is opened on ; 0546 1 CONS_CHAN, ! Channel the console terminal is opened on ; 0547 1 SYS_OUTPUT_CHAN, ! Channel to SYS$OUTPUT (if it is a terminal) ; 0548 1 SYS_OUTPUT_OPEN, ! SYS$OUTPUT open ; 0549 1 SYS_OUTPUT_NAME : VECTOR [TERM_NAME_SIZE, BYTE], ! Text of physical name for SYS$OUTPUT ; 0550 1 SYS_OUTPUT_DESC : BLOCK [8, BYTE], ! Descriptor for physical name ; 0551 1 SYS_COMMAND_CHAN, ! Channel to SYS$COMMAND if a terminal ; 0552 1 SYS_COMMAND_OPEN, ! SYS$COMMAND open ; 0553 1 SYS_COMMAND_NAME : VECTOR [TERM_NAME_SIZE, BYTE], ! Text of physical name for SYS$COMMAND ; 0554 1 SYS_COMMAND_DESC : BLOCK [8, BYTE], ! Descriptor for physical name ; 0555 1 TERM_NAME : VECTOR [TERM_NAME_SIZE, BYTE], ! Text of current transfer terminal name ; 0556 1 JOB_TERM_NAME : VECTOR [TERM_NAME_SIZE, BYTE], ! Text of jobs controlling terminal name ; 0557 1 TERM_OPEN_FLAG, ! The transfer terminal is open ; 0558 1 SESSION_FAB : $FAB_DECL, ! FAB for session logging ; 0559 1 SESSION_RAB : $RAB_DECL, ! RAB for session logging ; 0560 1 SESSION_NAME : VECTOR [MAX_FILE_NAME, BYTE], ! Actual name of session log file ; 0561 1 SESSION_OPEN, ! Session log file open ; 0562 1 SESSION_LOGGING, ! Session logging enabled ; 0563 1 DEBUG_FAB : $FAB_DECL, ![013] FAB for debugging ; 0564 1 DEBUG_RAB : $RAB_DECL, ![013] RAB for debugging ; 0565 1 DEBUG_NAME : VECTOR [MAX_FILE_NAME, BYTE], ! Name of debugging log file ; 0566 1 DEBUG_REDIRECTED, ![013] Debugging output redirected ; 0567 1 NODE_NAME : VECTOR [MAX_NODE_NAME, BYTE], ! Node name text ; 0568 1 IO_STATUS : VECTOR [4, WORD], ! IOSB for receive QIO ; 0569 1 RECV_BUFFER : VECTOR [CH$ALLOCATION (RECV_BUFF_SIZE, CHR_SIZE)], ! Input buffer ; 0570 1 OLD_PARITY : BLOCK [8, BYTE], ! Old IOSB information ; 0571 1 OLD_TERM_CHAR : TC$_CHAR_STR FIELD (TC$_FIELDS), ! Old terminal chars ; 0572 1 NEW_TERM_CHAR : TC$_CHAR_STR FIELD (TC$_FIELDS); ! New terminal chars ; 0573 1 ; 0574 1 GLOBAL ; 0575 1 NODE_DESC : BLOCK [8, BYTE], ! Descriptor for node name (if network system) ; 0576 1 DEBUG_DESC : BLOCK [8, BYTE], ! Descriptor for debug log file ; 0577 1 SESSION_DESC : BLOCK [8, BYTE], ! Descriptor for session log file name ; 0578 1 TERM_DESC : BLOCK [8, BYTE], ! Descriptor for current transfer terminal ; 0579 1 JOB_TERM_DESC : BLOCK [8, BYTE], ! Descriptor for controlling terminal (if any) ; 0580 1 TERM_FLAG; ! Terminal setup for transfer ; 0581 1 ; 0582 1 %SBTTL 'External routines' ; 0583 1 ! ; 0584 1 ! EXTERNAL REFERENCES: ; 0585 1 ! ; 0586 1 ! ; 0587 1 ! System library routines ; 0588 1 ! ; 0589 1 ; 0590 1 EXTERNAL ROUTINE ; 0591 1 LIB$PUT_SCREEN : ADDRESSING_MODE (GENERAL), ; 0592 1 LIB$PUT_OUTPUT : ADDRESSING_MODE (GENERAL), ; 0593 1 LIB$EMUL : ADDRESSING_MODE (GENERAL), ; 0594 1 LIB$ADDX : ADDRESSING_MODE (GENERAL), ; 0595 1 LIB$SIGNAL : ADDRESSING_MODE (GENERAL); ; 0596 1 ; 0597 1 ! ; 0598 1 ! Forward routines: ; 0599 1 ! ; 0600 1 ; 0601 1 FORWARD ROUTINE ; 0602 1 TERM_DUMP : NOVALUE, ! Routine to type on terminal ; 0603 1 GET_DEV_CHAR, ! Get device characteristics ; 0604 1 DO_RECEIVE_QIO, ; 0605 1 DO_CONS_QIO; ; 0606 1 ; 0607 1 %SBTTL 'External storage' ; 0608 1 ; 0609 1 !++ ; 0610 1 ! The following is the various external storage locations that are ; 0611 1 ! referenced from this module. ; 0612 1 !-- ; 0613 1 ; 0614 1 ! ; 0615 1 ! KERMSG storage ; 0616 1 ! ; 0617 1 ; 0618 1 EXTERNAL ; 0619 1 PARITY_TYPE, ! Type of parity being used ; 0620 1 ECHO_FLAG, ![006] Local echo ; 0621 1 ! IBM_FLAG, ! True if IBM mode ; 0622 1 IBM_CHAR, ! IBM mode turn-around character ; 0623 1 RCV_EOL, ! Receive EOL character ; 0624 1 SEND_TIMEOUT, ! Receive time out counter ; 0625 1 CONNECT_FLAG; ! Flag if communications line is TT: ; 0626 1 ; 0627 1 ! ; 0628 1 ! KERMIT storage ; 0629 1 ! ; 0630 1 ; 0631 1 EXTERNAL ; 0632 1 ESCAPE_CHR; ! Escape char. for CONNECT. ; 0633 1 ; 0634 1 %SBTTL 'Terminal routines -- TERM_INIT - Initialize this module' ; 0635 1 ; 0636 1 GLOBAL ROUTINE TERM_INIT : NOVALUE = ; 0637 1 ; 0638 1 !++ ; 0639 1 ! FUNCTIONAL DESCRIPTION: ; 0640 1 ! ; 0641 1 ! This routine will initialize the terminal processing module. It will ; 0642 1 ! initialize the various data locations in this module. ; 0643 1 ! ; 0644 1 ! CALLING SEQUENCE: ; 0645 1 ! ; 0646 1 ! TERM_INIT(); ; 0647 1 ! ; 0648 1 ! INPUT PARAMETERS: ; 0649 1 ! ; 0650 1 ! None. ; 0651 1 ! ; 0652 1 ! IMPLICIT INPUTS: ; 0653 1 ! ; 0654 1 ! None. ; 0655 1 ! ; 0656 1 ! OUTPUT PARAMETERS: ; 0657 1 ! ; 0658 1 ! None. ; 0659 1 ! ; 0660 1 ! IMPLICIT OUTPUTS: ; 0661 1 ! ; 0662 1 ! None. ; 0663 1 ! ; 0664 1 ! COMPLETION CODES: ; 0665 1 ! ; 0666 1 ! None. ; 0667 1 ! ; 0668 1 ! SIDE EFFECTS: ; 0669 1 ! ; 0670 1 ! None. ; 0671 1 ! ; 0672 1 !-- ; 0673 1 ; 0674 2 BEGIN ; 0675 2 ; 0676 2 LOCAL ; 0677 2 COUNTER, ! Counter for logical name translation ; 0678 2 STATUS, ! System call status ; 0679 2 DEV_TYPE, ! Device type result ; 0680 2 RSL_LENGTH, ! Resulting length of translation ; 0681 2 RSL_NAME : BLOCK [TERM_NAME_SIZE, BYTE], ! Translated name ; 0682 2 RSL_DESC : BLOCK [8, BYTE], ! Descriptor for translated name ; 0683 2 ITMLST : DVI_ITEM_LIST [2] FIELD (DVI_FIELDS); ; 0684 2 ; 0685 2 ! ; 0686 2 ! Initialize session log file descriptor ; 0687 2 ! ; 0688 2 SESSION_DESC [DSC$B_CLASS] = DSC$K_CLASS_S; ; 0689 2 SESSION_DESC [DSC$B_DTYPE] = DSC$K_DTYPE_T; ; 0690 2 SESSION_DESC [DSC$W_LENGTH] = 0; ; 0691 2 SESSION_DESC [DSC$A_POINTER] = SESSION_NAME; ; 0692 2 ! ; 0693 2 ! Initialize debugging log file descriptor ; 0694 2 ! ; 0695 2 DEBUG_DESC [DSC$B_CLASS] = DSC$K_CLASS_S; ; 0696 2 DEBUG_DESC [DSC$B_DTYPE] = DSC$K_DTYPE_T; ; 0697 2 DEBUG_DESC [DSC$W_LENGTH] = 0; ; 0698 2 DEBUG_DESC [DSC$A_POINTER] = DEBUG_NAME; ; 0699 2 ! ; 0700 2 ! Get system node name (if any) ; 0701 2 ! ; 0702 2 NODE_DESC [DSC$B_CLASS] = DSC$K_CLASS_S; ; 0703 2 NODE_DESC [DSC$B_DTYPE] = DSC$K_DTYPE_T; ; 0704 2 NODE_DESC [DSC$W_LENGTH] = MAX_NODE_NAME; ; 0705 2 NODE_DESC [DSC$A_POINTER] = NODE_NAME; ; P 0706 2 STATUS = $TRNLOG (LOGNAM = %ASCID'SYS$NODE', RSLBUF = NODE_DESC, ; 0707 2 RSLLEN = NODE_DESC [DSC$W_LENGTH]); ; 0708 2 COUNTER = 64; ! Max number of translations ; 0709 2 ; 0710 2 WHILE .NODE_NAME [0] NEQ %C'_' ! Until physical name ; 0711 2 AND .STATUS ! or translation fails ; 0712 3 AND (.STATUS NEQ SS$_NOTRAN) ! or there is no translation ; 0713 2 AND .COUNTER GTR 0 ! or we do too many translations ; 0714 2 DO ; 0715 3 BEGIN ; 0716 4 STATUS = $TRNLOG (LOGNAM = NODE_DESC, RSLBUF = NODE_DESC, RSLLEN = NODE_DESC [DSC$W_LENGTH]) ; 0717 3 ; ; 0718 3 COUNTER = .COUNTER - 1; ; 0719 2 END; ; 0720 2 ; 0721 2 ! ; 0722 2 ! If call failed, we don't really know the node name ; 0723 2 ! ; 0724 2 ; 0725 2 IF NOT .STATUS ; 0726 2 THEN ; 0727 3 BEGIN ; 0728 3 NODE_DESC [DSC$W_LENGTH] = 0; ; 0729 3 NODE_NAME [0] = 0; ! Indicate no node ; 0730 3 END ; 0731 2 ELSE ; 0732 2 ; 0733 2 IF .NODE_NAME [0] EQL %C'_' ; 0734 2 THEN ; 0735 3 BEGIN ; 0736 3 NODE_DESC [DSC$W_LENGTH] = .NODE_DESC [DSC$W_LENGTH] - 1; ; 0737 3 NODE_DESC [DSC$A_POINTER] = NODE_NAME [1]; ; 0738 2 END; ; 0739 2 ; 0740 2 ! ; 0741 2 ! Get controlling terminal ; 0742 2 ! ; 0743 2 JOB_TERM_DESC [DSC$B_CLASS] = DSC$K_CLASS_S; ; 0744 2 JOB_TERM_DESC [DSC$B_DTYPE] = DSC$K_DTYPE_T; ; 0745 2 JOB_TERM_DESC [DSC$W_LENGTH] = TERM_NAME_SIZE; ; 0746 2 JOB_TERM_DESC [DSC$A_POINTER] = JOB_TERM_NAME; ; 0747 2 JOB_TERM_NAME [0] = %C'_'; ; 0748 2 ITMLST [0, DVI_ITEM_CODE] = JPI$_TERMINAL; ; 0749 2 ITMLST [0, DVI_BFR_LENGTH] = TERM_NAME_SIZE - 1; ; 0750 2 ITMLST [0, DVI_BFR_ADDRESS] = JOB_TERM_NAME + 1; ; 0751 2 ITMLST [0, DVI_RTN_LENGTH] = RSL_LENGTH; ; 0752 2 ITMLST [1, DVI_ITEM_CODE] = 0; ; 0753 2 ITMLST [1, DVI_BFR_LENGTH] = 0; ; 0754 2 STATUS = $GETJPI (ITMLST = ITMLST); ; 0755 2 JOB_TERM_DESC [DSC$W_LENGTH] = .RSL_LENGTH + 1; ; 0756 2 ; 0757 2 IF NOT .STATUS OR .RSL_LENGTH EQL 0 THEN JOB_TERM_DESC [DSC$W_LENGTH] = 0; ; 0758 2 ; 0759 2 ! ; 0760 2 ! Open the output device and command device (if they are terminals) ; 0761 2 ! ; 0762 2 SYS_OUTPUT_DESC [DSC$B_CLASS] = DSC$K_CLASS_S; ; 0763 2 SYS_OUTPUT_DESC [DSC$B_DTYPE] = DSC$K_DTYPE_T; ; 0764 2 SYS_OUTPUT_DESC [DSC$W_LENGTH] = TERM_NAME_SIZE; ; 0765 2 SYS_OUTPUT_DESC [DSC$A_POINTER] = SYS_OUTPUT_NAME; ; 0766 2 STATUS = GET_DEV_CHAR (%ASCID'SYS$OUTPUT', SYS_OUTPUT_DESC, DEV_TYPE); ; 0767 2 ; 0768 2 IF .STATUS AND .DEV_TYPE EQL DC$_TERM ; 0769 2 THEN ; 0770 3 BEGIN ; 0771 3 STATUS = $ASSIGN (CHAN = SYS_OUTPUT_CHAN, DEVNAM = SYS_OUTPUT_DESC); ; 0772 3 ; 0773 3 IF .STATUS THEN SYS_OUTPUT_OPEN = TRUE; ; 0774 3 ; 0775 2 END; ; 0776 2 ; 0777 2 SYS_COMMAND_DESC [DSC$B_CLASS] = DSC$K_CLASS_S; ; 0778 2 SYS_COMMAND_DESC [DSC$B_DTYPE] = DSC$K_DTYPE_T; ; 0779 2 SYS_COMMAND_DESC [DSC$W_LENGTH] = TERM_NAME_SIZE; ; 0780 2 SYS_COMMAND_DESC [DSC$A_POINTER] = SYS_COMMAND_NAME; ; 0781 2 STATUS = GET_DEV_CHAR (%ASCID'SYS$COMMAND', SYS_COMMAND_DESC, DEV_TYPE); ; 0782 2 ; 0783 2 IF .STATUS AND .DEV_TYPE EQL DC$_TERM ; 0784 2 THEN ; 0785 3 BEGIN ; 0786 3 STATUS = $ASSIGN (CHAN = SYS_COMMAND_CHAN, DEVNAM = SYS_COMMAND_DESC); ; 0787 3 ; 0788 3 IF .STATUS THEN SYS_COMMAND_OPEN = TRUE; ; 0789 3 ; 0790 2 END; ; 0791 2 ; 0792 2 ! ; 0793 2 ! Set up the terminal name descriptor ; 0794 2 ! ; 0795 2 TERM_DESC [DSC$B_CLASS] = DSC$K_CLASS_S; ; 0796 2 TERM_DESC [DSC$B_DTYPE] = DSC$K_DTYPE_T; ; 0797 2 TERM_DESC [DSC$A_POINTER] = TERM_NAME; ; 0798 2 TERM_DESC [DSC$W_LENGTH] = TERM_NAME_SIZE; ; 0799 2 ! ; 0800 2 ! If KER$COMM is a terminal, then use it as the default. ; 0801 2 ! ; 0802 2 STATUS = GET_DEV_CHAR (%ASCID'KER$COMM', TERM_DESC, DEV_TYPE); ; 0803 2 ; 0804 2 IF NOT .STATUS OR .DEV_TYPE NEQ DC$_TERM ; 0805 2 THEN ; 0806 3 BEGIN ; 0807 3 ! ; 0808 3 ! If KER$COMM is not a terminal (or is not anything), try SYS$INPUT. ; 0809 3 ! ; 0810 3 TERM_DESC [DSC$W_LENGTH] = TERM_NAME_SIZE; ; 0811 3 STATUS = GET_DEV_CHAR (%ASCID'SYS$INPUT', TERM_DESC, DEV_TYPE); ; 0812 3 ; 0813 3 IF NOT .STATUS OR .DEV_TYPE NEQ DC$_TERM ; 0814 3 THEN ; 0815 4 BEGIN ; 0816 4 ! ; 0817 4 ! If SYS$INPUT is not a terminal, check out SYS$OUTPUT. We will already have ; 0818 4 ! it open if it is a terminal. ; 0819 4 ! ; 0820 4 ; 0821 4 IF .SYS_OUTPUT_OPEN ; 0822 4 THEN ; 0823 5 BEGIN ; 0824 5 CH$COPY (.SYS_OUTPUT_DESC [DSC$W_LENGTH], ; 0825 5 CH$PTR (.SYS_OUTPUT_DESC [DSC$A_POINTER]), CHR_NUL, TERM_NAME_SIZE, ; 0826 5 CH$PTR (TERM_NAME)); ; 0827 5 TERM_DESC [DSC$W_LENGTH] = .SYS_OUTPUT_DESC [DSC$W_LENGTH]; ; 0828 5 END ; 0829 4 ELSE ; 0830 5 BEGIN ; 0831 5 ! ; 0832 5 ! SYS$OUTPUT is not a terminal. Next we try SYS$COMMAND. It should already ; 0833 5 ! be open if it is a valid terminal. ; 0834 5 ! ; 0835 5 ; 0836 5 IF .SYS_COMMAND_OPEN ; 0837 5 THEN ; 0838 6 BEGIN ; 0839 6 CH$COPY (.SYS_COMMAND_DESC [DSC$W_LENGTH], ; 0840 6 CH$PTR (.SYS_COMMAND_DESC [DSC$A_POINTER]), CHR_NUL, TERM_NAME_SIZE, ; 0841 6 CH$PTR (TERM_NAME)); ; 0842 6 TERM_DESC [DSC$W_LENGTH] = .SYS_OUTPUT_DESC [DSC$W_LENGTH]; ; 0843 6 END ; 0844 5 ELSE ; 0845 6 BEGIN ; 0846 6 ! ; 0847 6 ! Here we start to get desparate. Nothing we have tried so far was a terminal. ; 0848 6 ! Try the terminal which is controlling the job which owns this process. ; 0849 6 ! ; 0850 6 TERM_DESC [DSC$W_LENGTH] = .JOB_TERM_DESC [DSC$W_LENGTH]; ; 0851 6 CH$COPY (.JOB_TERM_DESC [DSC$W_LENGTH], ; 0852 6 CH$PTR (.JOB_TERM_DESC [DSC$A_POINTER]), CHR_NUL, TERM_NAME_SIZE, ; 0853 6 CH$PTR (TERM_NAME)); ; 0854 5 END; ; 0855 5 ; 0856 4 END; ; 0857 4 ; 0858 3 END; ; 0859 3 ; 0860 2 END; ; 0861 2 ; 0862 2 ! ; 0863 2 ! At this pointer, TERM_DESC should be set up with something resembling ; 0864 2 ! the phyiscal name of a terminal (unless this is a detached process). ; 0865 2 ! We can now assign a channel to the terminal and tell the user what the ; 0866 2 ! default device is. ; 0867 2 ! ; 0868 2 CH$WCHAR (CHR_NUL, CH$PTR (TERM_NAME, .TERM_DESC [DSC$W_LENGTH])); ; 0869 2 STATUS = $ASSIGN (CHAN = TERM_CHAN, DEVNAM = TERM_DESC); ; 0870 2 TERM_DUMP (UPLIT BYTE(CHR_CRT, CHR_LFD), 2); ; 0871 2 ; 0872 2 IF .STATUS ; 0873 2 THEN ; 0874 3 BEGIN ; 0875 3 ; 0876 3 BIND ; 0877 3 DEFTRM_TEXT = %ASCID'Default terminal for transfers is: '; ; 0878 3 ; 0879 3 MAP ; 0880 3 DEFTRM_TEXT : BLOCK [8, BYTE]; ; 0881 3 ; 0882 3 TERM_OPEN_FLAG = TRUE; ; 0883 3 TERM_DUMP (.DEFTRM_TEXT [DSC$A_POINTER], .DEFTRM_TEXT [DSC$W_LENGTH]); ; 0884 3 TERM_DUMP (TERM_NAME, .TERM_DESC [DSC$W_LENGTH]); ; 0885 3 END ; 0886 2 ELSE ; 0887 3 BEGIN ; 0888 3 ; 0889 3 BIND ; 0890 3 NODEFTRM_TEXT = %ASCID'No default terminal line for transfers'; ; 0891 3 ; 0892 3 MAP ; 0893 3 NODEFTRM_TEXT : BLOCK [8, BYTE]; ; 0894 3 ; 0895 3 TERM_OPEN_FLAG = FALSE; ; 0896 3 TERM_DESC [DSC$W_LENGTH] = 0; ; 0897 3 TERM_DUMP (.NODEFTRM_TEXT [DSC$A_POINTER], .NODEFTRM_TEXT [DSC$W_LENGTH]) ; 0898 2 END; ; 0899 2 ; 0900 2 TERM_DUMP (UPLIT BYTE(CHR_CRT, CHR_LFD), 2); ; 0901 2 ! ; 0902 2 ! Initialize the flags ; 0903 2 ! ; 0904 2 TERM_FLAG = FALSE; ; 0905 2 ! ; 0906 2 ! If we really did get the terminal open, then determine what type of ; 0907 2 ! parity it uses, and default to using that parity. ; 0908 2 ! ; 0909 2 ; 0910 2 IF .TERM_OPEN_FLAG ; 0911 2 THEN ; 0912 3 BEGIN ; P 0913 3 STATUS = $QIOW (CHAN = .TERM_CHAN, FUNC = IO$_SENSEMODE, P1 = OLD_TERM_CHAR, ; 0914 3 P2 = TC$_CHAR_LENGTH, IOSB = OLD_PARITY); ; 0915 3 ; 0916 3 IF .STATUS ; 0917 3 THEN ; 0918 3 ; 0919 3 IF (.OLD_PARITY [6, 0, 8, 0] AND TT$M_PARITY) NEQ 0 ; 0920 3 THEN ; 0921 3 ; 0922 3 IF (.OLD_PARITY [6, 0, 8, 0] AND TT$M_ODD) NEQ 0 ; 0923 3 THEN ; 0924 3 PARITY_TYPE = PR_ODD ; 0925 3 ELSE ; 0926 3 PARITY_TYPE = PR_EVEN ; 0927 3 ; 0928 3 ELSE ; 0929 3 PARITY_TYPE = PR_NONE; ; 0930 3 ; 0931 2 END; ; 0932 2 ; 0933 1 END; ! End of TERM_INIT .TITLE KERTRM .IDENT \3.0.065\ .PSECT $PLIT$,NOWRT,NOEXE,2 P.AAB: .ASCII \SYS$NODE\ ; ; P.AAA: .LONG 17694728 ; ; .ADDRESS P.AAB ; ; P.AAD: .ASCII \SYS$OUTPUT\<0><0> ; ; P.AAC: .LONG 17694730 ; ; .ADDRESS P.AAD ; ; P.AAF: .ASCII \SYS$COMMAND\<0> ; ; P.AAE: .LONG 17694731 ; ; .ADDRESS P.AAF ; ; P.AAH: .ASCII \KER$COMM\ ; ; P.AAG: .LONG 17694728 ; ; .ADDRESS P.AAH ; ; P.AAJ: .ASCII \SYS$INPUT\<0><0><0> ; ; P.AAI: .LONG 17694729 ; ; .ADDRESS P.AAJ ; ; P.AAK: .BYTE 13, 10 ; ; .BLKB 2 P.AAM: .ASCII \Default terminal for transfers is: \<0> ; ; P.AAL: .LONG 17694755 ; ; .ADDRESS P.AAM ; ; P.AAO: .ASCII \No default terminal line for transfers\<0><0> ; ; P.AAN: .LONG 17694758 ; ; .ADDRESS P.AAO ; ; P.AAP: .BYTE 13, 10 ; ; .PSECT $OWN$,NOEXE,2 ;FORCE_ABORT U.1: .BLKB 4 ;FORCE_TIMEOUT U.2: .BLKB 4 ;TERM_FIRST_TIME U.3: .BLKB 4 ;TERM_CHAN U.4: .BLKB 4 ;CONS_CHAN U.5: .BLKB 4 ;SYS_OUTPUT_CHAN U.6: .BLKB 4 ;SYS_OUTPUT_OPEN U.7: .BLKB 4 ;SYS_OUTPUT_NAME U.8: .BLKB 16 ;SYS_OUTPUT_DESC U.9: .BLKB 8 ;SYS_COMMAND_CHAN U.10: .BLKB 4 ;SYS_COMMAND_OPEN U.11: .BLKB 4 ;SYS_COMMAND_NAME U.12: .BLKB 16 ;SYS_COMMAND_DESC U.13: .BLKB 8 ;TERM_NAME U.14: .BLKB 16 ;JOB_TERM_NAME U.15: .BLKB 16 ;TERM_OPEN_FLAG U.16: .BLKB 4 ;SESSION_FAB U.17: .BLKB 80 ;SESSION_RAB U.18: .BLKB 68 ;SESSION_NAME U.19: .BLKB 132 ;SESSION_OPEN U.20: .BLKB 4 ;SESSION_LOGGING U.21: .BLKB 4 ;DEBUG_FAB U.22: .BLKB 80 ;DEBUG_RAB U.23: .BLKB 68 ;DEBUG_NAME U.24: .BLKB 132 ;DEBUG_REDIRECTED U.25: .BLKB 4 ;NODE_NAME U.26: .BLKB 128 ;IO_STATUS U.27: .BLKB 8 ;RECV_BUFFER U.28: .BLKB 120 ;OLD_PARITY U.29: .BLKB 8 ;OLD_TERM_CHAR U.30: .BLKB 12 ;NEW_TERM_CHAR U.31: .BLKB 12 .PSECT $GLOBAL$,NOEXE,2 NODE_DESC:: .BLKB 8 DEBUG_DESC:: .BLKB 8 SESSION_DESC:: .BLKB 8 TERM_DESC:: .BLKB 8 JOB_TERM_DESC:: .BLKB 8 TERM_FLAG:: .BLKB 4 FNM_NORMAL== 1 FNM_FULL== 2 FNM_UNTRAN== 4 PR_MIN== 0 PR_NONE== 0 PR_MARK== 1 PR_EVEN== 2 PR_ODD== 3 PR_SPACE== 4 PR_MAX== 4 GC_MIN== 1 GC_EXIT== 1 GC_DIRECTORY== 2 GC_DISK_USAGE== 3 GC_DELETE== 4 GC_TYPE== 5 GC_HELP== 6 GC_LOGOUT== 7 GC_LGN== 8 GC_CONNECT== 9 GC_RENAME== 10 GC_COPY== 11 GC_WHO== 12 GC_SEND_MSG== 13 GC_STATUS== 14 GC_COMMAND== 15 GC_KERMIT== 16 GC_JOURNAL== 17 GC_VARIABLE== 18 GC_PROGRAM== 19 GC_MAX== 19 DP_FULL== 0 DP_HALF== 1 CHK_1CHAR== 49 CHK_2CHAR== 50 CHK_CRC== 51 MAX_MSG== 100 U.43= P.AAL U.45= P.AAN .EXTRN LIB$PUT_SCREEN, LIB$PUT_OUTPUT, LIB$EMUL, LIB$ADDX, LIB$SIGNAL, PARITY_TYPE, ECHO_FLAG .EXTRN IBM_CHAR, RCV_EOL, SEND_TIMEOUT, CONNECT_FLAG, ESCAPE_CHR, SYS$TRNLOG, SYS$GETJPI .EXTRN SYS$ASSIGN, SYS$QIOW .PSECT $CODE$,NOWRT,2 .ENTRY TERM_INIT, ^M ; ; MOVAB G^SYS$TRNLOG, R11 ;SYS$TRNLOG, R11 ; MOVAB G^SYS$ASSIGN, R10 ;SYS$ASSIGN, R10 ; MOVAB W^P.AAA, R9 ;P.AAA, R9 ; MOVAB W^TERM_DESC, R8 ;TERM_DESC, R8 ; MOVAB W^U.14, R7 ;U.14, R7 ; MOVAB -68(SP), SP ;-68(SP), SP ; MOVL #17694720, -8(R8) ;#17694720, SESSION_DESC ; 0690 MOVAB 184(R7), -4(R8) ;SESSION_NAME, SESSION_DESC+4 ; 0691 MOVL #17694720, -16(R8) ;#17694720, DEBUG_DESC ; 0697 MOVAB 472(R7), -12(R8) ;DEBUG_NAME, DEBUG_DESC+4 ; 0698 MOVL #17694848, -24(R8) ;#17694848, NODE_DESC ; 0704 MOVAB 608(R7), -20(R8) ;NODE_NAME, NODE_DESC+4 ; 0705 CLRQ -(SP) ;-(SP) ; 0707 CLRL -(SP) ;-(SP) ; PUSHAB -24(R8) ;NODE_DESC ; PUSHAB -24(R8) ;NODE_DESC ; PUSHL R9 ;R9 ; CALLS #6, (R11) ;#6, SYS$TRNLOG ; MOVL R0, R6 ;R0, STATUS ; MOVZBL #64, R2 ;#64, COUNTER ; 0708 1$: CMPB 608(R7), #95 ;NODE_NAME, #95 ; 0710 BEQL 2$ ;2$ ; BLBC R6, 3$ ;STATUS, 3$ ; 0711 CMPL R6, #1577 ;STATUS, #1577 ; 0712 BEQL 2$ ;2$ ; TSTL R2 ;COUNTER ; 0713 BLEQ 2$ ;2$ ; CLRQ -(SP) ;-(SP) ; 0716 CLRL -(SP) ;-(SP) ; PUSHAB -24(R8) ;NODE_DESC ; PUSHAB -24(R8) ;NODE_DESC ; PUSHAB -24(R8) ;NODE_DESC ; CALLS #6, (R11) ;#6, SYS$TRNLOG ; MOVL R0, R6 ;R0, STATUS ; DECL R2 ;COUNTER ; 0718 BRB 1$ ;1$ ; 0710 2$: BLBS R6, 4$ ;STATUS, 4$ ; 0725 3$: CLRW -24(R8) ;NODE_DESC ; 0728 CLRB 608(R7) ;NODE_NAME ; 0729 BRB 5$ ;5$ ; 0725 4$: CMPB 608(R7), #95 ;NODE_NAME, #95 ; 0733 BNEQ 5$ ;5$ ; DECW -24(R8) ;NODE_DESC ; 0736 MOVAB 609(R7), -20(R8) ;NODE_NAME+1, NODE_DESC+4 ; 0737 5$: MOVL #17694736, 8(R8) ;#17694736, JOB_TERM_DESC ; 0745 MOVAB 16(R7), 12(R8) ;JOB_TERM_NAME, JOB_TERM_DESC+4 ; 0746 MOVB #95, 16(R7) ;#95, JOB_TERM_NAME ; 0747 MOVL #52232207, 8(SP) ;#52232207, ITMLST ; 0748 MOVAB 17(R7), 12(SP) ;JOB_TERM_NAME+1, ITMLST+4 ; 0750 MOVAB (SP), 16(SP) ;RSL_LENGTH, ITMLST+8 ; 0751 CLRL 20(SP) ;ITMLST+12 ; 0752 CLRQ -(SP) ;-(SP) ; 0754 CLRL -(SP) ;-(SP) ; PUSHAB 20(SP) ;ITMLST ; CLRQ -(SP) ;-(SP) ; CLRL -(SP) ;-(SP) ; CALLS #7, G^SYS$GETJPI ;#7, SYS$GETJPI ; MOVL R0, R6 ;R0, STATUS ; ADDW3 #1, (SP), 8(R8) ;#1, RSL_LENGTH, JOB_TERM_DESC ; 0755 BLBC R6, 6$ ;STATUS, 6$ ; 0757 TSTL (SP) ;RSL_LENGTH ; BNEQ 7$ ;7$ ; 6$: CLRW 8(R8) ;JOB_TERM_DESC ; 7$: MOVL #17694736, -40(R7) ;#17694736, SYS_OUTPUT_DESC ; 0764 MOVAB -56(R7), -36(R7) ;SYS_OUTPUT_NAME, SYS_OUTPUT_DESC+4 ; 0765 PUSHAB 4(SP) ;DEV_TYPE ; 0766 PUSHAB -40(R7) ;SYS_OUTPUT_DESC ; PUSHAB 20(R9) ;P.AAC ; CALLS #3, W^U.39 ;#3, U.39 ; MOVL R0, R6 ;R0, STATUS ; BLBC R6, 8$ ;STATUS, 8$ ; 0768 CMPL 4(SP), #66 ;DEV_TYPE, #66 ; BNEQ 8$ ;8$ ; CLRQ -(SP) ;-(SP) ; 0771 PUSHAB -64(R7) ;SYS_OUTPUT_CHAN ; PUSHAB -40(R7) ;SYS_OUTPUT_DESC ; CALLS #4, (R10) ;#4, SYS$ASSIGN ; MOVL R0, R6 ;R0, STATUS ; BLBC R6, 8$ ;STATUS, 8$ ; 0773 MOVL #1, -60(R7) ;#1, SYS_OUTPUT_OPEN ; 8$: MOVL #17694736, -8(R7) ;#17694736, SYS_COMMAND_DESC ; 0779 MOVAB -24(R7), -4(R7) ;SYS_COMMAND_NAME, SYS_COMMAND_DESC+4 ; 0780 PUSHAB 4(SP) ;DEV_TYPE ; 0781 PUSHAB -8(R7) ;SYS_COMMAND_DESC ; PUSHAB 40(R9) ;P.AAE ; CALLS #3, W^U.39 ;#3, U.39 ; MOVL R0, R6 ;R0, STATUS ; BLBC R6, 9$ ;STATUS, 9$ ; 0783 CMPL 4(SP), #66 ;DEV_TYPE, #66 ; BNEQ 9$ ;9$ ; CLRQ -(SP) ;-(SP) ; 0786 PUSHAB -32(R7) ;SYS_COMMAND_CHAN ; PUSHAB -8(R7) ;SYS_COMMAND_DESC ; CALLS #4, (R10) ;#4, SYS$ASSIGN ; MOVL R0, R6 ;R0, STATUS ; BLBC R6, 9$ ;STATUS, 9$ ; 0788 MOVL #1, -28(R7) ;#1, SYS_COMMAND_OPEN ; 9$: MOVL #17694736, (R8) ;#17694736, TERM_DESC ; 0798 MOVAB (R7), 4(R8) ;TERM_NAME, TERM_DESC+4 ; 0797 PUSHAB 4(SP) ;DEV_TYPE ; 0802 PUSHL R8 ;R8 ; PUSHAB 56(R9) ;P.AAG ; CALLS #3, W^U.39 ;#3, U.39 ; MOVL R0, R6 ;R0, STATUS ; BLBC R6, 10$ ;STATUS, 10$ ; 0804 CMPL 4(SP), #66 ;DEV_TYPE, #66 ; BEQL 15$ ;15$ ; 10$: MOVW #16, (R8) ;#16, TERM_DESC ; 0810 PUSHAB 4(SP) ;DEV_TYPE ; 0811 PUSHL R8 ;R8 ; PUSHAB 76(R9) ;P.AAI ; CALLS #3, W^U.39 ;#3, U.39 ; MOVL R0, R6 ;R0, STATUS ; BLBC R6, 11$ ;STATUS, 11$ ; 0813 CMPL 4(SP), #66 ;DEV_TYPE, #66 ; BEQL 15$ ;15$ ; 11$: BLBC -60(R7), 12$ ;SYS_OUTPUT_OPEN, 12$ ; 0821 MOVC5 -40(R7), @-36(R7), #0, #16, (R7) ;SYS_OUTPUT_DESC, @SYS_OUTPUT_DESC+4, #0, #16, TERM_NAME ; 0826 BRB 13$ ;13$ ; 0827 12$: BLBC -28(R7), 14$ ;SYS_COMMAND_OPEN, 14$ ; 0836 MOVC5 -8(R7), @-4(R7), #0, #16, (R7) ;SYS_COMMAND_DESC, @SYS_COMMAND_DESC+4, #0, #16, TERM_NAME ; 0841 13$: MOVW -40(R7), (R8) ;SYS_OUTPUT_DESC, TERM_DESC ; 0842 BRB 15$ ;15$ ; 0836 14$: MOVW 8(R8), (R8) ;JOB_TERM_DESC, TERM_DESC ; 0850 MOVC5 8(R8), @12(R8), #0, #16, (R7) ;JOB_TERM_DESC, @JOB_TERM_DESC+4, #0, #16, TERM_NAME ; 0853 15$: MOVZWL (R8), R0 ;TERM_DESC, R0 ; 0868 CLRB (R7)[R0] ;TERM_NAME[R0] ; CLRQ -(SP) ;-(SP) ; 0869 PUSHAB -72(R7) ;TERM_CHAN ; PUSHL R8 ;R8 ; CALLS #4, (R10) ;#4, SYS$ASSIGN ; MOVL R0, R6 ;R0, STATUS ; PUSHL #2 ;#2 ; 0870 PUSHAB 84(R9) ;P.AAK ; CALLS #2, W^U.38 ;#2, U.38 ; BLBC R6, 16$ ;STATUS, 16$ ; 0872 MOVL #1, 32(R7) ;#1, TERM_OPEN_FLAG ; 0882 MOVZWL 124(R9), -(SP) ;DEFTRM_TEXT, -(SP) ; 0883 PUSHL 128(R9) ;DEFTRM_TEXT+4 ; CALLS #2, W^U.38 ;#2, U.38 ; MOVZWL (R8), -(SP) ;TERM_DESC, -(SP) ; 0884 PUSHL R7 ;R7 ; BRB 17$ ;17$ ; 16$: CLRL 32(R7) ;TERM_OPEN_FLAG ; 0895 CLRW (R8) ;TERM_DESC ; 0896 MOVZWL 172(R9), -(SP) ;NODEFTRM_TEXT, -(SP) ; 0897 PUSHL 176(R9) ;NODEFTRM_TEXT+4 ; 17$: CALLS #2, W^U.38 ;#2, U.38 ; PUSHL #2 ;#2 ; 0900 PUSHAB 180(R9) ;P.AAP ; CALLS #2, W^U.38 ;#2, U.38 ; CLRL 16(R8) ;TERM_FLAG ; 0904 BLBC 32(R7), 20$ ;TERM_OPEN_FLAG, 20$ ; 0910 CLRQ -(SP) ;-(SP) ; 0914 CLRQ -(SP) ;-(SP) ; PUSHL #12 ;#12 ; PUSHAB 872(R7) ;OLD_TERM_CHAR ; CLRQ -(SP) ;-(SP) ; PUSHAB 864(R7) ;OLD_PARITY ; PUSHL #39 ;#39 ; PUSHL -72(R7) ;TERM_CHAN ; CLRL -(SP) ;-(SP) ; CALLS #12, G^SYS$QIOW ;#12, SYS$QIOW ; MOVL R0, R6 ;R0, STATUS ; BLBC R6, 20$ ;STATUS, 20$ ; 0916 BBC #6, 870(R7), 19$ ;#6, OLD_PARITY+6, 19$ ; 0919 TSTB 870(R7) ;OLD_PARITY+6 ; 0922 BGEQ 18$ ;18$ ; MOVL #3, W^PARITY_TYPE ;#3, PARITY_TYPE ; 0924 RET ; ; 18$: MOVL #2, W^PARITY_TYPE ;#2, PARITY_TYPE ; 0926 RET ; ; 0922 19$: CLRL W^PARITY_TYPE ;PARITY_TYPE ; 0929 20$: RET ; ; 0933 ; Routine Size: 651 bytes, Routine Base: $CODE$ + 0000 ; 0934 1 ; 0935 1 %SBTTL 'SET_TRANS_TERM - Set new transfer terminal line' ; 0936 1 ; 0937 1 GLOBAL ROUTINE SET_TRANS_TERM (NEW_NAME) = ; 0938 1 ; 0939 1 !++ ; 0940 1 ! FUNCTIONAL DESCRIPTION: ; 0941 1 ! ; 0942 1 ! This routine will validate the terminal name that a user wishes to set ; 0943 1 ! as the transfer line. If the name is valid, it will store the physical ; 0944 1 ! name in TERM_DESC, and open the new terminal line. ; 0945 1 ! ; 0946 1 ! CALLING SEQUENCE: ; 0947 1 ! ; 0948 1 ! STATUS = SET_TRANS_TERM (NEW_NAME); ; 0949 1 ! ; 0950 1 ! INPUT PARAMETERS: ; 0951 1 ! ; 0952 1 ! NEW_NAME - Descriptor for new terminal name. ; 0953 1 ! ; 0954 1 ! IMPLICIT INPUTS: ; 0955 1 ! ; 0956 1 ! TERM_OPEN_FLAG, TERM_CHAN ; 0957 1 ! ; 0958 1 ! OUPTUT PARAMETERS: ; 0959 1 ! ; 0960 1 ! None. ; 0961 1 ! ; 0962 1 ! IMPLICIT OUTPUTS: ; 0963 1 ! ; 0964 1 ! None. ; 0965 1 ! ; 0966 1 ! COMPLETION CODES: ; 0967 1 ! ; 0968 1 ! True/false status value - error code ; 0969 1 ! ; 0970 1 ! SIDE EFFECTS: ; 0971 1 ! ; 0972 1 ! None. ; 0973 1 ! ; 0974 1 !-- ; 0975 1 ; 0976 2 BEGIN ; 0977 2 ; 0978 2 MAP ; 0979 2 NEW_NAME : REF BLOCK [8, BYTE]; ! Descriptor for new name ; 0980 2 ; 0981 2 LOCAL ; 0982 2 NEW_CHAN, ! Temp for channel to new terminal ; 0983 2 RSL_DESC : BLOCK [8, BYTE], ! Descriptor for physical name ; 0984 2 RSL_NAME : VECTOR [TERM_NAME_SIZE, BYTE], ! String of resulting name ; 0985 2 DEV_TYPE, ! Device type ; 0986 2 STATUS; ! Random status values ; 0987 2 ; 0988 2 ! ; 0989 2 ! Set up descriptor ; 0990 2 ! ; 0991 2 RSL_DESC [DSC$B_CLASS] = DSC$K_CLASS_S; ; 0992 2 RSL_DESC [DSC$B_DTYPE] = DSC$K_DTYPE_T; ; 0993 2 RSL_DESC [DSC$W_LENGTH] = TERM_NAME_SIZE; ! Maximum length ; 0994 2 RSL_DESC [DSC$A_POINTER] = RSL_NAME; ! Where to store name ; 0995 2 STATUS = GET_DEV_CHAR (.NEW_NAME, RSL_DESC, DEV_TYPE); ; 0996 2 ; 0997 2 IF NOT .STATUS THEN RETURN .STATUS; ; 0998 2 ; 0999 2 IF .DEV_TYPE NEQ DC$_TERM THEN RETURN KER_LINTERM; ; 1000 2 ; 1001 2 ! ; 1002 2 ! The device is a terminal, now make sure we can get it. ; 1003 2 ! ; 1004 2 STATUS = $ASSIGN (CHAN = NEW_CHAN, DEVNAM = RSL_DESC); ; 1005 2 ; 1006 2 IF NOT .STATUS THEN RETURN .STATUS; ; 1007 2 ; 1008 2 ! ; 1009 2 ! We have the new terminal. Deassign the old one and copy the new data ; 1010 2 ! ; 1011 2 $DASSGN (CHAN = .TERM_CHAN); ; 1012 2 TERM_CHAN = .NEW_CHAN; ; 1013 2 CH$COPY (.RSL_DESC [DSC$W_LENGTH], CH$PTR (RSL_NAME), CHR_NUL, TERM_NAME_SIZE, ; 1014 2 CH$PTR (TERM_NAME)); ; 1015 2 TERM_DESC [DSC$W_LENGTH] = .RSL_DESC [DSC$W_LENGTH]; ; 1016 2 RETURN KER_NORMAL; ; 1017 1 END; ! End of SET_TRANS_TERM .EXTRN SYS$DASSGN .ENTRY SET_TRANS_TERM, ^M ;SET_TRANS_TERM, Save R2,R3,R4,R5 ; 0937 SUBL2 #32, SP ;#32, SP ; MOVL #17694736, 24(SP) ;#17694736, RSL_DESC ; 0993 MOVAB 8(SP), 28(SP) ;RSL_NAME, RSL_DESC+4 ; 0994 PUSHL SP ;SP ; 0995 PUSHAB 28(SP) ;RSL_DESC ; PUSHL 4(AP) ;NEW_NAME ; CALLS #3, W^U.39 ;#3, U.39 ; BLBC R0, 2$ ;STATUS, 2$ ; 0997 CMPL (SP), #66 ;DEV_TYPE, #66 ; 0999 BEQL 1$ ;1$ ; MOVL #134316242, R0 ;#134316242, R0 ; RET ; ; 1$: CLRQ -(SP) ;-(SP) ; 1004 PUSHAB 12(SP) ;NEW_CHAN ; PUSHAB 36(SP) ;RSL_DESC ; CALLS #4, G^SYS$ASSIGN ;#4, SYS$ASSIGN ; BLBC R0, 2$ ;STATUS, 2$ ; 1006 PUSHL W^U.4 ;U.4 ; 1011 CALLS #1, G^SYS$DASSGN ;#1, SYS$DASSGN ; MOVL 4(SP), W^U.4 ;NEW_CHAN, U.4 ; 1012 MOVC5 24(SP), 8(SP), #0, #16, W^U.14 ;RSL_DESC, RSL_NAME, #0, #16, U.14 ; 1014 MOVW 24(SP), W^TERM_DESC ;RSL_DESC, TERM_DESC ; 1015 MOVL #134316043, R0 ;#134316043, R0 ; 1016 2$: RET ; ; 1017 ; Routine Size: 110 bytes, Routine Base: $CODE$ + 028B ; 1018 1 ; 1019 1 %SBTTL 'TERM_DUMP - This routine will dump text on the terminal' ; 1020 1 ; 1021 1 GLOBAL ROUTINE TERM_DUMP (BUFFER_ADDRESS, BUFFER_COUNT) : NOVALUE = ; 1022 1 ; 1023 1 !++ ; 1024 1 ! FUNCTIONAL DESCRIPTION: ; 1025 1 ! ; 1026 1 ! This routine will dump the text specified on the user's terminal. ; 1027 1 ! It will then return to the caller. ; 1028 1 ! ; 1029 1 ! CALLING SEQUENCE: ; 1030 1 ! ; 1031 1 ! TERM_DUMP( TEXT-BUFFER-ADDRESS, COUNT) ; 1032 1 ! ; 1033 1 ! INPUT PARAMETERS: ; 1034 1 ! ; 1035 1 ! TEXT-BUFFER-ADDRESS - Address of the buffer containing the characters. ; 1036 1 ! ; 1037 1 ! COUNT - Count of the characters in the buffer. ; 1038 1 ! ; 1039 1 ! IMPLICIT INPUTS: ; 1040 1 ! ; 1041 1 ! None. ; 1042 1 ! ; 1043 1 ! OUPTUT PARAMETERS: ; 1044 1 ! ; 1045 1 ! None. ; 1046 1 ! ; 1047 1 ! IMPLICIT OUTPUTS: ; 1048 1 ! ; 1049 1 ! None. ; 1050 1 ! ; 1051 1 ! COMPLETION CODES: ; 1052 1 ! ; 1053 1 ! None. ; 1054 1 ! ; 1055 1 ! SIDE EFFECTS: ; 1056 1 ! ; 1057 1 ! None. ; 1058 1 ! ; 1059 1 !-- ; 1060 1 ; 1061 2 BEGIN ; 1062 2 ; 1063 2 LOCAL ; 1064 2 TEXT_DESC : BLOCK [8, BYTE]; ; 1065 2 ; 1066 2 IF NOT .CONNECT_FLAG ; 1067 2 THEN ; 1068 3 BEGIN ; 1069 3 ; 1070 3 IF .SYS_OUTPUT_OPEN ; 1071 3 THEN ; P 1072 3 $QIOW (CHAN = .SYS_OUTPUT_CHAN, EFN = CONS_O_EFN, ; 1073 4 FUNC = IO$_WRITEVBLK, P1 = .BUFFER_ADDRESS, P2 = .BUFFER_COUNT, P4 = 0) ; 1074 3 ELSE ; 1075 4 BEGIN ; 1076 4 TEXT_DESC [DSC$B_CLASS] = DSC$K_CLASS_S; ; 1077 4 TEXT_DESC [DSC$B_DTYPE] = DSC$K_DTYPE_T; ; 1078 4 TEXT_DESC [DSC$W_LENGTH] = .BUFFER_COUNT; ; 1079 4 TEXT_DESC [DSC$A_POINTER] = .BUFFER_ADDRESS; ; 1080 4 LIB$PUT_OUTPUT (TEXT_DESC); ; 1081 3 END; ; 1082 3 ; 1083 2 END; ; 1084 2 ; 1085 1 END; ! End of TERM_DUMP U.38: .ENTRY TERM_DUMP, ^M<> ;TERM_DUMP, Save nothing ; 1021 SUBL2 #8, SP ;#8, SP ; BLBS W^CONNECT_FLAG, 2$ ;CONNECT_FLAG, 2$ ; 1066 BLBC W^U.7, 1$ ;U.7, 1$ ; 1070 CLRQ -(SP) ;-(SP) ; 1073 CLRQ -(SP) ;-(SP) ; MOVQ 4(AP), -(SP) ;BUFFER_ADDRESS, -(SP) ; CLRQ -(SP) ;-(SP) ; MOVQ #48, -(SP) ;#48, -(SP) ; PUSHL W^U.6 ;U.6 ; PUSHL #6 ;#6 ; CALLS #12, G^SYS$QIOW ;#12, SYS$QIOW ; RET ; ; 1$: MOVW #270, 2(SP) ;#270, TEXT_DESC+2 ; 1077 MOVW 8(AP), (SP) ;BUFFER_COUNT, TEXT_DESC ; 1078 MOVL 4(AP), 4(SP) ;BUFFER_ADDRESS, TEXT_DESC+4 ; 1079 PUSHL SP ;SP ; 1080 CALLS #1, G^LIB$PUT_OUTPUT ;#1, LIB$PUT_OUTPUT ; 2$: RET ; ; 1085 ; Routine Size: 67 bytes, Routine Base: $CODE$ + 02F9 ; 1086 1 ; 1087 1 %SBTTL 'DBG_DUMP - This routine will dump text on the terminal' ; 1088 1 ; 1089 1 GLOBAL ROUTINE DBG_DUMP (BUFFER_ADDRESS, BUFFER_COUNT) : NOVALUE = ; 1090 1 ; 1091 1 !++ ; 1092 1 ! FUNCTIONAL DESCRIPTION: ; 1093 1 ! ; 1094 1 ! This routine will dump the text specified on the user's terminal. ; 1095 1 ! It will then return to the caller. ; 1096 1 ! ; 1097 1 ! CALLING SEQUENCE: ; 1098 1 ! ; 1099 1 ! DBG_DUMP( TEXT-BUFFER-ADDRESS, COUNT) ; 1100 1 ! ; 1101 1 ! INPUT PARAMETERS: ; 1102 1 ! ; 1103 1 ! TEXT-BUFFER-ADDRESS - Address of the buffer containing the characters. ; 1104 1 ! ; 1105 1 ! COUNT - Count of the characters in the buffer. ; 1106 1 ! ; 1107 1 ! IMPLICIT INPUTS: ; 1108 1 ! ; 1109 1 ! None. ; 1110 1 ! ; 1111 1 ! OUPTUT PARAMETERS: ; 1112 1 ! ; 1113 1 ! None. ; 1114 1 ! ; 1115 1 ! IMPLICIT OUTPUTS: ; 1116 1 ! ; 1117 1 ! None. ; 1118 1 ! ; 1119 1 ! COMPLETION CODES: ; 1120 1 ! ; 1121 1 ! None. ; 1122 1 ! ; 1123 1 ! SIDE EFFECTS: ; 1124 1 ! ; 1125 1 ! None. ; 1126 1 ! ; 1127 1 !-- ; 1128 1 ; 1129 2 BEGIN ; 1130 2 ; 1131 2 LOCAL ; 1132 2 STATUS, ![013] Status from $PUT ; 1133 2 TEXT_DESC : BLOCK [8, BYTE]; ; 1134 2 ; 1135 2 IF NOT .CONNECT_FLAG AND NOT .DEBUG_REDIRECTED ![013] Check where debugging should go ; 1136 2 THEN ; 1137 3 BEGIN ; 1138 3 ; 1139 3 IF .SYS_OUTPUT_OPEN ; 1140 3 THEN ; P 1141 3 $QIOW (CHAN = .SYS_OUTPUT_CHAN, EFN = CONS_O_EFN, ; 1142 4 FUNC = IO$_WRITEVBLK OR IO$M_NOFORMAT, P1 = .BUFFER_ADDRESS, P2 = .BUFFER_COUNT) ; 1143 3 ELSE ; 1144 4 BEGIN ; 1145 4 TEXT_DESC [DSC$B_CLASS] = DSC$K_CLASS_S; ; 1146 4 TEXT_DESC [DSC$B_DTYPE] = DSC$K_DTYPE_T; ; 1147 4 TEXT_DESC [DSC$W_LENGTH] = .BUFFER_COUNT; ; 1148 4 TEXT_DESC [DSC$A_POINTER] = .BUFFER_ADDRESS; ; 1149 4 LIB$PUT_OUTPUT (TEXT_DESC); ; 1150 3 END; ; 1151 3 ; 1152 3 END ; 1153 2 ELSE ; 1154 2 ; 1155 2 IF .DEBUG_REDIRECTED ; 1156 2 THEN ; 1157 3 BEGIN ; 1158 3 ; 1159 3 EXTERNAL ROUTINE ; 1160 3 LOG_CHAR, ! Routine to write a character to log file ; 1161 3 LOG_CLOSE; ! Routine to close log file ; 1162 3 ; 1163 3 LOCAL ; 1164 3 POINTER; ; 1165 3 ; 1166 3 POINTER = CH$PTR (.BUFFER_ADDRESS); ; 1167 3 ; 1168 3 DECR I FROM .BUFFER_COUNT TO 1 DO ; 1169 3 ; 1170 3 IF NOT LOG_CHAR (CH$RCHAR_A (POINTER), DEBUG_RAB) ; 1171 3 THEN ; 1172 4 BEGIN ; 1173 4 LOG_CLOSE (DEBUG_FAB, DEBUG_RAB); ; 1174 4 DEBUG_REDIRECTED = FALSE; ; 1175 3 END; ; 1176 3 ; 1177 2 END; ; 1178 2 ; 1179 1 END; ! End of DBG_DUMP .EXTRN LOG_CHAR, LOG_CLOSE .ENTRY DBG_DUMP, ^M ;DBG_DUMP, Save R2,R3,R4 ; 1089 MOVAB W^U.25, R4 ;U.25, R4 ; SUBL2 #8, SP ;#8, SP ; BLBS W^CONNECT_FLAG, 2$ ;CONNECT_FLAG, 2$ ; 1135 BLBS (R4), 3$ ;DEBUG_REDIRECTED, 3$ ; BLBC -664(R4), 1$ ;SYS_OUTPUT_OPEN, 1$ ; 1139 CLRQ -(SP) ;-(SP) ; 1142 CLRQ -(SP) ;-(SP) ; MOVQ 4(AP), -(SP) ;BUFFER_ADDRESS, -(SP) ; CLRQ -(SP) ;-(SP) ; CLRL -(SP) ;-(SP) ; MOVZWL #304, -(SP) ;#304, -(SP) ; PUSHL -668(R4) ;SYS_OUTPUT_CHAN ; PUSHL #6 ;#6 ; CALLS #12, G^SYS$QIOW ;#12, SYS$QIOW ; RET ; ; 1$: MOVW #270, 2(SP) ;#270, TEXT_DESC+2 ; 1146 MOVW 8(AP), (SP) ;BUFFER_COUNT, TEXT_DESC ; 1147 MOVL 4(AP), 4(SP) ;BUFFER_ADDRESS, TEXT_DESC+4 ; 1148 PUSHL SP ;SP ; 1149 CALLS #1, G^LIB$PUT_OUTPUT ;#1, LIB$PUT_OUTPUT ; RET ; ; 1135 2$: BLBC (R4), 6$ ;DEBUG_REDIRECTED, 6$ ; 1155 3$: MOVL 4(AP), R3 ;BUFFER_ADDRESS, POINTER ; 1166 ADDL3 #1, 8(AP), R2 ;#1, BUFFER_COUNT, I ; 1168 BRB 5$ ;5$ ; 4$: PUSHAB -200(R4) ;DEBUG_RAB ; 1170 MOVZBL (R3)+, -(SP) ;(POINTER)+, -(SP) ; CALLS #2, W^LOG_CHAR ;#2, LOG_CHAR ; BLBS R0, 5$ ;R0, 5$ ; PUSHAB -200(R4) ;DEBUG_RAB ; 1173 PUSHAB -280(R4) ;DEBUG_FAB ; CALLS #2, W^LOG_CLOSE ;#2, LOG_CLOSE ; CLRL (R4) ;DEBUG_REDIRECTED ; 1174 5$: SOBGTR R2, 4$ ;I, 4$ ; 1170 6$: RET ; ; 1179 ; Routine Size: 127 bytes, Routine Base: $CODE$ + 033C ; 1180 1 ; 1181 1 %SBTTL 'GET_COMMAND - Get a command line' ; 1182 1 ; 1183 1 GLOBAL ROUTINE GET_COMMAND (CMD_DESC, PROMPT_DESC, CMD_LENGTH, ECHO_FLAG) = ; 1184 1 ; 1185 1 !++ ; 1186 1 ! FUNCTIONAL DESCRIPTION: ; 1187 1 ! ; 1188 1 ! This routine will get a command line from SYS$COMMAND:. If ; 1189 1 ! SYS$COMMAND is a terminal, it will do input using a QIO, which will ; 1190 1 ! allow input without echo if desired. If SYS$COMMAND is not a terminal, ; 1191 1 ! it will use LIB$GET_COMMAND. ; 1192 1 ! ; 1193 1 ! CALLING SEQUENCE: ; 1194 1 ! ; 1195 1 ! STATUS = GET_COMMAND (CMD_DESC, PROMPT_DESC, CMD_LENGTH, ECHO_FLAG); ; 1196 1 ! ; 1197 1 ! INPUT PARAMETERS: ; 1198 1 ! ; 1199 1 ! CMD_DESC - String descriptor for command being input ; 1200 1 ! PROMPT_DESC - String descriptor for prompt ; 1201 1 ! ECHO_FLAG - True if input should be echoed, false if not ; 1202 1 ! ; 1203 1 ! IMPLICIT INPUTS: ; 1204 1 ! ; 1205 1 ! SYS_COMMAND_OPEN - Flag whether SYS$COMMAND is open ; 1206 1 ! SYS_COMMAND_CHAN - Channel SYS$COMMAND is open on, if open ; 1207 1 ! ; 1208 1 ! OUPTUT PARAMETERS: ; 1209 1 ! ; 1210 1 ! CMD_LENGTH - Actual length of command input ; 1211 1 ! ; 1212 1 ! IMPLICIT OUTPUTS: ; 1213 1 ! ; 1214 1 ! None. ; 1215 1 ! ; 1216 1 ! COMPLETION CODES: ; 1217 1 ! ; 1218 1 ! Returns status value, true unless error has occured. ; 1219 1 ! ; 1220 1 ! SIDE EFFECTS: ; 1221 1 ! ; 1222 1 ! None. ; 1223 1 ! ; 1224 1 !-- ; 1225 1 ; 1226 2 BEGIN ; 1227 2 ; 1228 2 MAP ; 1229 2 CMD_DESC : REF BLOCK [8, BYTE], ! Where to put input ; 1230 2 PROMPT_DESC : REF BLOCK [8, BYTE]; ! Prompt string ; 1231 2 ; 1232 2 EXTERNAL ROUTINE ; 1233 2 TT_CRLF : NOVALUE, ! Type a CRLF ; 1234 2 STR$UPCASE : ADDRESSING_MODE (GENERAL), ! Upcase a string ; 1235 2 LIB$GET_COMMAND : ADDRESSING_MODE (GENERAL); ! Get string from SYS$COMMAND ; 1236 2 ; 1237 2 LOCAL ; 1238 2 QIO_FUNC, ! Function for QIO ; 1239 2 IOSB : VECTOR [4, WORD], ! IOSB for QIO ; 1240 2 STATUS; ! Random status values ; 1241 2 ; 1242 2 IF .SYS_COMMAND_OPEN ; 1243 2 THEN ; 1244 3 BEGIN ; 1245 3 QIO_FUNC = IO$_READPROMPT; ! Assume just read with prompt ; 1246 3 ; 1247 3 IF NOT .ECHO_FLAG THEN QIO_FUNC = IO$_READPROMPT OR IO$M_NOECHO; ! Don't echo input ; 1248 3 ; P 1249 3 STATUS = $QIOW (CHAN = .SYS_COMMAND_CHAN, FUNC = .QIO_FUNC, IOSB = IOSB, ; P 1250 3 P1 = .CMD_DESC [DSC$A_POINTER], P2 = .CMD_DESC [DSC$W_LENGTH], ; 1251 3 P5 = .PROMPT_DESC [DSC$A_POINTER], P6 = .PROMPT_DESC [DSC$W_LENGTH]); ; 1252 3 ; 1253 3 IF NOT .STATUS THEN RETURN .STATUS; ; 1254 3 ; 1255 3 ! ; 1256 3 ! If we didn't echo, then dump a CRLF so we look nice ; 1257 3 ! ; 1258 3 ; 1259 3 IF NOT .ECHO_FLAG THEN TT_CRLF (); ; 1260 3 ; 1261 3 IF .IOSB [0] ; 1262 3 THEN ; 1263 4 BEGIN ; 1264 4 .CMD_LENGTH = .IOSB [1]; ! Get actual length input ; 1265 4 ; 1266 4 IF .IOSB [3] EQL 1 AND .IOSB [2] EQL CHR_CTL_Z THEN RETURN RMS$_EOF; ; 1267 4 ; 1268 3 END; ; 1269 3 ; 1270 3 ! ; 1271 3 ! Upcase the resulting string ; 1272 3 ! ; 1273 3 STATUS = STR$UPCASE (.CMD_DESC, .CMD_DESC); ; 1274 3 ; 1275 3 IF NOT .STATUS THEN RETURN .STATUS; ; 1276 3 ; 1277 3 RETURN .IOSB [0]; ! Return resulting status ; 1278 2 END; ; 1279 2 ; 1280 2 ! ; 1281 2 ! Here if SYS$COMMAND is not open. Get the command via LIB$GET_COMMAND. ; 1282 2 ! ; 1283 2 RETURN LIB$GET_COMMAND (.CMD_DESC, .PROMPT_DESC, .CMD_LENGTH); ; 1284 1 END; ! End of GET_COMMAND .EXTRN TT_CRLF, STR$UPCASE, LIB$GET_COMMAND .ENTRY GET_COMMAND, ^M ;GET_COMMAND, Save R2,R3 ; 1183 SUBL2 #8, SP ;#8, SP ; BLBC W^U.11, 6$ ;U.11, 6$ ; 1242 MOVL #55, R1 ;#55, QIO_FUNC ; 1245 BLBS 16(AP), 1$ ;ECHO_FLAG, 1$ ; 1247 MOVZBL #119, R1 ;#119, QIO_FUNC ; 1$: MOVL 8(AP), R0 ;PROMPT_DESC, R0 ; 1251 MOVZWL (R0), -(SP) ;(R0), -(SP) ; PUSHL 4(R0) ;4(R0) ; CLRQ -(SP) ;-(SP) ; MOVL 4(AP), R2 ;CMD_DESC, R2 ; MOVZWL (R2), -(SP) ;(R2), -(SP) ; PUSHL 4(R2) ;4(R2) ; CLRQ -(SP) ;-(SP) ; PUSHAB 32(SP) ;IOSB ; PUSHL R1 ;QIO_FUNC ; PUSHL W^U.10 ;U.10 ; CLRL -(SP) ;-(SP) ; CALLS #12, G^SYS$QIOW ;#12, SYS$QIOW ; MOVL R0, R3 ;R0, STATUS ; BLBC R3, 4$ ;STATUS, 4$ ; 1253 BLBS 16(AP), 2$ ;ECHO_FLAG, 2$ ; 1259 CALLS #0, W^TT_CRLF ;#0, TT_CRLF ; 2$: BLBC (SP), 3$ ;IOSB, 3$ ; 1261 MOVZWL 2(SP), @12(AP) ;IOSB+2, @CMD_LENGTH ; 1264 CMPW 6(SP), #1 ;IOSB+6, #1 ; 1266 BNEQ 3$ ;3$ ; CMPW 4(SP), #26 ;IOSB+4, #26 ; BNEQ 3$ ;3$ ; MOVL #98938, R0 ;#98938, R0 ; RET ; ; 3$: PUSHL R2 ;R2 ; 1273 PUSHL R2 ;R2 ; CALLS #2, G^STR$UPCASE ;#2, STR$UPCASE ; MOVL R0, R3 ;R0, STATUS ; BLBS R3, 5$ ;STATUS, 5$ ; 1275 4$: MOVL R3, R0 ;STATUS, R0 ; RET ; ; 5$: MOVZWL (SP), R0 ;IOSB, R0 ; 1277 RET ; ; 6$: MOVQ 8(AP), -(SP) ;PROMPT_DESC, -(SP) ; 1283 PUSHL 4(AP) ;CMD_DESC ; CALLS #3, G^LIB$GET_COMMAND ;#3, LIB$GET_COMMAND ; RET ; ; 1284 ; Routine Size: 146 bytes, Routine Base: $CODE$ + 03BB ; 1285 1 ; 1286 1 %SBTTL 'Communcations line -- TERM_OPEN' ; 1287 1 ; 1288 1 GLOBAL ROUTINE TERM_OPEN (POST_QIOS) = ; 1289 1 ; 1290 1 !++ ; 1291 1 ! FUNCTIONAL DESCRIPTION: ; 1292 1 ! ; 1293 1 ! This routine will assign a channel that is used in the CONNECT ; 1294 1 ! processing and to send/receive a file from. ; 1295 1 ! ; 1296 1 ! CALLING SEQUENCE: ; 1297 1 ! ; 1298 1 ![054] TERM_OPEN(POST_QIOS); ; 1299 1 ! ; 1300 1 ! INPUT PARAMETERS: ; 1301 1 ! ; 1302 1 ![054] POST_QIOS - True if initial read QIO's should be posted. ; 1303 1 ! ; 1304 1 ! IMPLICIT INPUTS: ; 1305 1 ! ; 1306 1 ! TERM_DESC - Descriptor of a vector of ASCII characters that represent ; 1307 1 ! the name of the terminal to use. ; 1308 1 ! ; 1309 1 ! TERM_CHAN - Channel open to terminal if TERM_OPEN_FLAG is true. ; 1310 1 ! ; 1311 1 ! OUTPUT PARAMETERS: ; 1312 1 ! ; 1313 1 ! None. ; 1314 1 ! ; 1315 1 ! IMPLICIT OUTPUTS: ; 1316 1 ! ; 1317 1 ! TERM_CHAN - Channel number of the terminal line we are using. ; 1318 1 ! ; 1319 1 ! COMPLETION CODES: ; 1320 1 ! ; 1321 1 ! SS$_NORMAL or error condition. ; 1322 1 ! ; 1323 1 ! SIDE EFFECTS: ; 1324 1 ! ; 1325 1 ! None. ; 1326 1 ! ; 1327 1 !-- ; 1328 1 ; 1329 2 BEGIN ; 1330 2 ; 1331 2 EXTERNAL ROUTINE ; 1332 2 LOG_FAOL, ! Write FAOL style text ; 1333 2 LOG_OPEN; ! Open a log file ; 1334 2 ; 1335 2 EXTERNAL ; 1336 2 TRANSACTION_OPEN, ; 1337 2 TRANSACTION_DESC : BLOCK [8, BYTE], ; 1338 2 TRANSACTION_FAB : $FAB_DECL, ; 1339 2 TRANSACTION_RAB : $RAB_DECL; ; 1340 2 ; 1341 2 LOCAL ; 1342 2 STATUS; ; 1343 2 ; 1344 2 ! ; 1345 2 ! If the terminal is not open, we must open it first. ; 1346 2 ! ; 1347 2 ; 1348 2 IF NOT .TERM_OPEN_FLAG ; 1349 2 THEN ; 1350 2 ; 1351 2 IF .TERM_DESC [DSC$W_LENGTH] GTR 0 ; 1352 2 THEN ; 1353 3 BEGIN ; 1354 3 STATUS = SET_TRANS_TERM (TERM_DESC); ; 1355 3 ; 1356 3 IF NOT .STATUS THEN RETURN .STATUS; ; 1357 3 ; 1358 3 END ; 1359 2 ELSE ; 1360 2 RETURN KER_LINTERM; ; 1361 2 ; 1362 2 ! ; 1363 2 ! Set up connect flag properly ; 1364 2 ! ; 1365 2 ; 1366 2 IF CH$NEQ (.SYS_OUTPUT_DESC [DSC$W_LENGTH], CH$PTR (.SYS_OUTPUT_DESC [DSC$A_POINTER]), ; 1367 2 .TERM_DESC [DSC$W_LENGTH], CH$PTR (TERM_NAME), CHR_NUL) OR NOT .SYS_OUTPUT_OPEN ; 1368 2 THEN ; 1369 2 CONNECT_FLAG = FALSE ; 1370 2 ELSE ; 1371 2 CONNECT_FLAG = TRUE; ; 1372 2 ; 1373 2 ! ; 1374 2 ! If we aren't connected, remember the channel to use for the console I/O ; 1375 2 ! ; 1376 2 ; 1377 2 IF NOT .CONNECT_FLAG AND .SYS_OUTPUT_OPEN THEN CONS_CHAN = .SYS_OUTPUT_CHAN; ; 1378 2 ; 1379 2 ! ; 1380 2 ! Get current settings for transfer terminal ; 1381 2 ! ; P 1382 2 STATUS = $QIOW (CHAN = .TERM_CHAN, FUNC = IO$_SENSEMODE, P1 = OLD_TERM_CHAR, ; 1383 2 P2 = TC$_CHAR_LENGTH, IOSB = OLD_PARITY); ; 1384 2 ; 1385 2 IF NOT .STATUS ; 1386 2 THEN ; 1387 3 BEGIN ; 1388 3 LIB$SIGNAL (.STATUS); ; 1389 3 RETURN .STATUS; ; 1390 2 END; ; 1391 2 ; 1392 2 NEW_TERM_CHAR [TC$_BFR_SIZE] = .OLD_TERM_CHAR [TC$_BFR_SIZE]; ; 1393 2 NEW_TERM_CHAR [TC$_TYPE] = .OLD_TERM_CHAR [TC$_TYPE]; ; 1394 2 NEW_TERM_CHAR [TC$_CLASS] = .OLD_TERM_CHAR [TC$_CLASS]; ; 1395 2 NEW_TERM_CHAR [TC$_PAGE_LEN] = .OLD_TERM_CHAR [TC$_PAGE_LEN]; ; 1396 3 NEW_TERM_CHAR [TC$_CHAR] = (.OLD_TERM_CHAR [TC$_CHAR] OR TT$M_NOBRDCST) AND NOT (TT$M_CRFILL OR ; 1397 2 TT$M_LFFILL OR TT$M_WRAP OR TT$M_NOTYPEAHD); ; 1398 2 ![006] We do not want to use eightbit if using parity ; 1399 2 ; 1400 2 IF .PARITY_TYPE EQL PR_NONE ; 1401 2 THEN ; 1402 2 NEW_TERM_CHAR [TC$_CHAR] = .NEW_TERM_CHAR [TC$_CHAR] OR TT$M_EIGHTBIT ; 1403 2 ELSE ; 1404 2 NEW_TERM_CHAR [TC$_CHAR] = .NEW_TERM_CHAR [TC$_CHAR] AND NOT TT$M_EIGHTBIT; ; 1405 2 ; 1406 2 NEW_TERM_CHAR [TC$_CHAR_2] = .OLD_TERM_CHAR [TC$_CHAR_2] OR TT2$M_XON; ; P 1407 2 STATUS = $QIOW (CHAN = .TERM_CHAN, FUNC = IO$_SETMODE, P1 = NEW_TERM_CHAR, ; 1408 2 P2 = TC$_CHAR_LENGTH, P5 = TT$M_ALTRPAR); ; 1409 2 ; 1410 2 IF NOT .STATUS ; 1411 2 THEN ; 1412 3 BEGIN ; 1413 3 LIB$SIGNAL (.STATUS); ; 1414 3 RETURN .STATUS; ; 1415 2 END; ; 1416 2 ; 1417 2 TERM_FLAG = TRUE; ! Terminal now open ; 1418 2 TERM_FIRST_TIME = TRUE; ! Flag first time QIO should clear input ; 1419 2 FORCE_TIMEOUT = FALSE; ![021] Don't timeout for no reason ; 1420 2 FORCE_ABORT = FALSE; ! Don't abort yet ; 1421 2 ! ; 1422 2 ! Now post the initial receive QIO ; 1423 2 ! ; 1424 2 ; 1425 2 IF .POST_QIOS ![054] Need the QIO's? ; 1426 2 THEN ; 1427 3 BEGIN ; 1428 3 STATUS = DO_RECEIVE_QIO (); ; 1429 3 ; 1430 3 IF NOT .STATUS ; 1431 3 THEN ; 1432 4 BEGIN ; 1433 4 LIB$SIGNAL (.STATUS); ; 1434 4 RETURN KER_RECERR; ; 1435 3 END; ; 1436 3 ; 1437 3 ! ; 1438 3 ! Also post the QIO for the console ; 1439 3 ! ; 1440 3 ; 1441 3 IF NOT .CONNECT_FLAG AND .SYS_OUTPUT_OPEN ; 1442 3 THEN ; 1443 4 BEGIN ; 1444 4 STATUS = DO_CONS_QIO (); ; 1445 4 ; 1446 4 IF NOT .STATUS ; 1447 4 THEN ; 1448 5 BEGIN ; 1449 5 LIB$SIGNAL (.STATUS); ; 1450 5 $CANCEL (CHAN = .TERM_CHAN); ; 1451 5 $DASSGN (CHAN = .TERM_CHAN); ; 1452 5 RETURN KER_RECERR; ; 1453 4 END; ; 1454 4 ; 1455 3 END; ; 1456 3 ; 1457 2 END; ; 1458 2 ; 1459 2 ! ; 1460 2 ! Open any debugging log file ; 1461 2 ! ; 1462 2 ; 1463 2 IF .DEBUG_DESC [DSC$W_LENGTH] GTR 0 ; 1464 2 THEN ; 1465 2 ; 1466 2 IF LOG_OPEN (DEBUG_DESC, DEBUG_FAB, DEBUG_RAB) ; 1467 2 THEN ; 1468 2 DEBUG_REDIRECTED = TRUE ; 1469 2 ELSE ; 1470 2 DEBUG_REDIRECTED = FALSE ; 1471 2 ; 1472 2 ELSE ; 1473 2 DEBUG_REDIRECTED = FALSE; ; 1474 2 ; 1475 2 IF .TRANSACTION_DESC [DSC$W_LENGTH] GTR 0 ; 1476 2 THEN ; 1477 2 ; 1478 2 IF LOG_OPEN (TRANSACTION_DESC, TRANSACTION_FAB, TRANSACTION_RAB) ; 1479 2 THEN ; 1480 3 BEGIN ; 1481 3 TRANSACTION_OPEN = TRUE; ; 1482 3 LOG_FAOL (%ASCID'!-!-!11%D!/!-!%T!_Starting transaction log in file !AS!/', ; 1483 3 UPLIT (0, TRANSACTION_DESC), TRANSACTION_RAB); ; 1484 3 END ; 1485 2 ELSE ; 1486 2 TRANSACTION_OPEN = FALSE ; 1487 2 ; 1488 2 ELSE ; 1489 2 TRANSACTION_OPEN = FALSE; ; 1490 2 ; 1491 2 RETURN KER_NORMAL; ; 1492 1 END; ! End of TERM_OPEN .PSECT $PLIT$,NOWRT,NOEXE,2 .BLKB 2 P.AAR: .ASCII \!-!-!11%D!/!-!%T!_Starting transaction log in file !AS!/\ ; ; P.AAQ: .LONG 17694776 ; ; .ADDRESS P.AAR ; ; P.AAS: .LONG 0 ; ; .ADDRESS TRANSACTION_DESC ; ; .EXTRN LOG_FAOL, LOG_OPEN, TRANSACTION_OPEN, TRANSACTION_DESC, TRANSACTION_FAB, TRANSACTION_RAB .EXTRN SYS$CANCEL .PSECT $CODE$,NOWRT,2 .ENTRY TERM_OPEN, ^M ; ; MOVAB G^SYS$QIOW, R9 ;SYS$QIOW, R9 ; MOVAB W^CONNECT_FLAG, R8 ;CONNECT_FLAG, R8 ; MOVAB G^LIB$SIGNAL, R7 ;LIB$SIGNAL, R7 ; MOVAB W^TERM_DESC, R6 ;TERM_DESC, R6 ; MOVAB W^U.31+4, R5 ;U.31+4, R5 ; BLBS -856(R5), 2$ ;TERM_OPEN_FLAG, 2$ ; 1348 TSTW (R6) ;TERM_DESC ; 1351 BEQL 1$ ;1$ ; PUSHL R6 ;R6 ; 1354 CALLS #1, W^SET_TRANS_TERM ;#1, SET_TRANS_TERM ; MOVL R0, R4 ;R0, STATUS ; BLBS R4, 2$ ;STATUS, 2$ ; 1356 BRW 10$ ;10$ ; 1$: MOVL #134316242, R0 ;#134316242, R0 ; 1360 RET ; ; 2$: CMPC5 -928(R5), @-924(R5), #0, (R6), - ;SYS_OUTPUT_DESC, @SYS_OUTPUT_DESC+4, #0, TERM_DESC, TERM_NAME ; 1366 -888(R5) ; ; BNEQ 3$ ;3$ ; BLBS -948(R5), 4$ ;SYS_OUTPUT_OPEN, 4$ ; 1367 3$: CLRL (R8) ;CONNECT_FLAG ; 1369 BRB 5$ ;5$ ; 4$: MOVL #1, (R8) ;#1, CONNECT_FLAG ; 1371 5$: BLBS (R8), 6$ ;CONNECT_FLAG, 6$ ; 1377 BLBC -948(R5), 6$ ;SYS_OUTPUT_OPEN, 6$ ; MOVL -952(R5), -956(R5) ;SYS_OUTPUT_CHAN, CONS_CHAN ; 6$: CLRQ -(SP) ;-(SP) ; 1383 CLRQ -(SP) ;-(SP) ; PUSHL #12 ;#12 ; PUSHAB -16(R5) ;OLD_TERM_CHAR ; CLRQ -(SP) ;-(SP) ; PUSHAB -24(R5) ;OLD_PARITY ; PUSHL #39 ;#39 ; PUSHL -960(R5) ;TERM_CHAN ; CLRL -(SP) ;-(SP) ; CALLS #12, (R9) ;#12, SYS$QIOW ; MOVL R0, R4 ;R0, STATUS ; BLBC R4, 9$ ;STATUS, 9$ ; 1385 MOVL -16(R5), -4(R5) ;OLD_TERM_CHAR, NEW_TERM_CHAR ; 1394 MOVB -9(R5), 3(R5) ;OLD_TERM_CHAR+7, NEW_TERM_CHAR+7 ; 1395 EXTZV #0, #24, -12(R5), R0 ;#0, #24, OLD_TERM_CHAR+4, R0 ; 1396 BICL2 #3588, R0 ;#3588, R0 ; BISL3 #131072, R0, R1 ;#131072, R0, R1 ; INSV R1, #0, #24, (R5) ;R1, #0, #24, NEW_TERM_CHAR+4 ; TSTL W^PARITY_TYPE ;PARITY_TYPE ; 1400 BNEQ 7$ ;7$ ; EXTZV #0, #24, (R5), R0 ;#0, #24, NEW_TERM_CHAR+4, R0 ; 1402 INSV #1, #15, #1, R0 ;#1, #15, #1, R0 ; BRB 8$ ;8$ ; 7$: EXTZV #0, #24, (R5), R0 ;#0, #24, NEW_TERM_CHAR+4, R0 ; 1404 INSV #0, #15, #1, R0 ;#0, #15, #1, R0 ; 8$: INSV R0, #0, #24, (R5) ;R0, #0, #24, NEW_TERM_CHAR+4 ; BISL3 #32, -8(R5), 4(R5) ;#32, OLD_TERM_CHAR+8, NEW_TERM_CHAR+8 ; 1406 MOVQ #32, -(SP) ;#32, -(SP) ; 1408 CLRQ -(SP) ;-(SP) ; PUSHL #12 ;#12 ; PUSHAB -4(R5) ;NEW_TERM_CHAR ; CLRQ -(SP) ;-(SP) ; MOVQ #35, -(SP) ;#35, -(SP) ; PUSHL -960(R5) ;TERM_CHAN ; CLRL -(SP) ;-(SP) ; CALLS #12, (R9) ;#12, SYS$QIOW ; MOVL R0, R4 ;R0, STATUS ; BLBS R4, 11$ ;STATUS, 11$ ; 1410 9$: PUSHL R4 ;STATUS ; 1413 CALLS #1, (R7) ;#1, LIB$SIGNAL ; 10$: MOVL R4, R0 ;STATUS, R0 ; 1414 RET ; ; 11$: MOVL #1, 16(R6) ;#1, TERM_FLAG ; 1417 MOVL #1, -964(R5) ;#1, TERM_FIRST_TIME ; 1418 CLRQ -972(R5) ;FORCE_ABORT ; 1420 BLBC 4(AP), 14$ ;POST_QIOS, 14$ ; 1425 CALLS #0, W^U.40 ;#0, U.40 ; 1428 MOVL R0, R4 ;R0, STATUS ; BLBS R4, 12$ ;STATUS, 12$ ; 1430 PUSHL R4 ;STATUS ; 1433 CALLS #1, (R7) ;#1, LIB$SIGNAL ; BRB 13$ ;13$ ; 1434 12$: BLBS (R8), 14$ ;CONNECT_FLAG, 14$ ; 1441 BLBC -948(R5), 14$ ;SYS_OUTPUT_OPEN, 14$ ; CALLS #0, W^U.41 ;#0, U.41 ; 1444 MOVL R0, R4 ;R0, STATUS ; BLBS R4, 14$ ;STATUS, 14$ ; 1446 PUSHL R4 ;STATUS ; 1449 CALLS #1, (R7) ;#1, LIB$SIGNAL ; PUSHL -960(R5) ;TERM_CHAN ; 1450 CALLS #1, G^SYS$CANCEL ;#1, SYS$CANCEL ; PUSHL -960(R5) ;TERM_CHAN ; 1451 CALLS #1, G^SYS$DASSGN ;#1, SYS$DASSGN ; 13$: MOVL #134316266, R0 ;#134316266, R0 ; 1452 RET ; ; 14$: TSTW -16(R6) ;DEBUG_DESC ; 1463 BEQL 15$ ;15$ ; PUSHAB -484(R5) ;DEBUG_RAB ; 1466 PUSHAB -564(R5) ;DEBUG_FAB ; PUSHAB -16(R6) ;DEBUG_DESC ; CALLS #3, W^LOG_OPEN ;#3, LOG_OPEN ; BLBC R0, 15$ ;R0, 15$ ; MOVL #1, -284(R5) ;#1, DEBUG_REDIRECTED ; 1468 BRB 16$ ;16$ ; 15$: CLRL -284(R5) ;DEBUG_REDIRECTED ; 1473 16$: TSTW W^TRANSACTION_DESC ;TRANSACTION_DESC ; 1475 BEQL 17$ ;17$ ; PUSHAB W^TRANSACTION_RAB ;TRANSACTION_RAB ; 1478 PUSHAB W^TRANSACTION_FAB ;TRANSACTION_FAB ; PUSHAB W^TRANSACTION_DESC ;TRANSACTION_DESC ; CALLS #3, W^LOG_OPEN ;#3, LOG_OPEN ; BLBC R0, 17$ ;R0, 17$ ; MOVL #1, W^TRANSACTION_OPEN ;#1, TRANSACTION_OPEN ; 1481 PUSHAB W^TRANSACTION_RAB ;TRANSACTION_RAB ; 1482 PUSHAB W^P.AAS ;P.AAS ; 1483 PUSHAB W^P.AAQ ;P.AAQ ; 1482 CALLS #3, W^LOG_FAOL ;#3, LOG_FAOL ; BRB 18$ ;18$ ; 1478 17$: CLRL W^TRANSACTION_OPEN ;TRANSACTION_OPEN ; 1489 18$: MOVL #134316043, R0 ;#134316043, R0 ; 1491 RET ; ; 1492 ; Routine Size: 436 bytes, Routine Base: $CODE$ + 044D ; 1493 1 ; 1494 1 %SBTTL 'Communications line -- TERM_CLOSE' ; 1495 1 ; 1496 1 GLOBAL ROUTINE TERM_CLOSE = ; 1497 1 ; 1498 1 !++ ; 1499 1 ! FUNCTIONAL DESCRIPTION: ; 1500 1 ! ; 1501 1 ! This routine will deassign the channel that was assigned by ; 1502 1 ! TERM_OPEN. ; 1503 1 ! ; 1504 1 ! CALLING SEQUENCE: ; 1505 1 ! ; 1506 1 ! TERM_CLOSE(); ; 1507 1 ! ; 1508 1 ! INPUT PARAMETERS: ; 1509 1 ! ; 1510 1 ! None. ; 1511 1 ! ; 1512 1 ! IMPLICIT INPUTS: ; 1513 1 ! ; 1514 1 ! TERM_CHAN - Channel number to deassign. ; 1515 1 ! ; 1516 1 ! OUTPUT PARAMETERS: ; 1517 1 ! ; 1518 1 ! None. ; 1519 1 ! ; 1520 1 ! IMPLICIT OUTPUTS: ; 1521 1 ! ; 1522 1 ! None. ; 1523 1 ! ; 1524 1 ! COMPLETION CODES: ; 1525 1 ! ; 1526 1 ! SS$_NORMAL or error condition. ; 1527 1 ! ; 1528 1 ! SIDE EFFECTS: ; 1529 1 ! ; 1530 1 ! None. ; 1531 1 ! ; 1532 1 !-- ; 1533 1 ; 1534 2 BEGIN ; 1535 2 ; 1536 2 EXTERNAL ROUTINE ; 1537 2 LOG_FAOL, ! Routine to dump FAOL string ; 1538 2 LOG_CLOSE; ! Routine to close log file ; 1539 2 ; 1540 2 EXTERNAL ; 1541 2 TRANSACTION_OPEN, ; 1542 2 TRANSACTION_DESC : BLOCK [8, BYTE], ; 1543 2 TRANSACTION_FAB, ; 1544 2 TRANSACTION_RAB; ; 1545 2 ; 1546 2 LOCAL ; 1547 2 PAR, ! Parity being set ; 1548 2 STATUS; ! Status returned by system service ; 1549 2 ; 1550 2 STATUS = $CANCEL (CHAN = .TERM_CHAN); ! Kill pending QIO ; 1551 2 ; 1552 2 IF .SYS_OUTPUT_OPEN THEN $CANCEL (CHAN = .CONS_CHAN); ; 1553 2 ; 1554 2 CONNECT_FLAG = FALSE; ; 1555 2 PAR = (.OLD_PARITY [6, 0, 8, 0] AND (TT$M_ODD OR TT$M_PARITY)) OR TT$M_ALTRPAR; ; 1556 2 ![061] Only set parity ; P 1557 2 STATUS = $QIOW (CHAN = .TERM_CHAN, FUNC = IO$_SETMODE, P1 = OLD_TERM_CHAR, ; 1558 2 P2 = TC$_CHAR_LENGTH, P5 = .PAR); ; 1559 2 ; 1560 2 IF NOT .STATUS ; 1561 2 THEN ; 1562 3 BEGIN ; 1563 3 LIB$SIGNAL (.STATUS); ; 1564 3 RETURN .STATUS; ; 1565 2 END; ; 1566 2 ; 1567 2 ! ; 1568 2 ! Flag terminal parameters are reset ; 1569 2 ! ; 1570 2 TERM_FLAG = FALSE; ; 1571 2 ! ; 1572 2 ! Close the debugging log file ; 1573 2 ! ; 1574 2 ; 1575 2 IF .DEBUG_REDIRECTED ; 1576 2 THEN ; 1577 3 BEGIN ; 1578 3 LOG_CLOSE (DEBUG_FAB, DEBUG_RAB); ; 1579 3 DEBUG_REDIRECTED = FALSE; ; 1580 2 END; ; 1581 2 ; 1582 2 ! ; 1583 2 ! Close the transaction log ; 1584 2 ! ; 1585 2 ; 1586 2 IF .TRANSACTION_OPEN ; 1587 2 THEN ; 1588 3 BEGIN ; 1589 3 LOG_FAOL (%ASCID'!-!-!11%D!/!-!%T!_Closing transaction log file !AS!/', ; 1590 3 UPLIT (0, TRANSACTION_DESC), TRANSACTION_RAB); ; 1591 3 LOG_CLOSE (TRANSACTION_FAB, TRANSACTION_RAB); ; 1592 3 TRANSACTION_OPEN = FALSE; ; 1593 2 END; ; 1594 2 ; 1595 2 ! ; 1596 2 ![006] If all worked, say so ; 1597 2 ! ; 1598 2 RETURN KER_NORMAL ; 1599 1 END; ! End of TERM_CLOSE .PSECT $PLIT$,NOWRT,NOEXE,2 P.AAU: .ASCII \!-!-!11%D!/!-!%T!_Closing transaction log file !AS!/\ ; ; P.AAT: .LONG 17694772 ; ; .ADDRESS P.AAU ; ; P.AAV: .LONG 0 ; ; .ADDRESS TRANSACTION_DESC ; ; .PSECT $CODE$,NOWRT,2 .ENTRY TERM_CLOSE, ^M ;TERM_CLOSE, Save R2,R3,R4 ; 1496 MOVAB G^SYS$CANCEL, R4 ;SYS$CANCEL, R4 ; MOVAB W^U.4, R3 ;U.4, R3 ; PUSHL (R3) ;TERM_CHAN ; 1550 CALLS #1, (R4) ;#1, SYS$CANCEL ; MOVL R0, R2 ;R0, STATUS ; BLBC 12(R3), 1$ ;SYS_OUTPUT_OPEN, 1$ ; 1552 PUSHL 4(R3) ;CONS_CHAN ; CALLS #1, (R4) ;#1, SYS$CANCEL ; 1$: CLRL W^CONNECT_FLAG ;CONNECT_FLAG ; 1554 MOVZBL 942(R3), R0 ;OLD_PARITY+6, R0 ; 1555 BICL2 #-193, R0 ;#-193, R0 ; BISB2 #32, R0 ;#32, PAR ; CLRL -(SP) ;-(SP) ; 1558 PUSHL R0 ;PAR ; CLRQ -(SP) ;-(SP) ; PUSHL #12 ;#12 ; PUSHAB 944(R3) ;OLD_TERM_CHAR ; CLRQ -(SP) ;-(SP) ; MOVQ #35, -(SP) ;#35, -(SP) ; PUSHL (R3) ;TERM_CHAN ; CLRL -(SP) ;-(SP) ; CALLS #12, G^SYS$QIOW ;#12, SYS$QIOW ; MOVL R0, R2 ;R0, STATUS ; BLBS R2, 2$ ;STATUS, 2$ ; 1560 PUSHL R2 ;STATUS ; 1563 CALLS #1, G^LIB$SIGNAL ;#1, LIB$SIGNAL ; MOVL R2, R0 ;STATUS, R0 ; 1564 RET ; ; 2$: CLRL W^TERM_FLAG ;TERM_FLAG ; 1570 BLBC 676(R3), 3$ ;DEBUG_REDIRECTED, 3$ ; 1575 PUSHAB 476(R3) ;DEBUG_RAB ; 1578 PUSHAB 396(R3) ;DEBUG_FAB ; CALLS #2, W^LOG_CLOSE ;#2, LOG_CLOSE ; CLRL 676(R3) ;DEBUG_REDIRECTED ; 1579 3$: BLBC W^TRANSACTION_OPEN, 4$ ;TRANSACTION_OPEN, 4$ ; 1586 PUSHAB W^TRANSACTION_RAB ;TRANSACTION_RAB ; 1589 PUSHAB W^P.AAV ;P.AAV ; 1590 PUSHAB W^P.AAT ;P.AAT ; 1589 CALLS #3, W^LOG_FAOL ;#3, LOG_FAOL ; PUSHAB W^TRANSACTION_RAB ;TRANSACTION_RAB ; 1591 PUSHAB W^TRANSACTION_FAB ;TRANSACTION_FAB ; CALLS #2, W^LOG_CLOSE ;#2, LOG_CLOSE ; CLRL W^TRANSACTION_OPEN ;TRANSACTION_OPEN ; 1592 4$: MOVL #134316043, R0 ;#134316043, R0 ; 1598 RET ; ; 1599 ; Routine Size: 171 bytes, Routine Base: $CODE$ + 0601 ; 1600 1 ; 1601 1 %SBTTL 'Communications line -- SEND' ; 1602 1 ; 1603 1 GLOBAL ROUTINE SEND (ADDRESS, LENGTH) = ; 1604 1 ; 1605 1 !++ ; 1606 1 ! FUNCTIONAL DESCRIPTION: ; 1607 1 ! ; 1608 1 ! This routine will send a stream of 8-bit bytes over the terminal ; 1609 1 ! line to the remote KERMIT. This routine is called from KERMSG. ; 1610 1 ! ; 1611 1 ! CALLING SEQUENCE: ; 1612 1 ! ; 1613 1 ! SEND(Address-of-msg, Length-of-msg); ; 1614 1 ! ; 1615 1 ! INPUT PARAMETERS: ; 1616 1 ! ; 1617 1 ! None. ; 1618 1 ! ; 1619 1 ! IMPLICIT INPUTS: ; 1620 1 ! ; 1621 1 ! TERM_CHAN - Channel number to deassign. ; 1622 1 ! ; 1623 1 ! OUTPUT PARAMETERS: ; 1624 1 ! ; 1625 1 ! None. ; 1626 1 ! ; 1627 1 ! IMPLICIT OUTPUTS: ; 1628 1 ! ; 1629 1 ! None. ; 1630 1 ! ; 1631 1 ! COMPLETION CODES: ; 1632 1 ! ; 1633 1 ! SS$_NORMAL or error condition. ; 1634 1 ! ; 1635 1 ! SIDE EFFECTS: ; 1636 1 ! ; 1637 1 ! None. ; 1638 1 ! ; 1639 1 !-- ; 1640 1 ; 1641 2 BEGIN ; 1642 2 ; 1643 2 LOCAL ; 1644 2 CUR_EFN, ![015] Current EFN settings ; 1645 2 STATUS; ! Status returned by $QIOW ; 1646 2 ; 1647 2 ![015] ; 1648 2 ![015] If we already got a complete buffer of input we should ignore it. ; 1649 2 ![015] This is because we are probably retransmitting something and the ; 1650 2 ![015] incoming data is the response to the previous copy of this message. ; 1651 2 ![015] If we don't ignore it, we could get into a situation where every message ; 1652 2 ![015] gets transmitted twice. ; 1653 2 ![015] ; 1654 2 STATUS = $READEF (EFN = TERM_EFN, STATE = CUR_EFN); ; 1655 2 ; 1656 2 IF (.CUR_EFN AND 1^TERM_EFN) EQL 1 THEN DO_RECEIVE_QIO (); ; 1657 2 ; P 1658 2 STATUS = $QIOW (CHAN = .TERM_CHAN, EFN = TERM_O_EFN, FUNC = IO$_WRITEVBLK + IO$M_NOFORMAT, ; 1659 2 P1 = .ADDRESS, P2 = .LENGTH); ; 1660 2 ; 1661 2 IF .STATUS EQL SS$_NORMAL ; 1662 2 THEN ; 1663 2 RETURN KER_NORMAL ; 1664 2 ELSE ; 1665 3 BEGIN ; 1666 3 LIB$SIGNAL (.STATUS); ; 1667 3 RETURN .STATUS; ; 1668 2 END; ; 1669 2 ; 1670 1 END; ! End of SEND .EXTRN SYS$READEF .ENTRY SEND, ^M ;SEND, Save R2 ; 1603 SUBL2 #4, SP ;#4, SP ; PUSHL SP ;SP ; 1654 PUSHL #2 ;#2 ; CALLS #2, G^SYS$READEF ;#2, SYS$READEF ; MOVL R0, R2 ;R0, STATUS ; BICL3 #-5, (SP), R0 ;#-5, CUR_EFN, R0 ; 1656 CMPL R0, #1 ;R0, #1 ; BNEQ 1$ ;1$ ; CALLS #0, W^U.40 ;#0, U.40 ; 1$: CLRQ -(SP) ;-(SP) ; 1659 CLRQ -(SP) ;-(SP) ; MOVQ 4(AP), -(SP) ;ADDRESS, -(SP) ; CLRQ -(SP) ;-(SP) ; CLRL -(SP) ;-(SP) ; MOVZWL #304, -(SP) ;#304, -(SP) ; PUSHL W^U.4 ;U.4 ; PUSHL #4 ;#4 ; CALLS #12, G^SYS$QIOW ;#12, SYS$QIOW ; MOVL R0, R2 ;R0, STATUS ; CMPL R2, #1 ;STATUS, #1 ; 1661 BNEQ 2$ ;2$ ; MOVL #134316043, R0 ;#134316043, R0 ; 1665 RET ; ; 2$: PUSHL R2 ;STATUS ; 1666 CALLS #1, G^LIB$SIGNAL ;#1, LIB$SIGNAL ; MOVL R2, R0 ;STATUS, R0 ; 1667 RET ; ; 1670 ; Routine Size: 96 bytes, Routine Base: $CODE$ + 06AC ; 1671 1 ; 1672 1 %SBTTL 'Communications line -- RECEIVE' ; 1673 1 ; 1674 1 GLOBAL ROUTINE RECEIVE (ADDRESS, LENGTH) = ; 1675 1 ; 1676 1 !++ ; 1677 1 ! FUNCTIONAL DESCRIPTION: ; 1678 1 ! ; 1679 1 ! This routine will receive a stream of 8-bit bytes over the terminal ; 1680 1 ! line to the remote KERMIT. This routine is called from KERMSG. ; 1681 1 ! The text that is stored will always contain the control-A as the ; 1682 1 ! first character. ; 1683 1 ! ; 1684 1 ! CALLING SEQUENCE: ; 1685 1 ! ; 1686 1 ! RECEIVE(Address-of-msg); ; 1687 1 ! ; 1688 1 ! INPUT PARAMETERS: ; 1689 1 ! ; 1690 1 ! None. ; 1691 1 ! ; 1692 1 ! IMPLICIT INPUTS: ; 1693 1 ! ; 1694 1 ! TERM_CHAN - Channel number to deassign. ; 1695 1 ! ; 1696 1 ! OUTPUT PARAMETERS: ; 1697 1 ! ; 1698 1 ! None. ; 1699 1 ! ; 1700 1 ! IMPLICIT OUTPUTS: ; 1701 1 ! ; 1702 1 ! None. ; 1703 1 ! ; 1704 1 ! COMPLETION CODES: ; 1705 1 ! ; 1706 1 ! SS$_NORMAL or error condition. ; 1707 1 ! ; 1708 1 ! SIDE EFFECTS: ; 1709 1 ! ; 1710 1 ! None. ; 1711 1 ! ; 1712 1 !-- ; 1713 1 ; 1714 2 BEGIN ; 1715 2 ; 1716 2 EXTERNAL ; 1717 2 RCV_SOH; ! Character to use for start of packet ; 1718 2 ; 1719 2 LOCAL ; 1720 2 QWORD_TIMEOUT : VECTOR [2, LONG], ! Quad word TIMEOUT value ; 1721 2 TIMER_VALUE : VECTOR [2, LONG], ! Quad word TIME value ; 1722 2 OLD_POINTER, ! Pointer into the message ; 1723 2 NEW_POINTER, ! Other pointer for finding SOH ; 1724 2 CUR_LENGTH, ! Running length while finding SOH ; 1725 2 CUR_EFN, ! Current EFN value ; 1726 2 STATUS; ! Status returned by $QIO ; 1727 2 ; 1728 2 OWN ; 1729 2 INT_CHR_SEEN; ![020] Interrupt character seen last ; 1730 2 ; 1731 2 ![020] ; 1732 2 ![020] Flag we haven't seen a ^Y yet. We must get two control-Y's in fairly ; 1733 2 ![020] quick succession (no timeouts in between) in order to give up. ; 1734 2 ![020] ; 1735 2 INT_CHR_SEEN = FALSE; ; 1736 2 ! ; 1737 2 ! Set up the timer if we have a time out parameter ; 1738 2 ! ; 1739 2 ; 1740 2 IF NOT .FORCE_TIMEOUT THEN STATUS = $CLREF (EFN = TIME_EFN); ; 1741 2 ; 1742 2 IF .SEND_TIMEOUT GTR 0 ; 1743 2 THEN ; 1744 3 BEGIN ; 1745 3 STATUS = $CANTIM (REQIDT = TIME_EFN); ; 1746 3 STATUS = $GETTIM (TIMADR = TIMER_VALUE); ; 1747 3 STATUS = LIB$EMUL (SEND_TIMEOUT, UPLIT (10000000), UPLIT (0), QWORD_TIMEOUT); ; 1748 3 STATUS = LIB$ADDX (TIMER_VALUE, QWORD_TIMEOUT, QWORD_TIMEOUT); ; 1749 3 STATUS = $SETIMR (DAYTIM = QWORD_TIMEOUT, EFN = TIME_EFN, REQIDT = TIME_EFN); ; 1750 2 END; ; 1751 2 ; 1752 2 ! ; 1753 2 ! Loop until we get something that is acceptable ; 1754 2 ! ; 1755 2 ; 1756 2 WHILE TRUE DO ; 1757 3 BEGIN ; 1758 3 ! ; 1759 3 ! Wait for something to happen. Either the terminal EFN will come up ; 1760 3 ! indicating we have some data, or the timer EFN will indicate that ; 1761 3 ! the time has run out. ; 1762 3 ! ; 1763 3 STATUS = $WFLOR (EFN = TERM_EFN, MASK = (1^TERM_EFN OR 1^TIME_EFN)); ; 1764 3 STATUS = $READEF (EFN = TERM_EFN, STATE = CUR_EFN); ; 1765 3 FORCE_TIMEOUT = FALSE; ![021] Timeout had it chance to happen ; 1766 3 ! ; 1767 3 ! If the terminal EFN is not set, the time must have expired. Therefore, ; 1768 3 ! we have timed out, and need to return that fact. ; 1769 3 ! ; 1770 3 ; 1771 3 IF (.CUR_EFN AND 1^TERM_EFN) EQL 0 THEN RETURN KER_TIMEOUT; ; 1772 3 ; 1773 3 ! ; 1774 3 ! If we have a request to abort, start it up the chain. ; 1775 3 ! ; 1776 3 ; 1777 3 IF .FORCE_ABORT ; 1778 3 THEN ; 1779 4 BEGIN ; 1780 4 STATUS = $CANTIM (REQIDT = TIME_EFN); ; 1781 4 RETURN KER_ABORTED; ; 1782 3 END; ; 1783 3 ; 1784 3 ! ; 1785 3 ! Check if the QIO completed successfully. If not, we will return ; 1786 3 ! an error. ; 1787 3 ! ; 1788 3 ; 1789 3 IF NOT .IO_STATUS [0] ; 1790 3 THEN ; 1791 4 BEGIN ; 1792 4 LIB$SIGNAL (.IO_STATUS [0]); ; 1793 4 RETURN KER_RECERR; ; 1794 3 END; ; 1795 3 ; 1796 3 ! ; 1797 3 ! First check for a control-Y as the terminator. If it was, then ; 1798 3 ! just abort now, since the user probably typed it. ; 1799 3 ! ; 1800 3 ; 1801 3 IF .CONNECT_FLAG ; 1802 3 THEN ; 1803 3 ; 1804 4 IF (.IO_STATUS [2] EQL CHR_CTL_Y) AND (.RCV_EOL NEQ CHR_CTL_Y) ; 1805 3 THEN ; 1806 4 BEGIN ; 1807 4 ; 1808 4 IF .INT_CHR_SEEN AND .IO_STATUS [1] EQL 0 ; 1809 4 THEN ; 1810 5 BEGIN ; 1811 5 STATUS = $CANTIM (REQIDT = TIME_EFN); ; 1812 5 RETURN KER_ABORTED ; 1813 5 END ; 1814 4 ELSE ; 1815 5 BEGIN ; 1816 5 INT_CHR_SEEN = TRUE; ; 1817 5 IO_STATUS [1] = 0; ![020] Force no input seen ; 1818 5 END ; 1819 5 ; 1820 4 END ; 1821 3 ELSE ; 1822 3 INT_CHR_SEEN = FALSE; ![020] Last character not ^Y ; 1823 3 ; 1824 3 ! ; 1825 3 ! Now find the final start of header character in the buffer. We ; 1826 3 ! will only return the text from that point on. If there is no SOH, ; 1827 3 ! then just get another buffer. It was probably noise on the line. ; 1828 3 ! ; 1829 3 OLD_POINTER = CH$PTR (RECV_BUFFER, 0, CHR_SIZE); ; 1830 3 CUR_LENGTH = .IO_STATUS [1]; ! Length without terminating character ; 1831 3 NEW_POINTER = CH$FIND_CH (.CUR_LENGTH, .OLD_POINTER, .RCV_SOH); ; 1832 3 ! ; 1833 3 ! If we found a start of header character, then we probably have something ; 1834 3 ! to return. However, first we must find the last start of header, in case ; 1835 3 ! something is garbled. ; 1836 3 ! ; 1837 3 ; 1838 3 IF NOT CH$FAIL (.NEW_POINTER) ; 1839 3 THEN ; 1840 4 BEGIN ; 1841 4 ! ; 1842 4 ! Search until we can't find any more start of headers, or until we run ; 1843 4 ! out of string to search (last character before EOL is an SOH). ; 1844 4 ! ; 1845 4 ; 1846 4 WHILE (.CUR_LENGTH GTR 0) AND ( NOT CH$FAIL (.NEW_POINTER)) DO ; 1847 5 BEGIN ; 1848 5 CUR_LENGTH = .CUR_LENGTH - CH$DIFF (.NEW_POINTER, .OLD_POINTER); ; 1849 5 ! Adjust the length for the characters we are skipping ; 1850 5 OLD_POINTER = .NEW_POINTER; ! Remember where we start ; 1851 5 NEW_POINTER = CH$FIND_CH (.CUR_LENGTH - 1, CH$PLUS (.OLD_POINTER, 1), .RCV_SOH); ; 1852 5 ! Find the next SOH (if any) ; 1853 4 END; ; 1854 4 ; 1855 4 ! ; 1856 4 ! If we have something left of the buffer, move from the SOH until the end ; 1857 4 ! into the callers buffer. ; 1858 4 ! ; 1859 4 ; 1860 5 IF (.CUR_LENGTH GTR 0) ; 1861 4 THEN ; 1862 5 BEGIN ; 1863 5 .LENGTH = .CUR_LENGTH + 1; ; 1864 5 ; 1865 5 IF .PARITY_TYPE EQL PR_NONE ![006] Have eight-bit? ; 1866 5 THEN ; 1867 5 CH$MOVE (.CUR_LENGTH + 1, .OLD_POINTER, CH$PTR (.ADDRESS, 0, CHR_SIZE)) ; 1868 5 ELSE ; 1869 6 BEGIN ; 1870 6 NEW_POINTER = CH$PTR (.ADDRESS, 0, CHR_SIZE); ; 1871 6 ; 1872 6 DECR CUR_LENGTH FROM .CUR_LENGTH TO 0 DO ; 1873 6 CH$WCHAR_A ((CH$RCHAR_A (OLD_POINTER) AND %O'177'), NEW_POINTER); ; 1874 6 ; 1875 5 END; ; 1876 5 ; 1877 5 EXITLOOP ; 1878 5 END ; 1879 5 ; 1880 3 END; ! End of IF NOT CH$FAIL(.POINTER) ; 1881 3 ; 1882 3 ! ; 1883 3 ! If we have gotten here, we have input a buffer without a valid message. ; 1884 3 ! Make sure we post the QIO again ; 1885 3 ! ; 1886 3 STATUS = DO_RECEIVE_QIO (); ; 1887 3 ; 1888 3 IF NOT .STATUS ; 1889 3 THEN ; 1890 4 BEGIN ; 1891 4 LIB$SIGNAL (.STATUS); ; 1892 4 RETURN KER_RECERR ; 1893 3 END; ; 1894 3 ; 1895 2 END; ! End of WHILE TRUE DO ; 1896 2 ; 1897 2 ! ; 1898 2 ! If we have gotten here, we have a valid message to return. ; 1899 2 ! Post the QIO so the buffer is available for the next message. ; 1900 2 ! ; 1901 2 STATUS = DO_RECEIVE_QIO (); ; 1902 2 ; 1903 2 IF NOT .STATUS ; 1904 2 THEN ; 1905 3 BEGIN ; 1906 3 LIB$SIGNAL (.STATUS); ; 1907 3 RETURN KER_RECERR ; 1908 2 END; ; 1909 2 ; 1910 2 RETURN KER_NORMAL; ! Return happy ; 1911 1 END; ! End of RECEIVE .PSECT $PLIT$,NOWRT,NOEXE,2 P.AAW: .LONG 10000000 ; ; P.AAX: .LONG 0 ; ; .PSECT $OWN$,NOEXE,2 ;INT_CHR_SEEN U.57: .BLKB 4 .EXTRN RCV_SOH, SYS$CLREF, SYS$CANTIM, SYS$GETTIM, SYS$SETIMR, SYS$WFLOR .PSECT $CODE$,NOWRT,2 .ENTRY RECEIVE, ^M ; ; MOVAB G^SYS$CANTIM, R11 ;SYS$CANTIM, R11 ; MOVAB W^U.57, R10 ;U.57, R10 ; SUBL2 #20, SP ;#20, SP ; CLRL (R10) ;INT_CHR_SEEN ; 1735 BLBS -976(R10), 1$ ;FORCE_TIMEOUT, 1$ ; 1740 PUSHL #3 ;#3 ; CALLS #1, G^SYS$CLREF ;#1, SYS$CLREF ; MOVL R0, R9 ;R0, STATUS ; 1$: TSTL W^SEND_TIMEOUT ;SEND_TIMEOUT ; 1742 BLEQ 2$ ;2$ ; MOVQ #3, -(SP) ;#3, -(SP) ; 1745 CALLS #2, (R11) ;#2, SYS$CANTIM ; MOVL R0, R9 ;R0, STATUS ; PUSHAB 4(SP) ;TIMER_VALUE ; 1746 CALLS #1, G^SYS$GETTIM ;#1, SYS$GETTIM ; MOVL R0, R9 ;R0, STATUS ; PUSHAB 12(SP) ;QWORD_TIMEOUT ; 1747 PUSHAB W^P.AAX ;P.AAX ; PUSHAB W^P.AAW ;P.AAW ; PUSHAB W^SEND_TIMEOUT ;SEND_TIMEOUT ; CALLS #4, G^LIB$EMUL ;#4, LIB$EMUL ; MOVL R0, R9 ;R0, STATUS ; PUSHAB 12(SP) ;QWORD_TIMEOUT ; 1748 PUSHAB 16(SP) ;QWORD_TIMEOUT ; PUSHAB 12(SP) ;TIMER_VALUE ; CALLS #3, G^LIB$ADDX ;#3, LIB$ADDX ; MOVL R0, R9 ;R0, STATUS ; PUSHL #3 ;#3 ; 1749 CLRL -(SP) ;-(SP) ; PUSHAB 20(SP) ;QWORD_TIMEOUT ; PUSHL #3 ;#3 ; CALLS #4, G^SYS$SETIMR ;#4, SYS$SETIMR ; MOVL R0, R9 ;R0, STATUS ; 2$: PUSHL #12 ;#12 ; 1763 PUSHL #2 ;#2 ; CALLS #2, G^SYS$WFLOR ;#2, SYS$WFLOR ; MOVL R0, R9 ;R0, STATUS ; PUSHL SP ;SP ; 1764 PUSHL #2 ;#2 ; CALLS #2, G^SYS$READEF ;#2, SYS$READEF ; MOVL R0, R9 ;R0, STATUS ; CLRL -976(R10) ;FORCE_TIMEOUT ; 1765 BBS #2, (SP), 3$ ;#2, CUR_EFN, 3$ ; 1771 MOVL #134316248, R0 ;#134316248, R0 ; RET ; ; 3$: BLBS -980(R10), 5$ ;FORCE_ABORT, 5$ ; 1777 BLBS -160(R10), 4$ ;IO_STATUS, 4$ ; 1789 MOVZWL -160(R10), -(SP) ;IO_STATUS, -(SP) ; 1792 BRW 19$ ;19$ ; 4$: BLBC W^CONNECT_FLAG, 8$ ;CONNECT_FLAG, 8$ ; 1801 CMPW -156(R10), #25 ;IO_STATUS+4, #25 ; 1804 BNEQ 7$ ;7$ ; CMPL W^RCV_EOL, #25 ;RCV_EOL, #25 ; BEQL 7$ ;7$ ; BLBC (R10), 6$ ;INT_CHR_SEEN, 6$ ; 1808 TSTW -158(R10) ;IO_STATUS+2 ; BNEQ 6$ ;6$ ; 5$: MOVQ #3, -(SP) ;#3, -(SP) ; 1811 CALLS #2, (R11) ;#2, SYS$CANTIM ; MOVL R0, R9 ;R0, STATUS ; MOVL #134316258, R0 ;#134316258, R0 ; 1812 RET ; ; 6$: MOVL #1, (R10) ;#1, INT_CHR_SEEN ; 1816 CLRW -158(R10) ;IO_STATUS+2 ; 1817 BRB 8$ ;8$ ; 1806 7$: CLRL (R10) ;INT_CHR_SEEN ; 1822 8$: MOVAB -152(R10), R6 ;RECV_BUFFER, OLD_POINTER ; 1829 MOVZWL -158(R10), R7 ;IO_STATUS+2, CUR_LENGTH ; 1830 LOCC W^RCV_SOH, R7, (R6) ;RCV_SOH, CUR_LENGTH, (OLD_POINTER) ; 1831 BNEQ 9$ ;9$ ; CLRL R1 ;R1 ; 9$: MOVL R1, R8 ;R1, NEW_POINTER ; BEQL 16$ ;16$ ; 1838 10$: TSTL R7 ;CUR_LENGTH ; 1846 BLEQ 12$ ;12$ ; TSTL R8 ;NEW_POINTER ; BEQL 12$ ;12$ ; SUBL3 R8, R6, R0 ;NEW_POINTER, OLD_POINTER, R0 ; 1848 ADDL2 R0, R7 ;R0, CUR_LENGTH ; MOVL R8, R6 ;NEW_POINTER, OLD_POINTER ; 1850 MOVAB -1(R7), R0 ;-1(R7), R0 ; 1851 LOCC W^RCV_SOH, R0, 1(R6) ;RCV_SOH, R0, 1(OLD_POINTER) ; BNEQ 11$ ;11$ ; CLRL R1 ;R1 ; 11$: MOVL R1, R8 ;R1, NEW_POINTER ; BRB 10$ ;10$ ; 1846 12$: TSTL R7 ;CUR_LENGTH ; 1860 BLEQ 16$ ;16$ ; MOVAB 1(R7), R0 ;1(R7), R0 ; 1863 MOVL R0, @8(AP) ;R0, @LENGTH ; TSTL W^PARITY_TYPE ;PARITY_TYPE ; 1865 BNEQ 13$ ;13$ ; MOVC3 R0, (R6), @4(AP) ;R0, (OLD_POINTER), @ADDRESS ; 1867 BRB 17$ ;17$ ; 13$: MOVL 4(AP), R8 ;ADDRESS, NEW_POINTER ; 1870 MOVAB 1(R7), R0 ;1(R7), CUR_LENGTH ; 1873 BRB 15$ ;15$ ; 14$: MOVZBL (R6)+, R1 ;(OLD_POINTER)+, R1 ; EXTZV #0, #7, R1, R2 ;#0, #7, R1, R2 ; MOVB R2, (R8)+ ;R2, (NEW_POINTER)+ ; 15$: SOBGEQ R0, 14$ ;CUR_LENGTH, 14$ ; BRB 17$ ;17$ ; 1862 16$: CALLS #0, W^U.40 ;#0, U.40 ; 1886 MOVL R0, R9 ;R0, STATUS ; BLBC R9, 18$ ;STATUS, 18$ ; 1888 BRW 2$ ;2$ ; 17$: CALLS #0, W^U.40 ;#0, U.40 ; 1901 MOVL R0, R9 ;R0, STATUS ; BLBS R9, 20$ ;STATUS, 20$ ; 1903 18$: PUSHL R9 ;STATUS ; 1906 19$: CALLS #1, G^LIB$SIGNAL ;#1, LIB$SIGNAL ; MOVL #134316266, R0 ;#134316266, R0 ; 1907 RET ; ; 20$: MOVL #134316043, R0 ;#134316043, R0 ; 1910 RET ; ; 1911 ; Routine Size: 409 bytes, Routine Base: $CODE$ + 070C ; 1912 1 ; 1913 1 %SBTTL 'Communications line -- IBM_WAIT' ; 1914 1 ; 1915 1 GLOBAL ROUTINE IBM_WAIT = ; 1916 1 ; 1917 1 !++ ; 1918 1 ! FUNCTIONAL DESCRIPTION: ; 1919 1 ! ; 1920 1 ! This routine will wait until the IBM turnaround character ; 1921 1 ! is seen on the communications line, or until the timeout ; 1922 1 ! parameter is exceeded. ; 1923 1 ! ; 1924 1 ! CALLING SEQUENCE: ; 1925 1 ! ; 1926 1 ! STATUS = IBM_WAIT (); ; 1927 1 ! ; 1928 1 ! INPUT PARAMETERS: ; 1929 1 ! ; 1930 1 ! None. ; 1931 1 ! ; 1932 1 ! IMPLICIT INPUTS: ; 1933 1 ! ; 1934 1 ! TERM_CHAN - Channel number for terminal ; 1935 1 ! ; 1936 1 ! OUTPUT PARAMETERS: ; 1937 1 ! ; 1938 1 ! Status value is returned as routine value. ; 1939 1 ! ; 1940 1 ! IMPLICIT OUTPUTS: ; 1941 1 ! ; 1942 1 ! None. ; 1943 1 ! ; 1944 1 ! COMPLETION CODES: ; 1945 1 ! ; 1946 1 ! SS$_NORMAL or error condition. ; 1947 1 ! ; 1948 1 ! SIDE EFFECTS: ; 1949 1 ! ; 1950 1 ! None. ; 1951 1 ! ; 1952 1 !-- ; 1953 1 ; 1954 2 BEGIN ; 1955 2 ; 1956 2 LOCAL ; 1957 2 QWORD_TIMEOUT : VECTOR [2, LONG], ! Quad word TIMEOUT value ; 1958 2 TIMER_VALUE : VECTOR [2, LONG], ! Quad word TIME value ; 1959 2 CUR_EFN, ! Current EFN value ; 1960 2 STATUS; ! Status returned by $QIO ; 1961 2 ; 1962 2 ! ; 1963 2 ! Set up the timer if we have a time out parameter ; 1964 2 ! ; 1965 2 STATUS = $CLREF (EFN = TIME_EFN); ; 1966 2 ; 1967 2 IF .SEND_TIMEOUT GTR 0 ; 1968 2 THEN ; 1969 3 BEGIN ; 1970 3 STATUS = $CANTIM (REQIDT = TIME_EFN); ; 1971 3 STATUS = $GETTIM (TIMADR = TIMER_VALUE); ; 1972 3 STATUS = LIB$EMUL (SEND_TIMEOUT, UPLIT (10000000), UPLIT (0), QWORD_TIMEOUT); ; 1973 3 STATUS = LIB$ADDX (TIMER_VALUE, QWORD_TIMEOUT, QWORD_TIMEOUT); ; 1974 3 STATUS = $SETIMR (DAYTIM = QWORD_TIMEOUT, EFN = TIME_EFN, REQIDT = TIME_EFN); ; 1975 2 END; ; 1976 2 ; 1977 2 ! ; 1978 2 ! Loop until we get something that is acceptable ; 1979 2 ! ; 1980 2 ; 1981 2 WHILE TRUE DO ; 1982 3 BEGIN ; 1983 3 ! ; 1984 3 ! Wait for something to happen. Either the terminal EFN will come up ; 1985 3 ! indicating we have some data, or the timer EFN will indicate that ; 1986 3 ! the time has run out. ; 1987 3 ! ; 1988 3 STATUS = $WFLOR (EFN = TERM_EFN, MASK = (1^TERM_EFN OR 1^TIME_EFN)); ; 1989 3 STATUS = $READEF (EFN = TERM_EFN, STATE = CUR_EFN); ; 1990 3 ! ; 1991 3 ! If the terminal EFN is not set, the time must have expired. Therefore, ; 1992 3 ! pretend we got the character. ; 1993 3 ! ; 1994 3 ; 1995 3 IF (.CUR_EFN AND 1^TERM_EFN) EQL 0 THEN RETURN KER_NORMAL; ; 1996 3 ; 1997 3 ! ; 1998 3 ! Check if the QIO completed successfully. If not, we will return ; 1999 3 ! an error. ; 2000 3 ! ; 2001 3 ; 2002 3 IF NOT .IO_STATUS [0] ; 2003 3 THEN ; 2004 4 BEGIN ; 2005 4 LIB$SIGNAL (.IO_STATUS [0]); ; 2006 4 RETURN KER_RECERR; ; 2007 3 END; ; 2008 3 ; 2009 3 ! ; 2010 3 ! First check for a control-Y as the terminator. If it was, then ; 2011 3 ! just abort now, since the user probably typed it. ; 2012 3 ! ; 2013 3 ; 2014 3 IF .CONNECT_FLAG ; 2015 3 THEN ; 2016 3 ; 2017 4 IF (.IO_STATUS [2] EQL CHR_CTL_Y) AND (.RCV_EOL NEQ CHR_CTL_Y) ; 2018 3 THEN ; 2019 4 BEGIN ; 2020 4 STATUS = $CANTIM (REQIDT = TIME_EFN); ; 2021 4 RETURN KER_ABORTED ; 2022 3 END; ; 2023 3 ; 2024 3 ! Check if terminator was the turnaround character ; 2025 3 ; 2026 3 IF (.IO_STATUS [2] EQL .IBM_CHAR) THEN EXITLOOP; ; 2027 3 ; 2028 3 ! ; 2029 3 ! Make sure we post the QIO again ; 2030 3 ! ; 2031 3 STATUS = DO_RECEIVE_QIO (); ; 2032 3 ; 2033 3 IF NOT .STATUS ; 2034 3 THEN ; 2035 4 BEGIN ; 2036 4 LIB$SIGNAL (.STATUS); ; 2037 4 RETURN KER_RECERR ; 2038 3 END; ; 2039 3 ; 2040 2 END; ! End of WHILE TRUE DO ; 2041 2 ; 2042 2 ! ; 2043 2 ! If we have gotten here, we have a valid message to return. ; 2044 2 ! Post the QIO so the buffer is available for the next message. ; 2045 2 ! ; 2046 2 STATUS = DO_RECEIVE_QIO (); ; 2047 2 ; 2048 2 IF NOT .STATUS ; 2049 2 THEN ; 2050 3 BEGIN ; 2051 3 LIB$SIGNAL (.STATUS); ; 2052 3 RETURN KER_RECERR ; 2053 2 END; ; 2054 2 ; 2055 2 RETURN KER_NORMAL; ! Return happy ; 2056 1 END; ! End of RECEIVE .PSECT $PLIT$,NOWRT,NOEXE,2 P.AAY: .LONG 10000000 ; ; P.AAZ: .LONG 0 ; ; .PSECT $CODE$,NOWRT,2 .ENTRY IBM_WAIT, ^M ;IBM_WAIT, Save R2,R3,R4 ; 1915 MOVAB W^U.27, R4 ;U.27, R4 ; MOVAB G^SYS$CANTIM, R3 ;SYS$CANTIM, R3 ; SUBL2 #20, SP ;#20, SP ; PUSHL #3 ;#3 ; 1965 CALLS #1, G^SYS$CLREF ;#1, SYS$CLREF ; MOVL R0, R2 ;R0, STATUS ; TSTL W^SEND_TIMEOUT ;SEND_TIMEOUT ; 1967 BLEQ 1$ ;1$ ; MOVQ #3, -(SP) ;#3, -(SP) ; 1970 CALLS #2, (R3) ;#2, SYS$CANTIM ; MOVL R0, R2 ;R0, STATUS ; PUSHAB 4(SP) ;TIMER_VALUE ; 1971 CALLS #1, G^SYS$GETTIM ;#1, SYS$GETTIM ; MOVL R0, R2 ;R0, STATUS ; PUSHAB 12(SP) ;QWORD_TIMEOUT ; 1972 PUSHAB W^P.AAZ ;P.AAZ ; PUSHAB W^P.AAY ;P.AAY ; PUSHAB W^SEND_TIMEOUT ;SEND_TIMEOUT ; CALLS #4, G^LIB$EMUL ;#4, LIB$EMUL ; MOVL R0, R2 ;R0, STATUS ; PUSHAB 12(SP) ;QWORD_TIMEOUT ; 1973 PUSHAB 16(SP) ;QWORD_TIMEOUT ; PUSHAB 12(SP) ;TIMER_VALUE ; CALLS #3, G^LIB$ADDX ;#3, LIB$ADDX ; MOVL R0, R2 ;R0, STATUS ; PUSHL #3 ;#3 ; 1974 CLRL -(SP) ;-(SP) ; PUSHAB 20(SP) ;QWORD_TIMEOUT ; PUSHL #3 ;#3 ; CALLS #4, G^SYS$SETIMR ;#4, SYS$SETIMR ; MOVL R0, R2 ;R0, STATUS ; 1$: PUSHL #12 ;#12 ; 1988 PUSHL #2 ;#2 ; CALLS #2, G^SYS$WFLOR ;#2, SYS$WFLOR ; MOVL R0, R2 ;R0, STATUS ; PUSHL SP ;SP ; 1989 PUSHL #2 ;#2 ; CALLS #2, G^SYS$READEF ;#2, SYS$READEF ; MOVL R0, R2 ;R0, STATUS ; BBC #2, (SP), 7$ ;#2, CUR_EFN, 7$ ; 1995 BLBS (R4), 2$ ;IO_STATUS, 2$ ; 2002 MOVZWL (R4), -(SP) ;IO_STATUS, -(SP) ; 2005 BRB 6$ ;6$ ; 2$: BLBC W^CONNECT_FLAG, 3$ ;CONNECT_FLAG, 3$ ; 2014 CMPW 4(R4), #25 ;IO_STATUS+4, #25 ; 2017 BNEQ 3$ ;3$ ; CMPL W^RCV_EOL, #25 ;RCV_EOL, #25 ; BEQL 3$ ;3$ ; MOVQ #3, -(SP) ;#3, -(SP) ; 2020 CALLS #2, (R3) ;#2, SYS$CANTIM ; MOVL R0, R2 ;R0, STATUS ; MOVL #134316258, R0 ;#134316258, R0 ; 2021 RET ; ; 3$: CMPZV #0, #16, 4(R4), W^IBM_CHAR ;#0, #16, IO_STATUS+4, IBM_CHAR ; 2026 BEQL 4$ ;4$ ; CALLS #0, W^U.40 ;#0, U.40 ; 2031 MOVL R0, R2 ;R0, STATUS ; BLBS R2, 1$ ;STATUS, 1$ ; 2033 BRB 5$ ;5$ ; 2036 4$: CALLS #0, W^U.40 ;#0, U.40 ; 2046 MOVL R0, R2 ;R0, STATUS ; BLBS R2, 7$ ;STATUS, 7$ ; 2048 5$: PUSHL R2 ;STATUS ; 2051 6$: CALLS #1, G^LIB$SIGNAL ;#1, LIB$SIGNAL ; MOVL #134316266, R0 ;#134316266, R0 ; 2052 RET ; ; 7$: MOVL #134316043, R0 ;#134316043, R0 ; 2055 RET ; ; 2056 ; Routine Size: 254 bytes, Routine Base: $CODE$ + 08A5 ; 2057 1 ; 2058 1 %SBTTL 'GET_DEV_CHAR - Determine device characteristics' ; 2059 1 ROUTINE GET_DEV_CHAR (LOG_NAME_DESC, PHYS_NAME_DESC, DEV_CLASS) = ; 2060 1 ; 2061 1 !++ ; 2062 1 ! FUNCTIONAL DESCRIPTION: ; 2063 1 ! ; 2064 1 ! This routine will get the device characteristics from VMS. It returns ; 2065 1 ! both the physical name of the device and the device class. ; 2066 1 ! ; 2067 1 ! CALLING SEQUENCE: ; 2068 1 ! ; 2069 1 ! STATUS = GET_DEV_CHAR (LOG_NAME_DESC, PHYS_NAME_DESC, DEV_CLASS); ; 2070 1 ! ; 2071 1 ! INPUT PARAMETERS: ; 2072 1 ! ; 2073 1 ! LOG_NAME_DESC - Descriptor for logical device for which the device ; 2074 1 ! class is desired. ; 2075 1 ! ; 2076 1 ! IMPLICIT INPUTS: ; 2077 1 ! ; 2078 1 ! None. ; 2079 1 ! ; 2080 1 ! OUPTUT PARAMETERS: ; 2081 1 ! ; 2082 1 ! PHYS_NAME_DESC - Descriptor for physical device name ; 2083 1 ! DEV_CLASS - Device class for device ; 2084 1 ! ; 2085 1 ! IMPLICIT OUTPUTS: ; 2086 1 ! ; 2087 1 ! None. ; 2088 1 ! ; 2089 1 ! COMPLETION CODES/RETURN VALUE: ; 2090 1 ! ; 2091 1 ! Status value returned from either $GETDVI or $WAITFR if either fails, ; 2092 1 ! KER_NORMAL otherwise. ; 2093 1 ! ; 2094 1 ! SIDE EFFECTS: ; 2095 1 ! ; 2096 1 ! None. ; 2097 1 ! ; 2098 1 !-- ; 2099 1 ; 2100 2 BEGIN ; 2101 2 ; 2102 2 MAP ; 2103 2 PHYS_NAME_DESC : REF BLOCK [8, BYTE]; ! Physical name descriptor ; 2104 2 ; 2105 2 LOCAL ; 2106 2 ITMLST : DVI_ITEM_LIST [2] FIELD (DVI_FIELDS), ; 2107 2 PHYS_NAME_LENGTH, ; 2108 2 STATUS; ; 2109 2 ; 2110 2 ! ; 2111 2 ! Set up item list for device class ; 2112 2 ! ; 2113 2 ITMLST [0, DVI_ITEM_CODE] = DVI$_DEVCLASS; ; 2114 2 ITMLST [0, DVI_BFR_LENGTH] = 4; ! 4 byte result ; 2115 2 ITMLST [0, DVI_BFR_ADDRESS] = .DEV_CLASS; ! Where to return result ; 2116 2 ITMLST [0, DVI_RTN_LENGTH] = 0; ! We know how long it is ; 2117 2 ! ; 2118 2 ! Item list entry for device name ; 2119 2 ! ; 2120 2 ITMLST [1, DVI_ITEM_CODE] = DVI$_DEVNAM; ! Want the name of the device ; 2121 2 ITMLST [1, DVI_BFR_LENGTH] = .PHYS_NAME_DESC [DSC$W_LENGTH]; ! Max length to return ; 2122 2 ITMLST [1, DVI_BFR_ADDRESS] = .PHYS_NAME_DESC [DSC$A_POINTER]; ! Where to return name ; 2123 2 ITMLST [1, DVI_RTN_LENGTH] = PHYS_NAME_LENGTH; ! Where to return length ; 2124 2 ! ; 2125 2 ! End the list of items ; 2126 2 ! ; 2127 2 ITMLST [2, DVI_ITEM_CODE] = 0; ; 2128 2 ITMLST [2, DVI_BFR_LENGTH] = 0; ; 2129 2 ! ; 2130 2 ! Request the information ; 2131 2 ! ; 2132 2 STATUS = $GETDVI (EFN = GET_DEV_EFN, DEVNAM = .LOG_NAME_DESC, ITMLST = ITMLST); ; 2133 2 ; 2134 2 IF NOT .STATUS THEN RETURN .STATUS; ; 2135 2 ; 2136 2 ! ; 2137 2 ! Wait until it says it finished ; 2138 2 ! ; 2139 2 STATUS = $WAITFR (EFN = GET_DEV_EFN); ; 2140 2 ; 2141 2 IF NOT .STATUS THEN RETURN .STATUS; ; 2142 2 ; 2143 2 ! ; 2144 2 ! Assign the length and return happy ; 2145 2 ! ; 2146 2 PHYS_NAME_DESC [DSC$W_LENGTH] = .PHYS_NAME_LENGTH; ; 2147 2 RETURN KER_NORMAL; ; 2148 1 END; ! End of GET_DEV_CHAR .EXTRN SYS$GETDVI, SYS$WAITFR ;GET_DEV_CHAR U.39: .WORD ^M ;Save R2 ; 2059 SUBL2 #40, SP ;#40, SP ; MOVL #262148, 4(SP) ;#262148, ITMLST ; 2114 MOVL 12(AP), 8(SP) ;DEV_CLASS, ITMLST+4 ; 2115 CLRL 12(SP) ;ITMLST+8 ; 2116 MOVW #32, 18(SP) ;#32, ITMLST+14 ; 2120 MOVL 8(AP), R2 ;PHYS_NAME_DESC, R2 ; 2121 MOVW (R2), 16(SP) ;(R2), ITMLST+12 ; MOVL 4(R2), 20(SP) ;4(R2), ITMLST+16 ; 2122 MOVAB (SP), 24(SP) ;PHYS_NAME_LENGTH, ITMLST+20 ; 2123 CLRL 28(SP) ;ITMLST+24 ; 2128 CLRQ -(SP) ;-(SP) ; 2132 CLRQ -(SP) ;-(SP) ; PUSHAB 20(SP) ;ITMLST ; PUSHL 4(AP) ;LOG_NAME_DESC ; MOVQ #7, -(SP) ;#7, -(SP) ; CALLS #8, G^SYS$GETDVI ;#8, SYS$GETDVI ; BLBC R0, 1$ ;STATUS, 1$ ; 2134 PUSHL #7 ;#7 ; 2139 CALLS #1, G^SYS$WAITFR ;#1, SYS$WAITFR ; BLBC R0, 1$ ;STATUS, 1$ ; 2141 MOVW (SP), (R2) ;PHYS_NAME_LENGTH, (R2) ; 2146 MOVL #134316043, R0 ;#134316043, R0 ; 2147 1$: RET ; ; 2148 ; Routine Size: 91 bytes, Routine Base: $CODE$ + 09A3 ; 2149 1 %SBTTL 'DO_RECEIVE_QIO' ; 2150 1 ROUTINE DO_RECEIVE_QIO = ; 2151 1 ; 2152 1 !++ ; 2153 1 ! FUNCTIONAL DESCRIPTION: ; 2154 1 ! ; 2155 1 ! This routine is called to perform a QIO input from the terminal. This ; 2156 1 ! ensures that there is usually a receive buffer pending. ; 2157 1 ! ; 2158 1 ! CALLING SEQUENCE: ; 2159 1 ! ; 2160 1 ! STATUS = DO_RECEIVE_QIO (); ; 2161 1 ! ; 2162 1 ! INPUT PARAMETERS: ; 2163 1 ! ; 2164 1 ! None. ; 2165 1 ! ; 2166 1 ! IMPLICIT INPUTS: ; 2167 1 ! ; 2168 1 ! RCV_EOL - Receive end-of-line character ; 2169 1 ! ; 2170 1 ! OUPTUT PARAMETERS: ; 2171 1 ! ; 2172 1 ! None. ; 2173 1 ! ; 2174 1 ! IMPLICIT OUTPUTS: ; 2175 1 ! ; 2176 1 ! IO_STATUS - IOSB for the QIO ; 2177 1 ! RCV_BUFFER - Data input from terminal ; 2178 1 ! ; 2179 1 ! COMPLETION CODES: ; 2180 1 ! ; 2181 1 ! None. ; 2182 1 ! ; 2183 1 ! SIDE EFFECTS: ; 2184 1 ! ; 2185 1 ! TERM_EFN is set when I/O completes ; 2186 1 ! ; 2187 1 !-- ; 2188 1 ; 2189 2 BEGIN ; 2190 2 ; 2191 2 LOCAL ; 2192 2 QIO_FUNC, ; 2193 2 TERMINATOR : VECTOR [2, LONG], ; 2194 2 STATUS; ! For status of QIO call ; 2195 2 ; 2196 2 ! ; 2197 2 ! Initialize the terminating characters for the QIO. Only terminate ; 2198 2 ! on the end-of-line character and a control-Y ; 2199 2 ! ; 2200 2 TERMINATOR [0] = 0; ; 2201 2 TERMINATOR [1] = 1^.RCV_EOL OR 1^CHR_CTL_Y; ; 2202 2 ; 2203 2 IF .IBM_CHAR GEQ 0 THEN TERMINATOR [1] = .TERMINATOR [1] OR 1^.IBM_CHAR; ; 2204 2 ; 2205 2 ![006] Need IBM turnaround? ; 2206 2 ! ; 2207 2 ! Initialize the QIO function ; 2208 2 ![015] Always purge typeahead ; 2209 2 ! ; 2210 2 QIO_FUNC = IO$_TTYREADALL OR IO$M_NOECHO OR IO$M_PURGE; ; P 2211 2 RETURN $QIO (CHAN = .TERM_CHAN, EFN = TERM_EFN, FUNC = .QIO_FUNC, IOSB = IO_STATUS, ; 2212 2 P1 = RECV_BUFFER, P2 = RECV_BUFF_SIZE, P4 = TERMINATOR); ; 2213 1 END; ! End of DO_RECEIVE_QIO .EXTRN SYS$QIO ;DO_RECEIVE_QIO U.40: .WORD ^M<> ;Save nothing ; 2150 SUBL2 #4, SP ;#4, SP ; CLRL -(SP) ;TERMINATOR ; 2200 ASHL W^RCV_EOL, #1, R0 ;RCV_EOL, #1, R0 ; 2201 BISL3 #33554432, R0, 4(SP) ;#33554432, R0, TERMINATOR+4 ; MOVL W^IBM_CHAR, R0 ;IBM_CHAR, R0 ; 2203 BLSS 1$ ;1$ ; ASHL R0, #1, R0 ;R0, #1, R0 ; BISL2 R0, 4(SP) ;R0, TERMINATOR+4 ; 1$: MOVZWL #2170, R0 ;#2170, QIO_FUNC ; 2210 CLRQ -(SP) ;-(SP) ; 2212 PUSHAB 8(SP) ;TERMINATOR ; CLRL -(SP) ;-(SP) ; MOVZBL #120, -(SP) ;#120, -(SP) ; PUSHAB W^U.28 ;U.28 ; CLRQ -(SP) ;-(SP) ; PUSHAB W^U.27 ;U.27 ; PUSHL R0 ;QIO_FUNC ; PUSHL W^U.4 ;U.4 ; PUSHL #2 ;#2 ; CALLS #12, G^SYS$QIO ;#12, SYS$QIO ; RET ; ; 2213 ; Routine Size: 79 bytes, Routine Base: $CODE$ + 09FE ; 2214 1 %SBTTL 'DO_CONS_QIO' ; 2215 1 ROUTINE DO_CONS_QIO = ; 2216 1 ; 2217 1 !++ ; 2218 1 ! FUNCTIONAL DESCRIPTION: ; 2219 1 ! ; 2220 1 ! This routine is called to perform a QIO input from the terminal. This ; 2221 1 ! ensures that there is usually a receive buffer pending. ; 2222 1 ! ; 2223 1 ! CALLING SEQUENCE: ; 2224 1 ! ; 2225 1 ! STATUS = DO_CONS_QIO (); ; 2226 1 ! ; 2227 1 ! INPUT PARAMETERS: ; 2228 1 ! ; 2229 1 ! None. ; 2230 1 ! ; 2231 1 ! IMPLICIT INPUTS: ; 2232 1 ! ; 2233 1 ! RCV_EOL - Receive end-of-line character ; 2234 1 ! ; 2235 1 ! OUPTUT PARAMETERS: ; 2236 1 ! ; 2237 1 ! None. ; 2238 1 ! ; 2239 1 ! IMPLICIT OUTPUTS: ; 2240 1 ! ; 2241 1 ! IO_STATUS - IOSB for the QIO ; 2242 1 ! RCV_BUFFER - Data input from terminal ; 2243 1 ! ; 2244 1 ! COMPLETION CODES: ; 2245 1 ! ; 2246 1 ! None. ; 2247 1 ! ; 2248 1 ! SIDE EFFECTS: ; 2249 1 ! ; 2250 1 ! TERM_EFN is set when I/O completes ; 2251 1 ! ; 2252 1 !-- ; 2253 1 ; 2254 2 BEGIN ; 2255 2 ; 2256 2 EXTERNAL ; 2257 2 ABT_CUR_FILE, ; 2258 2 ABT_ALL_FILE, ; 2259 2 DEBUG_FLAG, ; 2260 2 TYP_STS_FLAG; ; 2261 2 ; 2262 2 LOCAL ; 2263 2 I, ! Random index variable ; 2264 2 TERMINATOR : VECTOR [2, LONG], ! Pointer at terminator mask ; 2265 2 TERM_MASK : VECTOR [8, LONG], ! Terminator mask ; 2266 2 STATUS; ! For status of QIO call ; 2267 2 ; 2268 2 LITERAL ; 2269 2 CONS_BUFF_SIZE = 1; ; 2270 2 ; 2271 2 OWN ; 2272 2 CONS_STATUS : VECTOR [4, WORD], ; 2273 2 CONS_BUFFER : VECTOR [CONS_BUFF_SIZE, BYTE]; ; 2274 2 ; 2275 2 ! ; 2276 2 ! AST routine for console ; 2277 2 ! ; 2278 2 ROUTINE CONS_AST (DUMMY) = ; 2279 3 BEGIN ; 2280 3 ; 2281 3 IF .CONS_STATUS [0] ; 2282 3 THEN ; 2283 3 ; 2284 3 SELECT .CONS_STATUS [2] OF ; 2285 3 SET ; 2286 3 ; 2287 3 [CHR_CTL_Z] : ; 2288 3 ABT_ALL_FILE = TRUE; ; 2289 3 ; 2290 3 [CHR_CTL_X] : ; 2291 3 ABT_CUR_FILE = TRUE; ; 2292 3 ; 2293 3 [CHR_CTL_Y] : ; 2294 3 RETURN SS$_NORMAL; ; 2295 3 ; 2296 3 [CHR_CTL_C] : ; 2297 4 BEGIN ; 2298 4 FORCE_TIMEOUT = TRUE; ; 2299 4 FORCE_ABORT = TRUE; ; 2300 3 END; ; 2301 3 ; 2302 3 [CHR_CTL_D] : ; 2303 3 DEBUG_FLAG = NOT .DEBUG_FLAG; ; 2304 3 ; 2305 3 [CHR_CTL_A] : ; 2306 3 TYP_STS_FLAG = TRUE; ; 2307 3 ; 2308 3 [CHR_CTL_M] : ; 2309 3 FORCE_TIMEOUT = TRUE; ; 2310 3 ; 2311 3 [CHR_CTL_Z, CHR_CTL_X, CHR_CTL_A, CHR_CTL_M, CHR_CTL_C] : ; 2312 3 ![021] Make sure what we did gets noticed, even if we are currently waiting ; 2313 3 ![021] forever for input. ; 2314 3 ; 2315 3 IF .FORCE_TIMEOUT OR .SEND_TIMEOUT EQL 0 THEN $SETEF (EFN = TIME_EFN); ; 2316 3 ; 2317 3 TES; ; 2318 3 ; 2319 3 IF .CONS_STATUS [0] NEQ SS$_CANCEL AND .CONS_STATUS [0] NEQ SS$_ABORT ; 2320 3 THEN ; 2321 3 RETURN DO_CONS_QIO () ; 2322 3 ELSE ; 2323 3 RETURN SS$_NORMAL; ; 2324 3 ; 2325 2 END; .PSECT $OWN$,NOEXE,2 ;CONS_STATUS U.60: .BLKB 8 ;CONS_BUFFER U.61: .BLKB 1 .EXTRN ABT_CUR_FILE, ABT_ALL_FILE, DEBUG_FLAG, TYP_STS_FLAG, SYS$SETEF .PSECT $CODE$,NOWRT,2 ;CONS_AST U.62: .WORD ^M ;Save R2 ; 2278 MOVAB W^U.60, R2 ;U.60, R2 ; BLBC (R2), 9$ ;CONS_STATUS, 9$ ; 2281 MOVZWL 4(R2), R0 ;CONS_STATUS+4, R0 ; 2284 CMPW R0, #26 ;R0, #26 ; 2287 BNEQ 1$ ;1$ ; MOVL #1, W^ABT_ALL_FILE ;#1, ABT_ALL_FILE ; 2288 1$: CMPW R0, #24 ;R0, #24 ; 2290 BNEQ 2$ ;2$ ; MOVL #1, W^ABT_CUR_FILE ;#1, ABT_CUR_FILE ; 2291 2$: CMPW R0, #25 ;R0, #25 ; 2293 BEQL 10$ ;10$ ; CMPW R0, #3 ;R0, #3 ; 2296 BNEQ 3$ ;3$ ; MOVL #1, -980(R2) ;#1, FORCE_TIMEOUT ; 2298 MOVL #1, -984(R2) ;#1, FORCE_ABORT ; 2299 3$: CMPW R0, #4 ;R0, #4 ; 2302 BNEQ 4$ ;4$ ; MCOML W^DEBUG_FLAG, W^DEBUG_FLAG ;DEBUG_FLAG, DEBUG_FLAG ; 2303 4$: CMPW R0, #1 ;R0, #1 ; 2305 BNEQ 5$ ;5$ ; MOVL #1, W^TYP_STS_FLAG ;#1, TYP_STS_FLAG ; 2306 5$: CMPW R0, #13 ;R0, #13 ; 2308 BNEQ 6$ ;6$ ; MOVL #1, -980(R2) ;#1, FORCE_TIMEOUT ; 2309 6$: CMPW R0, #1 ;R0, #1 ; 2311 BEQL 7$ ;7$ ; CMPW R0, #3 ;R0, #3 ; BEQL 7$ ;7$ ; CMPW R0, #13 ;R0, #13 ; BEQL 7$ ;7$ ; CMPW R0, #24 ;R0, #24 ; BEQL 7$ ;7$ ; CMPW R0, #26 ;R0, #26 ; BNEQ 9$ ;9$ ; 7$: BLBS -980(R2), 8$ ;FORCE_TIMEOUT, 8$ ; 2315 TSTL W^SEND_TIMEOUT ;SEND_TIMEOUT ; BNEQ 9$ ;9$ ; 8$: PUSHL #3 ;#3 ; CALLS #1, G^SYS$SETEF ;#1, SYS$SETEF ; 9$: CMPW (R2), #2096 ;CONS_STATUS, #2096 ; 2319 BEQL 10$ ;10$ ; CMPW (R2), #44 ;CONS_STATUS, #44 ; BEQL 10$ ;10$ ; CALLS #0, W^U.41 ;#0, U.41 ; 2321 RET ; ; 2323 10$: MOVL #1, R0 ;#1, R0 ; RET ; ; 2325 ; Routine Size: 153 bytes, Routine Base: $CODE$ + 0A4D ; 2326 2 ! ; 2327 2 ! Start of main portion of DO_CONS_QIO ; 2328 2 ! ; 2329 2 TERMINATOR [0] = 32; ! Length of terminator mask in bytes ; 2330 2 TERMINATOR [1] = TERM_MASK; ! Address of mask ; 2331 2 ; 2332 2 INCR I FROM 0 TO 7 DO ; 2333 2 TERM_MASK [.I] = -1; ! All characters are terminators ; 2334 2 ; P 2335 2 RETURN $QIO (CHAN = .CONS_CHAN, EFN = CONS_EFN, FUNC = IO$_TTYREADALL OR IO$M_NOECHO, ; P 2336 2 IOSB = CONS_STATUS, ASTADR = CONS_AST, P1 = CONS_BUFFER, P2 = CONS_BUFF_SIZE, ; 2337 2 P4 = TERMINATOR); ; 2338 1 END; ! End of DO_CONS_QIO ;DO_CONS_QIO U.41: .WORD ^M<> ;Save nothing ; 2215 SUBL2 #40, SP ;#40, SP ; MOVL #32, 32(SP) ;#32, TERMINATOR ; 2329 MOVAB (SP), 36(SP) ;TERM_MASK, TERMINATOR+4 ; 2330 CLRL R0 ;I ; 2332 1$: MNEGL #1, (SP)[R0] ;#1, TERM_MASK[I] ; 2333 AOBLEQ #7, R0, 1$ ;#7, I, 1$ ; CLRQ -(SP) ;-(SP) ; 2337 PUSHAB 40(SP) ;TERMINATOR ; MOVQ #1, -(SP) ;#1, -(SP) ; PUSHAB W^U.61 ;U.61 ; CLRL -(SP) ;-(SP) ; PUSHAB W^U.62 ;U.62 ; PUSHAB W^U.60 ;U.60 ; MOVZBL #122, -(SP) ;#122, -(SP) ; PUSHL W^U.5 ;U.5 ; PUSHL #5 ;#5 ; CALLS #12, G^SYS$QIO ;#12, SYS$QIO ; RET ; ; 2338 ; Routine Size: 63 bytes, Routine Base: $CODE$ + 0AE6 ; 2339 1 %SBTTL 'TERM_CONNECT' ; 2340 1 ; 2341 1 GLOBAL ROUTINE TERM_CONNECT = ; 2342 1 ; 2343 1 !++ ; 2344 1 ! FUNCTIONAL DESCRIPTION: ; 2345 1 ! ; 2346 1 ! This routine TERM_CONNECT will enable two terminal-like devices, ; 2347 1 ! MY_TERM and TERM_NAME, to communicate with each other. Anything ; 2348 1 ! that the user types on his terminal, MYTERM, will be sent to the ; 2349 1 ! other device, TERM_NAME, over the terminal line TERM_CHAN. ; 2350 1 ! Anything that TERM_NAME cares to output will be sent to MYTERM. ; 2351 1 ! The main routine TERM_CONNECT performs the initialization. It ; 2352 1 ! opens the input and output files and connects streams. ; 2353 1 ! ; 2354 1 ! CALLING SEQUENCE: ; 2355 1 ! ; 2356 1 ! TERM_CONNECT(); ; 2357 1 ! ; 2358 1 ! INPUT PARAMETERS: ; 2359 1 ! ; 2360 1 ! None. ; 2361 1 ! ; 2362 1 ! IMPLICIT INPUTS: ; 2363 1 ! ; 2364 1 ! TERM_DESC - Descriptor of a vector of ASCII characters that represent ; 2365 1 ! the name of the terminal to use. ; 2366 1 ! ; 2367 1 ! OUTPUT PARAMETERS: ; 2368 1 ! ; 2369 1 ! None. ; 2370 1 ! ; 2371 1 ! IMPLICIT OUTPUTS: ; 2372 1 ! ; 2373 1 ! TERM_CHAN - Channel number used by the terminal line to TERM_DESC. ; 2374 1 ! ; 2375 1 ! COMPLETION CODES: ; 2376 1 ! ; 2377 1 ! SS$_NORMAL or error condition. ; 2378 1 ! ; 2379 1 ! SIDE EFFECTS: ; 2380 1 ! ; 2381 1 ! None. ; 2382 1 ! ; 2383 1 !-- ; 2384 1 ; 2385 2 BEGIN ; 2386 2 ; 2387 2 EXTERNAL ROUTINE ; 2388 2 LOG_OPEN, ! Open log file ; 2389 2 LOG_CLOSE; ! Close log file ; 2390 2 ; 2391 2 LITERAL ; 2392 2 OUT_BUFLEN = 80, ! Max # of char. in output buffer ; 2393 2 INP_BUFSIZ = 25, ! Max # of char. in input buffer ; 2394 2 NUM_OUT_BUF = 2, ! # of output buffers per device ; 2395 2 NUM_IN_BUF = 2, ! # of input buffers per device ; 2396 2 MYT = 0, ! Device MY_TERM ; 2397 2 TRM = 1, ! Device TERM_NAME ; 2398 2 OFFSET = 1, ! IOSB : offset to terminator ; 2399 2 ![031] TIMEUP = 1, ! Time limit for READ QIO ; 2400 2 EOFSIZ = 3, ! IOSB : terminator size ; 2401 2 T_EFN_DISP = NUM_OUT_BUF, ; 2402 2 XITEFN = 2*NUM_OUT_BUF + 1, ! Exit event flag number ; 2403 2 EFN_MASK = (1^XITEFN - 1) AND ( NOT 1); ! Mask of flags set by CONNECT ; 2404 2 ; 2405 2 STRUCTURE ; 2406 2 IOSB_VECTOR [D, BUFNUM, INFO; NUMBUF] = ; 2407 2 [NUMBUF*16] ; 2408 2 (IOSB_VECTOR + (D*NUMBUF + BUFNUM)*8 + 2*INFO)<0, 16, 0>, ; 2409 2 BUFFER_VECTOR [D, BUFNUM; NUMBUF, BUFSIZ] = ; 2410 2 [NUMBUF*BUFSIZ*2 + NUMBUF] ; 2411 2 (BUFFER_VECTOR + (D*NUMBUF + BUFNUM)*BUFSIZ + D); ; 2412 2 ; 2413 2 OWN ; 2414 2 BTIMUP : VECTOR [4, WORD], ! Time limit in binary format ; 2415 2 CHANNEL : VECTOR [2, LONG], ! Contains channel #s ; 2416 2 CHR_COUNT : VECTOR [2, WORD] INITIAL (0), ! # of char. in out buffer ; 2417 2 ESC_FLG : INITIAL (FALSE), ! Was last char. the ESCAPE_CHR ; 2418 2 IN_IOSB : IOSB_VECTOR [NUM_IN_BUF], ! IOSB status block ; 2419 2 INP_BUF : BUFFER_VECTOR [NUM_IN_BUF, INP_BUFSIZ], ! Input buffers ; 2420 2 MSG : VECTOR [80, BYTE], ! Combined escape message ; 2421 2 MSG_DES : BLOCK [8, BYTE], ! Descriptor for message ; 2422 2 OUT_BUF : BUFFER_VECTOR [NUM_OUT_BUF, OUT_BUFLEN], ! Output buffers ; 2423 2 OUT_BUFNUM : VECTOR [2, BYTE], ! Present output buffer ; 2424 2 OUT_EFN : VECTOR [2, BYTE], ! Present event flag # ; 2425 2 OUT_PTR : VECTOR [2, LONG], ! CS-pointer for output buffer ; 2426 2 MYT_QIO_FUNC, ![006] Function for QIO input for my terminal ; 2427 2 ESC_CHR_LEN, ! Length of escape character message ; 2428 2 ESC_CHR_MSG : VECTOR [30, BYTE], ! Escape character message ; 2429 2 STATE; ! Used by $READEF to store state of EFs ; 2430 2 ; 2431 2 BIND ; 2432 2 CON_MSG_1 = %ASCID'Connecting to ', ; 2433 2 CON_MSG_2 = %ASCID'. Type ', ; 2434 2 CON_MSG_3 = %ASCID'C to return to VAX/VMS Kermit-32]', ; 2435 2 CON_MSG_4 = %ASCID'Returning to VAX/VMS Kermit-32]'; ; 2436 2 ; 2437 2 MAP ; 2438 2 CON_MSG_1 : BLOCK [8, BYTE], ; 2439 2 CON_MSG_2 : BLOCK [8, BYTE], ; 2440 2 CON_MSG_3 : BLOCK [8, BYTE], ; 2441 2 CON_MSG_4 : BLOCK [8, BYTE]; ; 2442 2 ; 2443 2 BIND ; 2444 2 ATIMUP = %ASCID'0 00:00:00.050', ![031] Time to wait for more output ; 2445 2 MYT_CHAN = CHANNEL [1], ; 2446 2 MY_TERM = %ASCID'SYS$INPUT:'; ; 2447 2 ; 2448 2 LABEL ; 2449 2 CONN_STREAMS; ; 2450 2 ; 2451 2 LOCAL ; 2452 2 CON_MSG : VECTOR [80, BYTE], ; 2453 2 CON_MSG_DESC : BLOCK [8, BYTE], ; 2454 2 STATUS; ; 2455 2 ; 2456 2 %SBTTL 'TERM_CONNECT -- TYPE_OUT_BUF' ; 2457 2 ROUTINE TYPE_OUT_BUF (DEV) = ; 2458 2 ; 2459 2 !++ ; 2460 2 ! This routine send the contents of the output buffer to the other ; 2461 2 ! device. It also resets the OUT_PTR and the CHR_COUNT and it ; 2462 2 ! increments OUT_EFN and OUT_BUFNUM. ; 2463 2 !-- ; 2464 2 ; 2465 3 BEGIN ; 2466 3 ; 2467 3 LOCAL ; 2468 3 STATUS; ; 2469 3 ; 2470 3 ! Check to make sure exit flag not set before $QIO ; 2471 3 ; 2472 3 IF (STATUS = $READEF (EFN = XITEFN, STATE = STATE)) NEQ SS$_WASCLR ; 2473 3 THEN ; 2474 4 BEGIN ; 2475 4 $SETEF (EFN = .OUT_EFN [.DEV]); ; 2476 4 RETURN .STATUS; ; 2477 3 END; ; 2478 3 ; 2479 3 $WAITFR (EFN = .OUT_EFN [.DEV]); ; 2480 3 $CLREF (EFN = .OUT_EFN [.DEV]); ; 2481 3 ; 2482 3 IF $READEF (EFN = XITEFN, STATE = STATE) EQL SS$_WASCLR ; 2483 3 THEN ; P 2484 3 STATUS = $QIO (CHAN = .CHANNEL [.DEV], EFN = .OUT_EFN [.DEV], ; P 2485 3 FUNC = IO$_WRITEVBLK OR IO$M_NOFORMAT, P1 = OUT_BUF [.DEV, .OUT_BUFNUM [.DEV]], ; 2486 4 P2 = .CHR_COUNT [.DEV]) ; 2487 3 ELSE ; 2488 4 BEGIN ; 2489 4 $SETEF (EFN = .OUT_EFN [.DEV]); ; 2490 4 RETURN .STATUS; ; 2491 3 END; ; 2492 3 ; 2493 3 CHR_COUNT [.DEV] = 0; ; 2494 3 OUT_EFN [.DEV] = .OUT_EFN [.DEV] + 1; ; 2495 3 ; 2496 3 IF (OUT_BUFNUM [.DEV] = .OUT_BUFNUM [.DEV] + 1) GEQ NUM_OUT_BUF ; 2497 3 THEN ; 2498 4 BEGIN ; 2499 4 OUT_BUFNUM [.DEV] = 0; ; 2500 4 OUT_EFN [.DEV] = .DEV*T_EFN_DISP + 1; ; 2501 3 END; ; 2502 3 ; 2503 3 OUT_PTR [.DEV] = CH$PTR (OUT_BUF [.DEV, .OUT_BUFNUM [.DEV]]); ; 2504 3 ; 2505 3 IF NOT .STATUS ; 2506 3 THEN ; 2507 4 BEGIN ; 2508 4 LIB$SIGNAL (.STATUS); ; 2509 4 $SETEF (EFN = XITEFN); ; 2510 3 END; ; 2511 3 ; 2512 3 RETURN .STATUS; ; 2513 2 END; .PSECT $PLIT$,NOWRT,NOEXE,2 P.ABB: .ASCII \Connecting to \<0><0> ; ; P.ABA: .LONG 17694734 ; ; .ADDRESS P.ABB ; ; P.ABD: .ASCII \. Type \ ; ; P.ABC: .LONG 17694728 ; ; .ADDRESS P.ABD ; ; P.ABF: .ASCII \C to return to VAX/VMS Kermit-32]\<0><0><0> ; ; P.ABE: .LONG 17694753 ; ; .ADDRESS P.ABF ; ; P.ABH: .ASCII \Returning to VAX/VMS Kermit-32]\<0> ; ; P.ABG: .LONG 17694751 ; ; .ADDRESS P.ABH ; ; P.ABJ: .ASCII \0 00:00:00.050\<0><0> ; ; P.ABI: .LONG 17694734 ; ; .ADDRESS P.ABJ ; ; P.ABL: .ASCII \SYS$INPUT:\<0><0> ; ; P.ABK: .LONG 17694730 ; ; .ADDRESS P.ABL ; ; .PSECT $OWN$,NOEXE,2 .BLKB 3 ;BTIMUP U.64: .BLKB 8 ;CHANNEL U.65: .BLKB 8 ;CHR_COUNT U.66: .LONG 0 ; ; ;ESC_FLG U.67: .LONG 0 ; ; ;IN_IOSB U.68: .BLKB 32 ;INP_BUF U.69: .BLKB 102 .BLKB 2 ;MSG U.70: .BLKB 80 ;MSG_DES U.71: .BLKB 8 ;OUT_BUF U.72: .BLKB 322 .BLKB 2 ;OUT_BUFNUM U.73: .BLKB 2 .BLKB 2 ;OUT_EFN U.74: .BLKB 2 .BLKB 2 ;OUT_PTR U.75: .BLKB 8 ;MYT_QIO_FUNC U.76: .BLKB 4 ;ESC_CHR_LEN U.77: .BLKB 4 ;ESC_CHR_MSG U.78: .BLKB 30 .BLKB 2 ;STATE U.79: .BLKB 4 U.80= P.ABA U.81= P.ABC U.82= P.ABE U.83= P.ABG U.88= P.ABI U.89= U.65+4 U.90= P.ABK .PSECT $CODE$,NOWRT,2 ;TYPE_OUT_BUF U.91: .WORD ^M ;Save R2,R3,R4,R5,R6 ; 2457 MOVAB G^SYS$READEF, R6 ;SYS$READEF, R6 ; MOVAB W^U.79, R5 ;U.79, R5 ; PUSHL R5 ;R5 ; 2472 PUSHL #5 ;#5 ; CALLS #2, (R6) ;#2, SYS$READEF ; MOVL R0, R4 ;R0, STATUS ; CMPL R4, #1 ;STATUS, #1 ; BEQL 1$ ;1$ ; MOVAB -52(R5), R0 ;OUT_EFN, R0 ; 2475 MOVZBL @4(AP)[R0], -(SP) ;@DEV[R0], -(SP) ; BRB 3$ ;3$ ; 1$: MOVL 4(AP), R2 ;DEV, R2 ; 2479 MOVAB -52(R5)[R2], R3 ;OUT_EFN[R2], R3 ; MOVZBL (R3), -(SP) ;(R3), -(SP) ; CALLS #1, G^SYS$WAITFR ;#1, SYS$WAITFR ; MOVZBL (R3), -(SP) ;(R3), -(SP) ; 2480 CALLS #1, G^SYS$CLREF ;#1, SYS$CLREF ; PUSHL R5 ;R5 ; 2482 PUSHL #5 ;#5 ; CALLS #2, (R6) ;#2, SYS$READEF ; CMPL R0, #1 ;R0, #1 ; BNEQ 2$ ;2$ ; CLRQ -(SP) ;-(SP) ; 2486 CLRQ -(SP) ;-(SP) ; MOVZWL -612(R5)[R2], -(SP) ;CHR_COUNT[R2], -(SP) ; MOVZBL -56(R5)[R2], R0 ;OUT_BUFNUM[R2], R0 ; MOVAW (R0)[R2], R0 ;(R0)[R2], R0 ; MULL2 #80, R0 ;#80, R0 ; MOVAB -380(R5)[R0], R0 ;OUT_BUF[R0], R0 ; PUSHAB (R2)[R0] ;(R2)[R0] ; CLRQ -(SP) ;-(SP) ; CLRL -(SP) ;-(SP) ; MOVZWL #304, -(SP) ;#304, -(SP) ; PUSHL -620(R5)[R2] ;CHANNEL[R2] ; MOVZBL (R3), -(SP) ;(R3), -(SP) ; CALLS #12, G^SYS$QIO ;#12, SYS$QIO ; MOVL R0, R4 ;R0, STATUS ; BRB 4$ ;4$ ; 2484 2$: MOVZBL (R3), -(SP) ;(R3), -(SP) ; 2489 3$: BRB 6$ ;6$ ; 4$: CLRW -612(R5)[R2] ;CHR_COUNT[R2] ; 2493 INCB (R3) ;(R3) ; 2494 MOVAB -56(R5)[R2], R1 ;OUT_BUFNUM[R2], R1 ; 2496 MOVZBL (R1), R0 ;(R1), R0 ; INCL R0 ;R0 ; MOVB R0, (R1) ;R0, (R1) ; CMPL R0, #2 ;R0, #2 ; BLSS 5$ ;5$ ; CLRB (R1) ;(R1) ; 2499 ASHL #1, R2, R0 ;#1, R2, R0 ; 2500 ADDB3 #1, R0, (R3) ;#1, R0, (R3) ; 5$: MOVZBL (R1), R0 ;(R1), R0 ; 2503 MOVAW (R0)[R2], R0 ;(R0)[R2], R0 ; MULL2 #80, R0 ;#80, R0 ; MOVAB -380(R5)[R0], R0 ;OUT_BUF[R0], R0 ; ADDL3 R2, R0, -48(R5)[R2] ;R2, R0, OUT_PTR[R2] ; BLBS R4, 7$ ;STATUS, 7$ ; 2505 PUSHL R4 ;STATUS ; 2508 CALLS #1, G^LIB$SIGNAL ;#1, LIB$SIGNAL ; PUSHL #5 ;#5 ; 2509 6$: CALLS #1, G^SYS$SETEF ;#1, SYS$SETEF ; 7$: MOVL R4, R0 ;STATUS, R0 ; 2512 RET ; ; 2513 ; Routine Size: 236 bytes, Routine Base: $CODE$ + 0B25 ; 2514 2 %SBTTL 'TERM_CONNECT -- TIME_UP' ; 2515 2 ROUTINE TIME_UP (OUTEFN) : NOVALUE = ; 2516 2 ; 2517 2 !++ ; 2518 2 ! AST routine called 0.1 second after first character is input. It calls ; 2519 2 ! TYPE_OUT_BUF to transmit output buffer. ; 2520 2 !-- ; 2521 2 ; 2522 3 BEGIN ; 2523 3 ; 2524 3 LOCAL ; 2525 3 DEV; ; 2526 3 ; 2527 3 IF (.OUTEFN - T_EFN_DISP) LEQ 0 ; 2528 3 THEN ; 2529 3 DEV = 0 ! Device was MY_TERM ; 2530 3 ELSE ; 2531 3 DEV = 1; ! Device was TERM_NAME ; 2532 3 ; 2533 3 TYPE_OUT_BUF (.DEV); ; 2534 2 END; ! End of TIME_UP ;TIME_UP U.92: .WORD ^M<> ;Save nothing ; 2515 SUBL3 #2, 4(AP), R0 ;#2, OUTEFN, R0 ; 2527 BGTR 1$ ;1$ ; CLRL R0 ;DEV ; 2529 BRB 2$ ;2$ ; 1$: MOVL #1, R0 ;#1, DEV ; 2531 2$: PUSHL R0 ;DEV ; 2533 CALLS #1, W^U.91 ;#1, U.91 ; RET ; ; 2534 ; Routine Size: 24 bytes, Routine Base: $CODE$ + 0C11 ; 2535 2 %SBTTL 'TERM_CONNECT -- STORE_INPUT' ; 2536 2 ROUTINE STORE_INPUT (DEV, INP_POINTER, NUM_CHR_IN) : NOVALUE = ; 2537 2 ; 2538 2 !++ ; 2539 2 ! This routine stores the input buffer in the output buffer and keeps ; 2540 2 ! track of the number of characters in the output buffer. It also ; 2541 2 ! calls TYPE_OUT_BUF when the output buffer is full and it sets up ; 2542 2 ! the timer routine TIME_UP. ; 2543 2 !-- ; 2544 2 ; 2545 3 BEGIN ; 2546 3 ; 2547 3 EXTERNAL ROUTINE ; 2548 3 LOG_CHAR, ! Routine to log characters ; 2549 3 GEN_PARITY; ![032] Routine to generate parity ; 2550 3 ; 2551 3 LOCAL ; 2552 3 STATUS; ; 2553 3 ; 2554 3 IF (STATUS = $READEF (EFN = XITEFN, STATE = STATE)) NEQ SS$_WASCLR THEN RETURN; ; 2555 3 ; 2556 3 IF .NUM_CHR_IN EQL 0 THEN RETURN .STATUS; ; 2557 3 ; 2558 3 IF .NUM_CHR_IN + .CHR_COUNT [.DEV] GTR OUT_BUFLEN ; 2559 3 THEN ; 2560 4 BEGIN ; 2561 4 ! ; 2562 4 ! If we don't have enough room in the buffer for all of the characters, call ; 2563 4 ! ourself to dump what will fit, then proceed with what remains. ; 2564 4 ! ; 2565 4 ; 2566 4 LOCAL ; 2567 4 SAVED_CHR_CNT; ! Saved character count ; 2568 4 ; 2569 4 SAVED_CHR_CNT = OUT_BUFLEN - .CHR_COUNT [.DEV]; ; 2570 4 NUM_CHR_IN = .NUM_CHR_IN - .SAVED_CHR_CNT; ; 2571 4 STORE_INPUT (.DEV, .INP_POINTER, .SAVED_CHR_CNT); ; 2572 4 INP_POINTER = CH$PLUS (.INP_POINTER, .SAVED_CHR_CNT); ; 2573 3 END; ; 2574 3 ; 2575 3 IF .CHR_COUNT [.DEV] EQL 0 ; 2576 3 THEN ; 2577 4 BEGIN ; 2578 4 STATUS = $SETIMR (DAYTIM = BTIMUP, ASTADR = TIME_UP, REQIDT = .OUT_EFN [.DEV]); ; 2579 4 ; 2580 4 IF NOT .STATUS ; 2581 4 THEN ; 2582 5 BEGIN ; 2583 5 LIB$SIGNAL (.STATUS); ; 2584 5 $SETEF (EFN = XITEFN); ; 2585 5 RETURN .STATUS; ; 2586 4 END; ; 2587 4 ; 2588 3 END; ; 2589 3 ; 2590 3 ![032] We must generate parity for the communications terminal ; 2591 3 ; 2592 3 IF .DEV EQL 0 ; 2593 3 THEN ; 2594 4 BEGIN ; 2595 4 ; 2596 4 LOCAL ; 2597 4 POINTER; ; 2598 4 ; 2599 4 POINTER = .INP_POINTER; ; 2600 4 ; 2601 4 DECR I FROM .NUM_CHR_IN TO 1 DO ; 2602 4 CH$WCHAR_A (GEN_PARITY (CH$RCHAR_A (POINTER)), OUT_PTR [.DEV]); ; 2603 4 ; 2604 4 END ; 2605 3 ELSE ; 2606 3 OUT_PTR [.DEV] = CH$MOVE (.NUM_CHR_IN, .INP_POINTER, .OUT_PTR [.DEV]); ; 2607 3 ; 2608 3 ! ; 2609 3 ! If we want logging, do it now ; 2610 3 ! ; 2611 3 ; 2612 3 IF (.DEV EQL 1 OR .ECHO_FLAG) AND .SESSION_OPEN AND .SESSION_LOGGING ; 2613 3 THEN ; 2614 4 BEGIN ; 2615 4 ; 2616 4 LOCAL ; 2617 4 STATUS, ; 2618 4 POINTER; ; 2619 4 ; 2620 4 POINTER = .INP_POINTER; ; 2621 4 ; 2622 4 DECR I FROM .NUM_CHR_IN TO 1 DO ; 2623 4 ; 2624 4 IF NOT LOG_CHAR (CH$RCHAR_A (POINTER), SESSION_RAB) ; 2625 4 THEN ; 2626 5 BEGIN ; 2627 5 SESSION_LOGGING = FALSE; ; 2628 5 EXITLOOP; ; 2629 4 END; ; 2630 4 ; 2631 3 END; ; 2632 3 ; 2633 3 IF (CHR_COUNT [.DEV] = .CHR_COUNT [.DEV] + .NUM_CHR_IN) GEQ OUT_BUFLEN - INP_BUFSIZ ; 2634 3 THEN ; 2635 4 BEGIN ; 2636 4 $CANTIM (REQIDT = .OUT_EFN [.DEV]); ; 2637 4 TYPE_OUT_BUF (.DEV); ; 2638 3 END; ; 2639 3 ; 2640 3 RETURN .STATUS; ; 2641 2 END; ! End of STORE_INPUT .EXTRN GEN_PARITY ;STORE_INPUT U.93: .WORD ^M ;Save R2,R3,R4,R5,R6,R7,R8,R9 ; 2536 MOVAB W^U.74, R9 ;U.74, R9 ; PUSHAB 52(R9) ;STATE ; 2554 PUSHL #5 ;#5 ; CALLS #2, G^SYS$READEF ;#2, SYS$READEF ; MOVL R0, R3 ;R0, STATUS ; CMPL R3, #1 ;STATUS, #1 ; BEQL 1$ ;1$ ; RET ; ; 1$: TSTL 12(AP) ;NUM_CHR_IN ; 2556 BNEQ 2$ ;2$ ; RET ; ; 2$: MOVL 4(AP), R7 ;DEV, R7 ; 2558 MOVAW -560(R9)[R7], R8 ;CHR_COUNT[R7], R8 ; MOVZWL (R8), R0 ;(R8), R0 ; ADDL2 12(AP), R0 ;NUM_CHR_IN, R0 ; CMPL R0, #80 ;R0, #80 ; BLEQ 3$ ;3$ ; MOVZWL (R8), R2 ;(R8), SAVED_CHR_CNT ; 2569 SUBL3 R2, #80, R2 ;SAVED_CHR_CNT, #80, SAVED_CHR_CNT ; SUBL2 R2, 12(AP) ;SAVED_CHR_CNT, NUM_CHR_IN ; 2570 PUSHL R2 ;SAVED_CHR_CNT ; 2571 PUSHL 8(AP) ;INP_POINTER ; PUSHL R7 ;R7 ; CALLS #3, B^U.93 ;#3, U.93 ; ADDL2 R2, 8(AP) ;SAVED_CHR_CNT, INP_POINTER ; 2572 3$: TSTW (R8) ;(R8) ; 2575 BNEQ 4$ ;4$ ; MOVZBL (R9)[R7], -(SP) ;OUT_EFN[R7], -(SP) ; 2578 PUSHAB B^U.92 ;U.92 ; PUSHAB -576(R9) ;BTIMUP ; CLRL -(SP) ;-(SP) ; CALLS #4, G^SYS$SETIMR ;#4, SYS$SETIMR ; MOVL R0, R3 ;R0, STATUS ; BLBS R3, 4$ ;STATUS, 4$ ; 2580 PUSHL R3 ;STATUS ; 2583 CALLS #1, G^LIB$SIGNAL ;#1, LIB$SIGNAL ; PUSHL #5 ;#5 ; 2584 CALLS #1, G^SYS$SETEF ;#1, SYS$SETEF ; RET ; ; 2585 4$: MOVAL 4(R9)[R7], R6 ;OUT_PTR[R7], R6 ; 2602 TSTL R7 ;R7 ; 2592 BNEQ 7$ ;7$ ; MOVL 8(AP), R3 ;INP_POINTER, POINTER ; 2599 ADDL3 #1, 12(AP), R2 ;#1, NUM_CHR_IN, I ; 2602 BRB 6$ ;6$ ; 5$: MOVZBL (R3)+, -(SP) ;(POINTER)+, -(SP) ; CALLS #1, W^GEN_PARITY ;#1, GEN_PARITY ; MOVB R0, @0(R6) ;R0, @0(R6) ; INCL (R6) ;(R6) ; 6$: SOBGTR R2, 5$ ;I, 5$ ; BRB 8$ ;8$ ; 2592 7$: MOVC3 12(AP), @8(AP), @0(R6) ;NUM_CHR_IN, @INP_POINTER, @0(R6) ; 2606 MOVL R3, (R6) ;R3, (R6) ; 8$: CMPL R7, #1 ;R7, #1 ; 2612 BEQL 9$ ;9$ ; BLBC W^ECHO_FLAG, 12$ ;ECHO_FLAG, 12$ ; 9$: BLBC -1172(R9), 12$ ;SESSION_OPEN, 12$ ; BLBC -1168(R9), 12$ ;SESSION_LOGGING, 12$ ; MOVL 8(AP), R3 ;INP_POINTER, POINTER ; 2620 ADDL3 #1, 12(AP), R2 ;#1, NUM_CHR_IN, I ; 2622 BRB 11$ ;11$ ; 10$: PUSHAB -1372(R9) ;SESSION_RAB ; 2624 MOVZBL (R3)+, -(SP) ;(POINTER)+, -(SP) ; CALLS #2, W^LOG_CHAR ;#2, LOG_CHAR ; BLBS R0, 11$ ;R0, 11$ ; CLRL -1168(R9) ;SESSION_LOGGING ; 2627 BRB 12$ ;12$ ; 2626 11$: SOBGTR R2, 10$ ;I, 10$ ; 2624 12$: MOVZWL (R8), R0 ;(R8), R0 ; 2633 ADDL2 12(AP), R0 ;NUM_CHR_IN, R0 ; MOVW R0, (R8) ;R0, (R8) ; CMPL R0, #55 ;R0, #55 ; BLSS 13$ ;13$ ; CLRL -(SP) ;-(SP) ; 2636 MOVZBL (R9)[R7], -(SP) ;OUT_EFN[R7], -(SP) ; CALLS #2, G^SYS$CANTIM ;#2, SYS$CANTIM ; PUSHL R7 ;R7 ; 2637 CALLS #1, W^U.91 ;#1, U.91 ; 13$: RET ; ; 2641 ; Routine Size: 279 bytes, Routine Base: $CODE$ + 0C29 ; 2642 2 %SBTTL 'TERM_CONNECT -- MYTINP' ; 2643 2 ROUTINE MYTINP (INP_BUFNUM) = ; 2644 2 ; 2645 2 !++ ; 2646 2 ! This AST routine gets characters from the channel MYT_CHAN and outputs ; 2647 2 ! them on the channel TERM_CHAN. It also checks to see if the exit ; 2648 2 ! characters have been typed. If they have been typed, MYTINP sets the ; 2649 2 ! event flag XITEFN. INP_BUFNUM contains the # of the input buffer. ; 2650 2 !-- ; 2651 2 ; 2652 3 BEGIN ; 2653 3 ; 2654 3 OWN ; 2655 3 STATUS, ; 2656 3 NUM_CHR_IN; ; 2657 3 ; 2658 3 %SBTTL 'TERM_CONNECT -- MYTINP -- CHK_FOR_EXIT' ; 2659 3 ROUTINE CHK_FOR_EXIT (INP_BUFNUM) = ; 2660 3 ; 2661 3 !++ ; 2662 3 ! This routine checks to see if the exit characters have been typed. It ; 2663 3 ! returns TRUE if found and FALSE if not. If only 1 ESCAPE_CHR found ; 2664 3 ! then ESC_FLG is set to TRUE. ; 2665 3 !-- ; 2666 3 ; 2667 4 BEGIN ; 2668 4 ROUTINE TYPE_MSG (MSG_DESC, OPEN_FLAG, CLOSE_FLAG, CRLF_FLAG) : NOVALUE = ; 2669 5 BEGIN ; 2670 5 ; 2671 5 MAP ; 2672 5 MSG_DESC : REF BLOCK [8, BYTE]; ; 2673 5 ; 2674 5 IF .OPEN_FLAG ; 2675 5 THEN ; 2676 6 BEGIN ; 2677 6 STORE_INPUT (TRM, CH$PTR (UPLIT BYTE(%C'[')), 1); ; 2678 6 ; 2679 6 IF .NODE_DESC [DSC$W_LENGTH] GTR 0 ; 2680 6 THEN ; 2681 6 STORE_INPUT (TRM, ; 2682 6 CH$PTR (.NODE_DESC [DSC$A_POINTER]), .NODE_DESC [DSC$W_LENGTH]); ; 2683 6 ; 2684 5 END; ; 2685 5 ; 2686 5 STORE_INPUT (TRM, CH$PTR (.MSG_DESC [DSC$A_POINTER]), .MSG_DESC [DSC$W_LENGTH]); ; 2687 5 ; 2688 5 IF .CLOSE_FLAG THEN STORE_INPUT (TRM, CH$PTR (UPLIT BYTE(%C']')), 1); ; 2689 5 ; 2690 5 IF .CRLF_FLAG THEN STORE_INPUT (TRM, CH$PTR (UPLIT BYTE(CHR_CRT, CHR_LFD)), 2); ; 2691 5 ; 2692 4 END; .PSECT $PLIT$,NOWRT,NOEXE,2 P.ABM: .BYTE 91 ; ; P.ABN: .BYTE 93 ; ; P.ABO: .BYTE 13, 10 ; ; .PSECT $OWN$,NOEXE,2 ;STATUS U.95: .BLKB 4 ;NUM_CHR_IN U.96: .BLKB 4 .PSECT $CODE$,NOWRT,2 ;TYPE_MSG U.98: .WORD ^M ;Save R2 ; 2668 MOVAB W^U.93, R2 ;U.93, R2 ; BLBC 8(AP), 1$ ;OPEN_FLAG, 1$ ; 2674 PUSHL #1 ;#1 ; 2677 PUSHAB W^P.ABM ;P.ABM ; PUSHL #1 ;#1 ; CALLS #3, (R2) ;#3, STORE_INPUT ; MOVZWL W^NODE_DESC, R0 ;NODE_DESC, R0 ; 2679 BLEQ 1$ ;1$ ; PUSHL R0 ;R0 ; 2682 PUSHL W^NODE_DESC+4 ;NODE_DESC+4 ; PUSHL #1 ;#1 ; CALLS #3, (R2) ;#3, STORE_INPUT ; 1$: MOVL 4(AP), R0 ;MSG_DESC, R0 ; 2686 MOVZWL (R0), -(SP) ;(R0), -(SP) ; PUSHL 4(R0) ;4(R0) ; PUSHL #1 ;#1 ; CALLS #3, (R2) ;#3, STORE_INPUT ; BLBC 12(AP), 2$ ;CLOSE_FLAG, 2$ ; 2688 PUSHL #1 ;#1 ; PUSHAB W^P.ABN ;P.ABN ; PUSHL #1 ;#1 ; CALLS #3, (R2) ;#3, STORE_INPUT ; 2$: BLBC 16(AP), 3$ ;CRLF_FLAG, 3$ ; 2690 PUSHL #2 ;#2 ; PUSHAB W^P.ABO ;P.ABO ; PUSHL #1 ;#1 ; CALLS #3, (R2) ;#3, STORE_INPUT ; 3$: RET ; ; 2692 ; Routine Size: 86 bytes, Routine Base: $CODE$ + 0D40 ; 2693 4 ; 2694 4 LOCAL ; 2695 4 EAT_CHR, ! Number of input characters to eat ; 2696 4 ESC_PTR, ; 2697 4 INDEX : INITIAL (0), ! Displacement of ESC from beginning of buffer ; 2698 4 PTR0; ! Points to beginning of input buffer ; 2699 4 ; 2700 4 PTR0 = CH$PTR (INP_BUF [MYT, .INP_BUFNUM]); ; 2701 4 ; 2702 4 IF .ESC_FLG EQL TRUE ! ESCAPE_CHR was previously typed. ; 2703 4 THEN ; 2704 5 BEGIN ; 2705 5 INDEX = 0; ; 2706 5 ESC_PTR = .PTR0; ; 2707 5 ESC_FLG = FALSE; ; 2708 5 END ; 2709 4 ELSE ; 2710 4 ; 2711 4 IF (ESC_PTR = CH$FIND_CH (.NUM_CHR_IN, .PTR0, .ESCAPE_CHR)) EQL 0 ; 2712 4 THEN ; 2713 4 RETURN FALSE ; 2714 4 ELSE ; 2715 5 BEGIN ; 2716 5 INDEX = CH$DIFF (.PTR0, .ESC_PTR); ; 2717 5 ; 2718 6 IF .INDEX NEQ (NUM_CHR_IN = .NUM_CHR_IN - 1) ; 2719 5 THEN ; 2720 6 BEGIN ; 2721 6 CH$COPY (.NUM_CHR_IN - .INDEX, CH$PLUS (.ESC_PTR, 1), 0, ; 2722 6 .NUM_CHR_IN - .INDEX, .ESC_PTR); ; 2723 6 END ; 2724 5 ELSE ! ESCAPE_CHR was last character. ; 2725 6 BEGIN ; 2726 6 ESC_FLG = TRUE; ; 2727 6 RETURN FALSE; ; 2728 5 END; ; 2729 5 ; 2730 4 END; ; 2731 4 ; 2732 4 EAT_CHR = 0; ! No characters to eat ; 2733 4 ; 2734 4 SELECTONE CH$RCHAR (.ESC_PTR) OF ; 2735 4 SET ; 2736 4 ; 2737 4 ['?'] : ; 2738 5 BEGIN ; 2739 5 TYPE_MSG (%ASCID'Escape commands are:', TRUE, FALSE, TRUE); ; 2740 5 TYPE_MSG (%ASCID' C - Return to VAX/VMS Kermit-32', FALSE, FALSE, TRUE); ; 2741 5 TYPE_MSG (%ASCID' Q - Suspend logging to session log file (if any)', FALSE, ; 2742 5 FALSE, TRUE); ; 2743 5 TYPE_MSG (%ASCID' R - Resume logging to session log file (if any)', FALSE, ; 2744 5 FALSE, TRUE); ; 2745 5 TYPE_MSG (%ASCID' S - Show status', FALSE, FALSE, TRUE); ; 2746 5 TYPE_MSG (%ASCID' 0 - Send a null', FALSE, FALSE, TRUE); ; 2747 5 TYPE_MSG (%ASCID' ? - Type this text', FALSE, FALSE, TRUE); ; 2748 5 TYPE_MSG (%ASCID' ', FALSE, FALSE, FALSE); ; 2749 5 STORE_INPUT (TRM, ESC_CHR_MSG, .ESC_CHR_LEN); ; 2750 5 TYPE_MSG (%ASCID' - Send escape character', FALSE, TRUE, TRUE); ; 2751 5 EAT_CHR = 1; ; 2752 4 END; ; 2753 4 ; 2754 4 ['C', 'c'] : ; 2755 5 BEGIN ; 2756 5 NUM_CHR_IN = .INDEX; ; 2757 5 RETURN TRUE; ; 2758 4 END; ; 2759 4 ; 2760 4 ['Q', 'q'] : ; 2761 5 BEGIN ; 2762 5 ; 2763 5 BIND ; 2764 5 NO_LOG_TEXT = %ASCID'logging already disabled', ; 2765 5 STOP_LOG_TEXT = %ASCID'logging disabled'; ; 2766 5 ; 2767 5 IF .SESSION_LOGGING ; 2768 5 THEN ; 2769 5 TYPE_MSG (STOP_LOG_TEXT, TRUE, TRUE, TRUE) ; 2770 5 ELSE ; 2771 5 TYPE_MSG (NO_LOG_TEXT, TRUE, TRUE, TRUE); ; 2772 5 ; 2773 5 SESSION_LOGGING = FALSE; ; 2774 5 EAT_CHR = 1; ; 2775 4 END; ; 2776 4 ; 2777 4 ['R', 'r'] : ; 2778 5 BEGIN ! Resume logging ; 2779 5 ; 2780 5 BIND ; 2781 5 NO_LOG_TEXT = %ASCID'no log file to enable', ; 2782 5 START_LOG_TEXT = %ASCID'logging enabled'; ; 2783 5 ; 2784 5 SESSION_LOGGING = .SESSION_OPEN; ; 2785 5 ; 2786 5 IF .SESSION_LOGGING ; 2787 5 THEN ; 2788 5 TYPE_MSG (START_LOG_TEXT, TRUE, TRUE, TRUE) ; 2789 5 ELSE ; 2790 5 TYPE_MSG (NO_LOG_TEXT, TRUE, TRUE, TRUE); ; 2791 5 ; 2792 5 EAT_CHR = 1; ; 2793 4 END; ; 2794 4 ; 2795 4 ['S', 's'] : ; 2796 5 BEGIN ; 2797 5 TYPE_MSG (%ASCID'Connected to ', TRUE, FALSE, FALSE); ; 2798 5 TYPE_MSG (TERM_DESC, FALSE, FALSE, TRUE); ; 2799 5 TYPE_MSG (%ASCID' Escape character: "', FALSE, FALSE, FALSE); ; 2800 5 STORE_INPUT (TRM, ESC_CHR_MSG, .ESC_CHR_LEN); ; 2801 5 TYPE_MSG (%ASCID'"', FALSE, FALSE, TRUE); ; 2802 5 TYPE_MSG (%ASCID' Local echo: ', FALSE, FALSE, FALSE); ; 2803 5 ; 2804 5 IF .ECHO_FLAG ; 2805 5 THEN ; 2806 5 TYPE_MSG (%ASCID'On', FALSE, FALSE, TRUE) ; 2807 5 ELSE ; 2808 5 TYPE_MSG (%ASCID'Off', FALSE, FALSE, TRUE); ; 2809 5 ; 2810 5 TYPE_MSG (%ASCID' Parity: ', FALSE, FALSE, FALSE); ; 2811 5 ; 2812 5 CASE .PARITY_TYPE FROM PR_MIN TO PR_MAX OF ; 2813 5 SET ; 2814 5 ; 2815 5 [PR_NONE] : ; 2816 5 TYPE_MSG (%ASCID'None', FALSE, FALSE, TRUE); ; 2817 5 ; 2818 5 [PR_ODD] : ; 2819 5 TYPE_MSG (%ASCID'Odd', FALSE, FALSE, TRUE); ; 2820 5 ; 2821 5 [PR_EVEN] : ; 2822 5 TYPE_MSG (%ASCID'Even', FALSE, FALSE, TRUE); ; 2823 5 ; 2824 5 [PR_MARK] : ; 2825 5 TYPE_MSG (%ASCID'Mark', FALSE, FALSE, TRUE); ; 2826 5 ; 2827 5 [PR_SPACE] : ; 2828 5 TYPE_MSG (%ASCID'Space', FALSE, FALSE, TRUE); ; 2829 5 TES; ; 2830 5 ; 2831 5 TYPE_MSG (%ASCID' Logging: ', FALSE, FALSE, FALSE); ; 2832 5 ; 2833 5 IF .SESSION_OPEN GTR 0 ; 2834 5 THEN ; 2835 6 BEGIN ; 2836 6 TYPE_MSG (SESSION_DESC, FALSE, FALSE, FALSE); ; 2837 6 ; 2838 6 IF .SESSION_LOGGING ; 2839 6 THEN ; 2840 6 TYPE_MSG (%ASCID' Enabled', FALSE, TRUE, TRUE) ; 2841 6 ELSE ; 2842 6 TYPE_MSG (%ASCID' Disabled', FALSE, TRUE, TRUE); ; 2843 6 ; 2844 6 END ; 2845 5 ELSE ; 2846 5 TYPE_MSG (%ASCID' None specifed', FALSE, TRUE, TRUE); ; 2847 5 ; 2848 5 EAT_CHR = 1; ! Eat the "S" ; 2849 4 END; ; 2850 4 ; 2851 4 [.ESCAPE_CHR] : ; 2852 4 CH$WCHAR (.ESCAPE_CHR, .ESC_PTR); ! Write the escape character ; 2853 4 ; 2854 4 ['0'] : ; 2855 4 CH$WCHAR (CHR_NUL, .ESC_PTR); ! Write a null ; 2856 4 ; 2857 4 [OTHERWISE] : ; 2858 5 BEGIN ! Send a bell char. to MY_TERM ; 2859 5 STORE_INPUT (TRM, CH$PTR (UPLIT BYTE(CHR_BEL)), 1); ; 2860 5 EAT_CHR = 1; ! Eat the character ; 2861 4 END; ; 2862 4 TES; ; 2863 4 ; 2864 4 IF .EAT_CHR GTR 0 ; 2865 4 THEN ; 2866 4 ; 2867 4 IF (NUM_CHR_IN = .NUM_CHR_IN - .EAT_CHR) NEQ .INDEX ; 2868 4 THEN ; 2869 4 CH$COPY (.NUM_CHR_IN - .INDEX, CH$PLUS (.ESC_PTR, .EAT_CHR), CHR_NUL, ; 2870 4 .NUM_CHR_IN - .INDEX, .ESC_PTR); ; 2871 4 ; 2872 4 RETURN FALSE; ; 2873 3 END; ! End of CHK_FOR_EXIT .PSECT $PLIT$,NOWRT,NOEXE,2 P.ABQ: .ASCII \Escape commands are:\ ; ; P.ABP: .LONG 17694740 ; ; .ADDRESS P.ABQ ; ; P.ABS: .ASCII <9>\C - Return to VAX/VMS Kermit-32\ ; ; P.ABR: .LONG 17694752 ; ; .ADDRESS P.ABS ; ; P.ABU: .ASCII <9>\Q - Suspend logging to session log file (if any)\<0><0><0> ; ; P.ABT: .LONG 17694769 ; ; .ADDRESS P.ABU ; ; P.ABW: .ASCII <9>\R - Resume logging to session log file (if any)\ ; ; P.ABV: .LONG 17694768 ; ; .ADDRESS P.ABW ; ; P.ABY: .ASCII <9>\S - Show status\ ; ; P.ABX: .LONG 17694736 ; ; .ADDRESS P.ABY ; ; P.ACA: .ASCII <9>\0 - Send a null\ ; ; P.ABZ: .LONG 17694736 ; ; .ADDRESS P.ACA ; ; P.ACC: .ASCII <9>\? - Type this text\<0> ; ; P.ACB: .LONG 17694739 ; ; .ADDRESS P.ACC ; ; P.ACE: .ASCII <9><0><0><0> ; ; P.ACD: .LONG 17694721 ; ; .ADDRESS P.ACE ; ; P.ACG: .ASCII \ - Send escape character\ ; ; P.ACF: .LONG 17694744 ; ; .ADDRESS P.ACG ; ; P.ACI: .ASCII \logging already disabled\ ; ; P.ACH: .LONG 17694744 ; ; .ADDRESS P.ACI ; ; P.ACK: .ASCII \logging disabled\ ; ; P.ACJ: .LONG 17694736 ; ; .ADDRESS P.ACK ; ; P.ACM: .ASCII \no log file to enable\<0><0><0> ; ; P.ACL: .LONG 17694741 ; ; .ADDRESS P.ACM ; ; P.ACO: .ASCII \logging enabled\<0> ; ; P.ACN: .LONG 17694735 ; ; .ADDRESS P.ACO ; ; P.ACQ: .ASCII \Connected to \<0><0><0> ; ; P.ACP: .LONG 17694733 ; ; .ADDRESS P.ACQ ; ; P.ACS: .ASCII <9>\Escape character: "\ ; ; P.ACR: .LONG 17694740 ; ; .ADDRESS P.ACS ; ; P.ACU: .ASCII \"\<0><0><0> ; ; P.ACT: .LONG 17694721 ; ; .ADDRESS P.ACU ; ; P.ACW: .ASCII <9>\Local echo: \<0><0><0> ; ; P.ACV: .LONG 17694733 ; ; .ADDRESS P.ACW ; ; P.ACY: .ASCII \On\<0><0> ; ; P.ACX: .LONG 17694722 ; ; .ADDRESS P.ACY ; ; P.ADA: .ASCII \Off\<0> ; ; P.ACZ: .LONG 17694723 ; ; .ADDRESS P.ADA ; ; P.ADC: .ASCII <9>\Parity: \<0><0><0> ; ; P.ADB: .LONG 17694729 ; ; .ADDRESS P.ADC ; ; P.ADE: .ASCII \None\ ; ; P.ADD: .LONG 17694724 ; ; .ADDRESS P.ADE ; ; P.ADG: .ASCII \Odd\<0> ; ; P.ADF: .LONG 17694723 ; ; .ADDRESS P.ADG ; ; P.ADI: .ASCII \Even\ ; ; P.ADH: .LONG 17694724 ; ; .ADDRESS P.ADI ; ; P.ADK: .ASCII \Mark\ ; ; P.ADJ: .LONG 17694724 ; ; .ADDRESS P.ADK ; ; P.ADM: .ASCII \Space\<0><0><0> ; ; P.ADL: .LONG 17694725 ; ; .ADDRESS P.ADM ; ; P.ADO: .ASCII <9>\Logging: \<0><0> ; ; P.ADN: .LONG 17694730 ; ; .ADDRESS P.ADO ; ; P.ADQ: .ASCII \ Enabled\ ; ; P.ADP: .LONG 17694728 ; ; .ADDRESS P.ADQ ; ; P.ADS: .ASCII \ Disabled\<0><0><0> ; ; P.ADR: .LONG 17694729 ; ; .ADDRESS P.ADS ; ; P.ADU: .ASCII \ None specifed\<0><0> ; ; P.ADT: .LONG 17694734 ; ; .ADDRESS P.ADU ; ; P.ADV: .BYTE 7 ; ; U.100= P.ACH U.101= P.ACJ U.102= P.ACL U.103= P.ACN .PSECT $CODE$,NOWRT,2 ;CHK_FOR_EXIT U.97: .WORD ^M ;Save R2,R3,R4,R5,R6,R7,R8,R9,R10 ; 2659 MOVAB W^ESCAPE_CHR, R10 ;ESCAPE_CHR, R10 ; MOVAB W^U.96, R9 ;U.96, R9 ; MOVAB B^U.98, R8 ;U.98, R8 ; CLRL R7 ;INDEX ; 2667 MULL3 #25, 4(AP), R0 ;#25, INP_BUFNUM, R0 ; 2700 MOVAB -580(R9)[R0], R2 ;INP_BUF[R0], PTR0 ; CMPL -616(R9), #1 ;ESC_FLG, #1 ; 2702 BNEQ 1$ ;1$ ; CLRL R7 ;INDEX ; 2705 MOVL R2, R6 ;PTR0, ESC_PTR ; 2706 CLRL -616(R9) ;ESC_FLG ; 2707 BRB 5$ ;5$ ; 2702 1$: LOCC (R10), (R9), (R2) ;ESCAPE_CHR, NUM_CHR_IN, (PTR0) ; 2711 BNEQ 2$ ;2$ ; CLRL R1 ;R1 ; 2$: MOVL R1, R6 ;R1, ESC_PTR ; BEQL 4$ ;4$ ; SUBL3 R6, R2, R7 ;ESC_PTR, PTR0, INDEX ; 2716 SUBL3 #1, (R9), R0 ;#1, NUM_CHR_IN, R0 ; 2718 MOVL R0, (R9) ;R0, NUM_CHR_IN ; CMPL R7, R0 ;INDEX, R0 ; BEQL 3$ ;3$ ; SUBL3 R7, (R9), R0 ;INDEX, NUM_CHR_IN, R0 ; 2721 MOVC3 R0, 1(R6), (R6) ;R0, 1(ESC_PTR), (ESC_PTR) ; 2722 BRB 5$ ;5$ ; 2718 3$: MOVL #1, -616(R9) ;#1, ESC_FLG ; 2726 4$: BRW 36$ ;36$ ; 2727 5$: CLRL R2 ;EAT_CHR ; 2732 CMPB (R6), #63 ;(ESC_PTR), #63 ; 2737 BNEQ 7$ ;7$ ; PUSHL #1 ;#1 ; 2739 MOVQ #1, -(SP) ;#1, -(SP) ; PUSHAB W^P.ABP ;P.ABP ; CALLS #4, (R8) ;#4, TYPE_MSG ; PUSHL #1 ;#1 ; 2740 CLRQ -(SP) ;-(SP) ; PUSHAB W^P.ABR ;P.ABR ; CALLS #4, (R8) ;#4, TYPE_MSG ; PUSHL #1 ;#1 ; 2741 CLRQ -(SP) ;-(SP) ; PUSHAB W^P.ABT ;P.ABT ; CALLS #4, (R8) ;#4, TYPE_MSG ; PUSHL #1 ;#1 ; 2743 CLRQ -(SP) ;-(SP) ; PUSHAB W^P.ABV ;P.ABV ; CALLS #4, (R8) ;#4, TYPE_MSG ; PUSHL #1 ;#1 ; 2745 CLRQ -(SP) ;-(SP) ; PUSHAB W^P.ABX ;P.ABX ; CALLS #4, (R8) ;#4, TYPE_MSG ; PUSHL #1 ;#1 ; 2746 CLRQ -(SP) ;-(SP) ; PUSHAB W^P.ABZ ;P.ABZ ; CALLS #4, (R8) ;#4, TYPE_MSG ; PUSHL #1 ;#1 ; 2747 CLRQ -(SP) ;-(SP) ; PUSHAB W^P.ACB ;P.ACB ; CALLS #4, (R8) ;#4, TYPE_MSG ; CLRQ -(SP) ;-(SP) ; 2748 CLRL -(SP) ;-(SP) ; PUSHAB W^P.ACD ;P.ACD ; CALLS #4, (R8) ;#4, TYPE_MSG ; PUSHL -44(R9) ;ESC_CHR_LEN ; 2749 PUSHAB -40(R9) ;ESC_CHR_MSG ; PUSHL #1 ;#1 ; CALLS #3, -279(R8) ;#3, STORE_INPUT ; PUSHL #1 ;#1 ; 2750 PUSHL #1 ;#1 ; CLRL -(SP) ;-(SP) ; PUSHAB W^P.ACF ;P.ACF ; 6$: CALLS #4, (R8) ;#4, TYPE_MSG ; BRB 13$ ;13$ ; 2751 7$: CMPB (R6), #67 ;(ESC_PTR), #67 ; 2754 BEQL 8$ ;8$ ; CMPB (R6), #99 ;(ESC_PTR), #99 ; BNEQ 9$ ;9$ ; 8$: MOVL R7, (R9) ;INDEX, NUM_CHR_IN ; 2756 MOVL #1, R0 ;#1, R0 ; 2757 RET ; ; 9$: CMPB (R6), #81 ;(ESC_PTR), #81 ; 2760 BEQL 10$ ;10$ ; CMPB (R6), #113 ;(ESC_PTR), #113 ; BNEQ 14$ ;14$ ; 10$: BLBC -1228(R9), 11$ ;SESSION_LOGGING, 11$ ; 2767 PUSHL #1 ;#1 ; 2769 PUSHL #1 ;#1 ; PUSHL #1 ;#1 ; PUSHAB W^U.101 ;U.101 ; BRB 12$ ;12$ ; 11$: PUSHL #1 ;#1 ; 2771 PUSHL #1 ;#1 ; PUSHL #1 ;#1 ; PUSHAB W^U.100 ;U.100 ; 12$: CALLS #4, (R8) ;#4, TYPE_MSG ; CLRL -1228(R9) ;SESSION_LOGGING ; 2773 13$: BRW 34$ ;34$ ; 2774 14$: CMPB (R6), #82 ;(ESC_PTR), #82 ; 2777 BEQL 15$ ;15$ ; CMPB (R6), #114 ;(ESC_PTR), #114 ; BNEQ 17$ ;17$ ; 15$: MOVL -1232(R9), -1228(R9) ;SESSION_OPEN, SESSION_LOGGING ; 2784 BLBC -1228(R9), 16$ ;SESSION_LOGGING, 16$ ; 2786 PUSHL #1 ;#1 ; 2788 PUSHL #1 ;#1 ; PUSHL #1 ;#1 ; PUSHAB W^U.103 ;U.103 ; BRB 6$ ;6$ ; 16$: PUSHL #1 ;#1 ; 2790 PUSHL #1 ;#1 ; PUSHL #1 ;#1 ; PUSHAB W^U.102 ;U.102 ; BRB 6$ ;6$ ; 17$: CMPB (R6), #83 ;(ESC_PTR), #83 ; 2795 BEQL 18$ ;18$ ; CMPB (R6), #115 ;(ESC_PTR), #115 ; BEQL 18$ ;18$ ; BRW 31$ ;31$ ; 18$: CLRQ -(SP) ;-(SP) ; 2797 PUSHL #1 ;#1 ; PUSHAB W^P.ACP ;P.ACP ; CALLS #4, (R8) ;#4, TYPE_MSG ; PUSHL #1 ;#1 ; 2798 CLRQ -(SP) ;-(SP) ; PUSHAB W^TERM_DESC ;TERM_DESC ; CALLS #4, (R8) ;#4, TYPE_MSG ; CLRQ -(SP) ;-(SP) ; 2799 CLRL -(SP) ;-(SP) ; PUSHAB W^P.ACR ;P.ACR ; CALLS #4, (R8) ;#4, TYPE_MSG ; PUSHL -44(R9) ;ESC_CHR_LEN ; 2800 PUSHAB -40(R9) ;ESC_CHR_MSG ; PUSHL #1 ;#1 ; CALLS #3, -279(R8) ;#3, STORE_INPUT ; PUSHL #1 ;#1 ; 2801 CLRQ -(SP) ;-(SP) ; PUSHAB W^P.ACT ;P.ACT ; CALLS #4, (R8) ;#4, TYPE_MSG ; CLRQ -(SP) ;-(SP) ; 2802 CLRL -(SP) ;-(SP) ; PUSHAB W^P.ACV ;P.ACV ; CALLS #4, (R8) ;#4, TYPE_MSG ; BLBC W^ECHO_FLAG, 19$ ;ECHO_FLAG, 19$ ; 2804 PUSHL #1 ;#1 ; 2806 CLRQ -(SP) ;-(SP) ; PUSHAB W^P.ACX ;P.ACX ; BRB 20$ ;20$ ; 19$: PUSHL #1 ;#1 ; 2808 CLRQ -(SP) ;-(SP) ; PUSHAB W^P.ACZ ;P.ACZ ; 20$: CALLS #4, (R8) ;#4, TYPE_MSG ; CLRQ -(SP) ;-(SP) ; 2810 CLRL -(SP) ;-(SP) ; PUSHAB W^P.ADB ;P.ADB ; CALLS #4, (R8) ;#4, TYPE_MSG ; CASEL W^PARITY_TYPE, #0, #4 ;PARITY_TYPE, #0, #4 ; 2812 21$: .WORD 22$-21$,- ;22$-21$,- ; 25$-21$,- ;25$-21$,- ; 24$-21$,- ;24$-21$,- ; 23$-21$,- ;23$-21$,- ; 26$-21$ ;26$-21$ ; 22$: PUSHL #1 ;#1 ; 2816 CLRQ -(SP) ;-(SP) ; PUSHAB W^P.ADD ;P.ADD ; BRB 27$ ;27$ ; 23$: PUSHL #1 ;#1 ; 2819 CLRQ -(SP) ;-(SP) ; PUSHAB W^P.ADF ;P.ADF ; BRB 27$ ;27$ ; 24$: PUSHL #1 ;#1 ; 2822 CLRQ -(SP) ;-(SP) ; PUSHAB W^P.ADH ;P.ADH ; BRB 27$ ;27$ ; 25$: PUSHL #1 ;#1 ; 2825 CLRQ -(SP) ;-(SP) ; PUSHAB W^P.ADJ ;P.ADJ ; BRB 27$ ;27$ ; 26$: PUSHL #1 ;#1 ; 2828 CLRQ -(SP) ;-(SP) ; PUSHAB W^P.ADL ;P.ADL ; 27$: CALLS #4, (R8) ;#4, TYPE_MSG ; CLRQ -(SP) ;-(SP) ; 2831 CLRL -(SP) ;-(SP) ; PUSHAB W^P.ADN ;P.ADN ; CALLS #4, (R8) ;#4, TYPE_MSG ; TSTL -1232(R9) ;SESSION_OPEN ; 2833 BLEQ 29$ ;29$ ; CLRQ -(SP) ;-(SP) ; 2836 CLRL -(SP) ;-(SP) ; PUSHAB W^SESSION_DESC ;SESSION_DESC ; CALLS #4, (R8) ;#4, TYPE_MSG ; BLBC -1228(R9), 28$ ;SESSION_LOGGING, 28$ ; 2838 PUSHL #1 ;#1 ; 2840 PUSHL #1 ;#1 ; CLRL -(SP) ;-(SP) ; PUSHAB W^P.ADP ;P.ADP ; BRB 30$ ;30$ ; 28$: PUSHL #1 ;#1 ; 2842 PUSHL #1 ;#1 ; CLRL -(SP) ;-(SP) ; PUSHAB W^P.ADR ;P.ADR ; BRB 30$ ;30$ ; 29$: PUSHL #1 ;#1 ; 2846 PUSHL #1 ;#1 ; CLRL -(SP) ;-(SP) ; PUSHAB W^P.ADT ;P.ADT ; 30$: BRW 6$ ;6$ ; 31$: CMPZV #0, #8, (R6), (R10) ;#0, #8, (ESC_PTR), ESCAPE_CHR ; 2851 BNEQ 32$ ;32$ ; MOVB (R10), (R6) ;ESCAPE_CHR, (ESC_PTR) ; 2852 BRB 35$ ;35$ ; 2734 32$: CMPB (R6), #48 ;(ESC_PTR), #48 ; 2854 BNEQ 33$ ;33$ ; CLRB (R6) ;(ESC_PTR) ; 2855 BRB 35$ ;35$ ; 2734 33$: PUSHL #1 ;#1 ; 2859 PUSHAB W^P.ADV ;P.ADV ; PUSHL #1 ;#1 ; CALLS #3, -279(R8) ;#3, STORE_INPUT ; 34$: MOVL #1, R2 ;#1, EAT_CHR ; 2860 35$: TSTL R2 ;EAT_CHR ; 2864 BLEQ 36$ ;36$ ; SUBL3 R2, (R9), R0 ;EAT_CHR, NUM_CHR_IN, R0 ; 2867 MOVL R0, (R9) ;R0, NUM_CHR_IN ; CMPL R0, R7 ;R0, INDEX ; BEQL 36$ ;36$ ; SUBL3 R7, (R9), R0 ;INDEX, NUM_CHR_IN, R0 ; 2869 MOVC3 R0, (R2)[R6], (R6) ;R0, (EAT_CHR)[ESC_PTR], (ESC_PTR) ; 2870 36$: CLRL R0 ;R0 ; 2873 RET ; ; ; Routine Size: 657 bytes, Routine Base: $CODE$ + 0D96 ; 2874 3 %SBTTL 'TERM_CONNECT -- MYTINP' ; 2875 3 ! Main portion of MYTINP ; 2876 3 ; 2877 3 IF (STATUS = $READEF (EFN = XITEFN, STATE = STATE)) NEQ SS$_WASCLR THEN RETURN .STATUS; ; 2878 3 ; 2879 3 NUM_CHR_IN = .IN_IOSB [MYT, .INP_BUFNUM, OFFSET] + .IN_IOSB [MYT, .INP_BUFNUM, EOFSIZ]; ; 2880 3 ; 2881 3 IF .NUM_CHR_IN NEQ 0 ; 2882 3 THEN ; 2883 3 ; 2884 3 IF CHK_FOR_EXIT (.INP_BUFNUM) ; 2885 3 THEN ; 2886 4 BEGIN ; 2887 4 $CANTIM (); ; 2888 4 $SETEF (EFN = XITEFN); ! Exit characters typed. Set flag. ; 2889 4 RETURN 1; ; 2890 4 END ; 2891 3 ELSE ; 2892 3 STORE_INPUT (MYT, CH$PTR (INP_BUF [MYT, .INP_BUFNUM]), .NUM_CHR_IN); ; 2893 3 ; 2894 3 ! Store char. ; 2895 3 ; 2896 3 IF (STATUS = $READEF (EFN = XITEFN, STATE = STATE)) EQL SS$_WASCLR ; 2897 3 THEN ; 2898 3 ![031] If we got some characters, then queue up the next read for lots of ; 2899 3 ![031] characters with a 0 timeout (get what we can). Otherwise queue up ; 2900 3 ![031] a read for one character waiting forever. ; 2901 3 ; 2902 3 IF .NUM_CHR_IN GTR 0 OR .INP_BUFNUM NEQ 0 ; 2903 3 THEN ; 2904 3 ![006] Queue up a read for the console terminal ; P 2905 3 STATUS = $QIO (CHAN = .MYT_CHAN, FUNC = .MYT_QIO_FUNC OR IO$M_TIMED, ; P 2906 3 ASTADR = MYTINP, P1 = INP_BUF [MYT, .INP_BUFNUM], P2 = INP_BUFSIZ, P3 = 0, ; 2907 4 ASTPRM = .INP_BUFNUM, IOSB = IN_IOSB [MYT, .INP_BUFNUM, 0]) ; 2908 3 ELSE ; P 2909 3 STATUS = $QIO (CHAN = .MYT_CHAN, FUNC = .MYT_QIO_FUNC, ASTADR = MYTINP, ; P 2910 3 P1 = INP_BUF [MYT, .INP_BUFNUM], P2 = 1, ASTPRM = .INP_BUFNUM, ; 2911 3 IOSB = IN_IOSB [MYT, .INP_BUFNUM, 0]); ; 2912 3 ; 2913 3 IF NOT .STATUS ; 2914 3 THEN ; 2915 4 BEGIN ; 2916 4 LIB$SIGNAL (.STATUS); ; 2917 4 $SETEF (EFN = XITEFN); ; 2918 3 END; ; 2919 3 ; 2920 3 RETURN .STATUS; ; 2921 2 END; ! End of MYTINP ;MYTINP U.94: .WORD ^M ;Save R2,R3,R4,R5 ; 2643 MOVAB G^SYS$SETEF, R5 ;SYS$SETEF, R5 ; MOVAB G^SYS$READEF, R4 ;SYS$READEF, R4 ; MOVAB W^U.95, R3 ;U.95, R3 ; PUSHAB -4(R3) ;STATE ; 2877 PUSHL #5 ;#5 ; CALLS #2, (R4) ;#2, SYS$READEF ; MOVL R0, (R3) ;R0, STATUS ; CMPL R0, #1 ;R0, #1 ; BEQL 1$ ;1$ ; BRW 8$ ;8$ ; 1$: MOVL 4(AP), R2 ;INP_BUFNUM, R2 ; 2879 PUSHAQ -606(R3)[R2] ;IN_IOSB+2[R2] ; MOVZWL @(SP)+, R0 ;@(SP)+, R0 ; PUSHAQ -602(R3)[R2] ;IN_IOSB+6[R2] ; MOVZWL @(SP)+, R1 ;@(SP)+, R1 ; ADDL3 R1, R0, 4(R3) ;R1, R0, NUM_CHR_IN ; BEQL 3$ ;3$ ; 2881 PUSHL R2 ;R2 ; 2884 CALLS #1, W^U.97 ;#1, U.97 ; BLBC R0, 2$ ;R0, 2$ ; CLRQ -(SP) ;-(SP) ; 2887 CALLS #2, G^SYS$CANTIM ;#2, SYS$CANTIM ; PUSHL #5 ;#5 ; 2888 CALLS #1, (R5) ;#1, SYS$SETEF ; MOVL #1, R0 ;#1, R0 ; 2889 RET ; ; 2$: PUSHL 4(R3) ;NUM_CHR_IN ; 2892 MULL3 #25, R2, R0 ;#25, R2, R0 ; PUSHAB -576(R3)[R0] ;INP_BUF[R0] ; CLRL -(SP) ;-(SP) ; CALLS #3, W^U.93 ;#3, U.93 ; 3$: PUSHAB -4(R3) ;STATE ; 2896 PUSHL #5 ;#5 ; CALLS #2, (R4) ;#2, SYS$READEF ; MOVL R0, (R3) ;R0, STATUS ; CMPL R0, #1 ;R0, #1 ; BNEQ 7$ ;7$ ; MULL3 #25, R2, R0 ;#25, R2, R0 ; 2907 MOVAB -576(R3)[R0], R1 ;INP_BUF[R0], R1 ; MOVAQ -608(R3)[R2], R0 ;IN_IOSB[R2], R0 ; TSTL 4(R3) ;NUM_CHR_IN ; 2902 BGTR 4$ ;4$ ; TSTL R2 ;R2 ; BEQL 5$ ;5$ ; 4$: CLRQ -(SP) ;-(SP) ; 2907 CLRQ -(SP) ;-(SP) ; PUSHL #25 ;#25 ; PUSHL R1 ;R1 ; PUSHL R2 ;R2 ; PUSHAB W^U.94 ;U.94 ; PUSHL R0 ;R0 ; BISL3 #128, -44(R3), -(SP) ;#128, MYT_QIO_FUNC, -(SP) ; BRB 6$ ;6$ ; 5$: CLRQ -(SP) ;-(SP) ; 2911 CLRQ -(SP) ;-(SP) ; PUSHL #1 ;#1 ; PUSHL R1 ;R1 ; PUSHL R2 ;R2 ; PUSHAB W^U.94 ;U.94 ; PUSHL R0 ;R0 ; PUSHL -44(R3) ;MYT_QIO_FUNC ; 6$: PUSHL -620(R3) ;MYT_CHAN ; CLRL -(SP) ;-(SP) ; CALLS #12, G^SYS$QIO ;#12, SYS$QIO ; MOVL R0, (R3) ;R0, STATUS ; 7$: BLBS (R3), 8$ ;STATUS, 8$ ; 2913 PUSHL (R3) ;STATUS ; 2916 CALLS #1, G^LIB$SIGNAL ;#1, LIB$SIGNAL ; PUSHL #5 ;#5 ; 2917 CALLS #1, (R5) ;#1, SYS$SETEF ; 8$: MOVL (R3), R0 ;STATUS, R0 ; 2920 RET ; ; 2921 ; Routine Size: 238 bytes, Routine Base: $CODE$ + 1027 ; 2922 2 %SBTTL 'TERM_CONNECT -- TRMINP' ; 2923 2 ROUTINE TRMINP (INP_BUFNUM) = ; 2924 2 ; 2925 2 !++ ; 2926 2 ! This AST routine receives characters from the channel TERM_CHAN and ; 2927 2 ! outputs the characters to the channel MYT_CHAN. INP_BUFNUM contains ; 2928 2 ! the number of the input buffer. ; 2929 2 !-- ; 2930 2 ; 2931 3 BEGIN ; 2932 3 ; 2933 3 LOCAL ; 2934 3 NUM_CHR_IN, ; 2935 3 STATUS; ; 2936 3 ; 2937 3 IF (STATUS = $READEF (EFN = XITEFN, STATE = STATE)) NEQ SS$_WASCLR THEN RETURN .STATUS; ; 2938 3 ; 2939 3 NUM_CHR_IN = .IN_IOSB [TRM, .INP_BUFNUM, OFFSET] + .IN_IOSB [TRM, .INP_BUFNUM, EOFSIZ]; ; 2940 3 ; 2941 3 IF .NUM_CHR_IN NEQ 0 ; 2942 3 THEN ; 2943 3 STORE_INPUT (TRM, CH$PTR (INP_BUF [TRM, .INP_BUFNUM]), ; 2944 3 .NUM_CHR_IN); ; 2945 3 ; 2946 3 IF (STATUS = $READEF (EFN = XITEFN, STATE = STATE)) EQL SS$_WASCLR ; 2947 3 THEN ; 2948 3 ![031] ; 2949 3 ![031] If we actually got something input, then queue up a read with a 0 ; 2950 3 ![031] timeout for the whole buffer. Otherwise, queue up a single character ; 2951 3 ![031] read, if this is the first buffer. ; 2952 3 ![031] ; 2953 3 ; 2954 3 IF .NUM_CHR_IN GTR 0 OR .INP_BUFNUM NEQ 0 ; 2955 3 THEN ; P 2956 3 STATUS = $QIO (CHAN = .TERM_CHAN, ; P 2957 3 FUNC = IO$_TTYREADALL OR IO$M_NOECHO OR IO$M_TIMED, ASTADR = TRMINP, ; P 2958 3 P1 = INP_BUF [TRM, .INP_BUFNUM], P2 = INP_BUFSIZ, P3 = 0, ; P 2959 3 IOSB = IN_IOSB [TRM, ; 2960 4 .INP_BUFNUM, 0], ASTPRM = .INP_BUFNUM) ; 2961 3 ELSE ; P 2962 3 STATUS = $QIO (CHAN = .TERM_CHAN, FUNC = IO$_TTYREADALL OR IO$M_NOECHO, ; P 2963 3 ASTADR = TRMINP, P1 = INP_BUF [TRM, .INP_BUFNUM], P2 = 1, ; P 2964 3 IOSB = IN_IOSB [TRM, ; 2965 3 .INP_BUFNUM, 0], ASTPRM = .INP_BUFNUM); ; 2966 3 ; 2967 3 IF NOT .STATUS ; 2968 3 THEN ; 2969 4 BEGIN ; 2970 4 LIB$SIGNAL (.STATUS); ; 2971 4 $SETEF (EFN = XITEFN); ; 2972 3 END; ; 2973 3 ; 2974 3 RETURN .STATUS; ; 2975 2 END; ! End of TRMINP ;TRMINP U.104: .WORD ^M ;Save R2,R3,R4,R5 ; 2923 MOVAB G^SYS$READEF, R5 ;SYS$READEF, R5 ; PUSHAB W^U.79 ;U.79 ; 2937 PUSHL #5 ;#5 ; CALLS #2, (R5) ;#2, SYS$READEF ; MOVL R0, R4 ;R0, STATUS ; CMPL R4, #1 ;STATUS, #1 ; BEQL 1$ ;1$ ; BRW 7$ ;7$ ; 1$: MOVL 4(AP), R2 ;INP_BUFNUM, R2 ; 2939 PUSHAQ W^U.68+18[R2] ;U.68+18[R2] ; MOVZWL @(SP)+, R3 ;@(SP)+, NUM_CHR_IN ; PUSHAQ W^U.68+22[R2] ;U.68+22[R2] ; MOVZWL @(SP)+, R0 ;@(SP)+, R0 ; ADDL2 R0, R3 ;R0, NUM_CHR_IN ; BEQL 2$ ;2$ ; 2941 PUSHL R3 ;NUM_CHR_IN ; 2944 MULL3 #25, R2, R0 ;#25, R2, R0 ; 2943 PUSHAB W^U.69+51[R0] ;U.69+51[R0] ; PUSHL #1 ;#1 ; CALLS #3, W^U.93 ;#3, U.93 ; 2$: PUSHAB W^U.79 ;U.79 ; 2946 PUSHL #5 ;#5 ; CALLS #2, (R5) ;#2, SYS$READEF ; MOVL R0, R4 ;R0, STATUS ; CMPL R4, #1 ;STATUS, #1 ; BNEQ 6$ ;6$ ; MULL3 #25, R2, R0 ;#25, R2, R0 ; 2960 MOVAB W^U.69+51[R0], R1 ;U.69+51[R0], R1 ; MOVAQ W^U.68+16[R2], R0 ;U.68+16[R2], R0 ; TSTL R3 ;NUM_CHR_IN ; 2954 BGTR 3$ ;3$ ; TSTL R2 ;R2 ; BEQL 4$ ;4$ ; 3$: CLRQ -(SP) ;-(SP) ; 2960 CLRQ -(SP) ;-(SP) ; PUSHL #25 ;#25 ; PUSHL R1 ;R1 ; PUSHL R2 ;R2 ; PUSHAB B^U.104 ;U.104 ; PUSHL R0 ;R0 ; MOVZBL #250, -(SP) ;#250, -(SP) ; BRB 5$ ;5$ ; 4$: CLRQ -(SP) ;-(SP) ; 2965 CLRQ -(SP) ;-(SP) ; PUSHL #1 ;#1 ; PUSHL R1 ;R1 ; PUSHL R2 ;R2 ; PUSHAB W^U.104 ;U.104 ; PUSHL R0 ;R0 ; MOVZBL #122, -(SP) ;#122, -(SP) ; 5$: PUSHL W^U.4 ;U.4 ; CLRL -(SP) ;-(SP) ; CALLS #12, G^SYS$QIO ;#12, SYS$QIO ; MOVL R0, R4 ;R0, STATUS ; 6$: BLBS R4, 7$ ;STATUS, 7$ ; 2967 PUSHL R4 ;STATUS ; 2970 CALLS #1, G^LIB$SIGNAL ;#1, LIB$SIGNAL ; PUSHL #5 ;#5 ; 2971 CALLS #1, G^SYS$SETEF ;#1, SYS$SETEF ; 7$: MOVL R4, R0 ;STATUS, R0 ; 2974 RET ; ; 2975 ; Routine Size: 195 bytes, Routine Base: $CODE$ + 1115 ; 2976 2 %SBTTL 'TERM_CONNECT -- ESC_MSG' ; 2977 2 ROUTINE ESC_MSG (ESC_TEXT) = ; 2978 3 BEGIN ; 2979 3 ; 2980 3 MAP ; 2981 3 ESC_TEXT : REF VECTOR [, BYTE]; ; 2982 3 ; 2983 3 SELECTONE .ESCAPE_CHR OF ; 2984 3 SET ; 2985 3 ; 2986 3 [CHR_NUL, 0] : ; 2987 4 BEGIN ; 2988 4 ; 2989 4 BIND ; 2990 4 NUL_TXT = %ASCID'^@ or control-space on VT-100'; ; 2991 4 ; 2992 4 MAP ; 2993 4 NUL_TXT : BLOCK [8, BYTE]; ; 2994 4 ; 2995 4 CH$MOVE (.NUL_TXT [DSC$W_LENGTH], CH$PTR (.NUL_TXT [DSC$A_POINTER]), ; 2996 4 CH$PTR (.ESC_TEXT)); ; 2997 4 RETURN .NUL_TXT [DSC$W_LENGTH]; ; 2998 3 END; ; 2999 3 ; 3000 3 [CHR_RS, %O'36'] : ; 3001 4 BEGIN ; 3002 4 ; 3003 4 BIND ; 3004 4 RS_TXT = %ASCID'^^ or ^~ on VT-100'; ; 3005 4 ; 3006 4 MAP ; 3007 4 RS_TXT : BLOCK [8, BYTE]; ; 3008 4 ; 3009 4 CH$MOVE (.RS_TXT [DSC$W_LENGTH], CH$PTR (.RS_TXT [DSC$A_POINTER]), ; 3010 4 CH$PTR (.ESC_TEXT)); ; 3011 4 RETURN .RS_TXT [DSC$W_LENGTH]; ; 3012 3 END; ; 3013 3 ; 3014 3 [CHR_US, %O'37'] : ; 3015 4 BEGIN ; 3016 4 ; 3017 4 BIND ; 3018 4 US_TXT = %ASCID'^_ or ^? on VT-100'; ; 3019 4 ; 3020 4 MAP ; 3021 4 US_TXT : BLOCK [8, BYTE]; ; 3022 4 ; 3023 4 CH$MOVE (.US_TXT [DSC$W_LENGTH], CH$PTR (.US_TXT [DSC$A_POINTER]), ; 3024 4 CH$PTR (.ESC_TEXT)); ; 3025 4 RETURN .US_TXT [DSC$W_LENGTH]; ; 3026 3 END; ; 3027 3 ; 3028 3 [1 TO %O'37'] : ; 3029 4 BEGIN ; 3030 4 ESC_TEXT [0] = %C'^'; ; 3031 4 ESC_TEXT [1] = .ESCAPE_CHR + %O'100'; ; 3032 4 RETURN 2; ; 3033 3 END; ; 3034 3 ; 3035 3 [CHR_DEL, %O'177'] : ; 3036 4 BEGIN ; 3037 4 ESC_TEXT = 'DEL'; ; 3038 4 RETURN 3; ; 3039 3 END; ; 3040 3 TES; ; 3041 3 ; 3042 3 RETURN 0; ! No escape character? ; 3043 2 END; ! End of ESC_MSG .PSECT $PLIT$,NOWRT,NOEXE,2 .BLKB 3 P.ADX: .ASCII \^@ or control-space on VT-100\<0><0><0> ; ; P.ADW: .LONG 17694749 ; ; .ADDRESS P.ADX ; ; P.ADZ: .ASCII \^^ or ^~ on VT-100\<0><0> ; ; P.ADY: .LONG 17694738 ; ; .ADDRESS P.ADZ ; ; P.AEB: .ASCII \^_ or ^? on VT-100\<0><0> ; ; P.AEA: .LONG 17694738 ; ; .ADDRESS P.AEB ; ; U.107= P.ADW U.109= P.ADY U.111= P.AEA .PSECT $CODE$,NOWRT,2 ;ESC_MSG U.105: .WORD ^M ;Save R2,R3,R4,R5,R6,R7 ; 2977 MOVAB W^U.107, R7 ;U.107, R7 ; MOVL W^ESCAPE_CHR, R6 ;ESCAPE_CHR, R6 ; 2983 BNEQ 1$ ;1$ ; 2986 MOVC3 (R7), @4(R7), @4(AP) ;NUL_TXT, @NUL_TXT+4, @ESC_TEXT ; 2996 MOVZWL (R7), R0 ;NUL_TXT, R0 ; 2997 RET ; ; 1$: CMPL R6, #30 ;R6, #30 ; 3000 BNEQ 2$ ;2$ ; MOVC3 28(R7), @32(R7), @4(AP) ;RS_TXT, @RS_TXT+4, @ESC_TEXT ; 3010 MOVZWL 28(R7), R0 ;RS_TXT, R0 ; 3011 RET ; ; 2$: CMPL R6, #31 ;R6, #31 ; 3014 BNEQ 3$ ;3$ ; MOVC3 56(R7), @60(R7), @4(AP) ;US_TXT, @US_TXT+4, @ESC_TEXT ; 3024 MOVZWL 56(R7), R0 ;US_TXT, R0 ; 3025 RET ; ; 3$: TSTL R6 ;R6 ; 3028 BLEQ 4$ ;4$ ; CMPL R6, #31 ;R6, #31 ; BGTR 4$ ;4$ ; MOVL 4(AP), R0 ;ESC_TEXT, R0 ; 3030 MOVB #94, (R0) ;#94, (R0) ; ADDB3 #64, R6, 1(R0) ;#64, R6, 1(R0) ; 3031 MOVL #2, R0 ;#2, R0 ; 3032 RET ; ; 4$: CMPL R6, #127 ;R6, #127 ; 3035 BNEQ 5$ ;5$ ; MOVL #4998468, 4(AP) ;#4998468, ESC_TEXT ; 3037 MOVL #3, R0 ;#3, R0 ; 3038 RET ; ; 5$: CLRL R0 ;R0 ; 3042 RET ; ; 3043 ; Routine Size: 109 bytes, Routine Base: $CODE$ + 11D8 ; 3044 2 %SBTTL 'TERM_CONNECT -- INITIALIZATION' ; 3045 2 ! Initialize variables ; 3046 2 CHR_COUNT [0] = 0; ; 3047 2 CHR_COUNT [1] = 0; ; 3048 2 ESC_FLG = FALSE; ; 3049 2 OUT_BUFNUM [0] = 0; ; 3050 2 OUT_BUFNUM [1] = 0; ; 3051 2 OUT_EFN [0] = 1; ; 3052 2 OUT_EFN [1] = T_EFN_DISP + 1; ; 3053 2 OUT_PTR [0] = CH$PTR (OUT_BUF [0, .OUT_BUFNUM [0]]); ; 3054 2 OUT_PTR [1] = CH$PTR (OUT_BUF [1, .OUT_BUFNUM [1]]); ; 3055 2 $BINTIM (TIMBUF = ATIMUP, TIMADR = BTIMUP); ; 3056 2 ! ; 3057 2 ! Initialize Connect message ; 3058 2 ! ; 3059 2 ESC_CHR_LEN = ESC_MSG (ESC_CHR_MSG); ; 3060 2 CON_MSG_DESC [DSC$B_CLASS] = DSC$K_CLASS_S; ; 3061 2 CON_MSG_DESC [DSC$B_DTYPE] = DSC$K_DTYPE_T; ; 3062 2 CON_MSG_DESC [DSC$A_POINTER] = CON_MSG; ; 3063 2 CON_MSG_DESC [DSC$W_LENGTH] = 1 + .NODE_DESC [DSC$W_LENGTH] + .CON_MSG_1 [DSC$W_LENGTH] + ; 3064 2 .TERM_DESC [DSC$W_LENGTH] + .CON_MSG_2 [DSC$W_LENGTH] + .ESC_CHR_LEN + .CON_MSG_3 [DSC$W_LENGTH] ; 3065 2 ; ; 3066 2 CH$COPY (1, CH$PTR (UPLIT BYTE(%C'[')), .NODE_DESC [DSC$W_LENGTH], ; 3067 2 CH$PTR (.NODE_DESC [DSC$A_POINTER]), .CON_MSG_1 [DSC$W_LENGTH], ; 3068 2 CH$PTR (.CON_MSG_1 [DSC$A_POINTER]), .TERM_DESC [DSC$W_LENGTH], ; 3069 2 CH$PTR (.TERM_DESC [DSC$A_POINTER]), .CON_MSG_2 [DSC$W_LENGTH], ; 3070 2 CH$PTR (.CON_MSG_2 [DSC$A_POINTER]), .ESC_CHR_LEN, CH$PTR (ESC_CHR_MSG), ; 3071 2 .CON_MSG_3 [DSC$W_LENGTH], CH$PTR (.CON_MSG_3 [DSC$A_POINTER]), CHR_NUL, ; 3072 2 .CON_MSG_DESC [DSC$W_LENGTH], CH$PTR (CON_MSG)); ; 3073 2 ! ; 3074 2 ! Assign channels to devices TERM_NAME and MY_TERM. ; 3075 2 ! ; 3076 2 STATUS = TERM_OPEN (FALSE); ![054] Open terminal, no QIO's ; 3077 2 ; 3078 2 IF .CONNECT_FLAG ! Check if TERM_NAME is TT: ; 3079 2 THEN ; 3080 3 BEGIN ; 3081 3 TERM_CLOSE (); ; 3082 3 LIB$SIGNAL (KER_CON_SAME); ; 3083 3 RETURN KER_CON_SAME; ; 3084 2 END; ; 3085 2 ; 3086 2 IF NOT .STATUS ; 3087 2 THEN ; 3088 3 BEGIN ; 3089 3 LIB$SIGNAL (.STATUS); ; 3090 3 RETURN .STATUS; ; 3091 2 END; ; 3092 2 ; 3093 2 IF NOT .SYS_OUTPUT_OPEN ![013] Make sure we have terminals ; 3094 2 THEN ; 3095 3 BEGIN ; 3096 3 TERM_CLOSE (); ; 3097 3 LIB$SIGNAL (KER_LINTERM); ![013] Must both be terminals ; 3098 3 RETURN KER_LINTERM; ![013] So give up if not ; 3099 2 END; ; 3100 2 ; 3101 2 ![054] STATUS = $CANCEL (CHAN = .TERM_CHAN); ! Kill all pending QIOs for terminal ; 3102 2 CHANNEL [0] = .TERM_CHAN; ; 3103 2 CHANNEL [1] = .CONS_CHAN; ; 3104 2 ![054] STATUS = $CANCEL (CHAN = .CONS_CHAN); ! Kill pending QIOs for console as well ; 3105 2 ! STATUS = $ASSIGN (DEVNAM = MY_TERM, CHAN = MYT_CHAN); ; 3106 2 ; 3107 2 IF NOT .STATUS ; 3108 2 THEN ; 3109 3 BEGIN ; 3110 3 TERM_CLOSE (); ; 3111 3 LIB$SIGNAL (.STATUS); ; 3112 3 RETURN .STATUS; ; 3113 2 END; ; 3114 2 ; 3115 2 ! ; 3116 2 ! Open any session logging file ; 3117 2 ! ; 3118 2 SESSION_OPEN = FALSE; ! Assume not logging ; 3119 2 SESSION_LOGGING = FALSE; ! . . . ; 3120 2 ; 3121 2 IF .SESSION_DESC [DSC$W_LENGTH] GTR 0 ; 3122 2 THEN ; 3123 3 BEGIN ; 3124 3 STATUS = LOG_OPEN (SESSION_DESC, SESSION_FAB, SESSION_RAB); ; 3125 3 ; 3126 3 IF .STATUS ; 3127 3 THEN ; 3128 4 BEGIN ; 3129 4 SESSION_OPEN = TRUE; ; 3130 4 SESSION_LOGGING = TRUE; ; 3131 3 END; ; 3132 3 ; 3133 2 END; ; 3134 2 ; 3135 2 ! Prepare event flags ; 3136 2 $CLREF (EFN = XITEFN); ; 3137 2 ; 3138 2 INCR FLAG FROM 1 TO XITEFN - 1 DO ; 3139 2 $SETEF (EFN = .FLAG); ; 3140 2 ; 3141 2 ![006] ; 3142 2 ![006] Set up proper function for reading from console terminal. This is done ; 3143 2 ![006] so that the NOECHO flag only gets used if LOCAL_ECHO is OFF. ; 3144 2 ![006] ; 3145 2 MYT_QIO_FUNC = IO$_TTYREADALL; ; 3146 2 ; 3147 2 IF NOT .ECHO_FLAG THEN MYT_QIO_FUNC = IO$M_NOECHO OR IO$_TTYREADALL; ; 3148 2 ; 3149 2 ! Connect streams ; 3150 2 CONN_STREAMS : ; 3151 3 BEGIN ; 3152 3 ! Send connect message ; 3153 3 LIB$PUT_OUTPUT (%ASCID''); ; 3154 3 LIB$PUT_OUTPUT (CON_MSG_DESC); ; 3155 3 LIB$PUT_OUTPUT (%ASCID''); ; 3156 3 $SETAST (ENBFLG = 0); ! Disable AST until after all QIOs ; 3157 3 ![031] ; 3158 3 ![031] The first input for each terminal will be for one character. ; 3159 3 ![031] This read will wait forever for a character. The subsequent ; 3160 3 ![031] reads will have a timeout of 0 (immediate return). This ; 3161 3 ![031] gets us good response without using large amounts of run time. ; 3162 3 ![031] ; P 3163 3 STATUS = $QIO (CHAN = .MYT_CHAN, FUNC = .MYT_QIO_FUNC, ASTADR = MYTINP, P1 = INP_BUF [MYT, 0], ; 3164 3 P2 = 1, IOSB = IN_IOSB [MYT, 0, 0], ASTPRM = 0); ; 3165 3 ; 3166 3 IF NOT .STATUS THEN LEAVE CONN_STREAMS; ; 3167 3 ; P 3168 3 STATUS = $QIO (CHAN = .TERM_CHAN, FUNC = IO$_TTYREADALL OR IO$M_NOECHO, ASTADR = TRMINP, ; 3169 3 P1 = INP_BUF [TRM, 0], P2 = INP_BUFSIZ, P3 = 0, IOSB = IN_IOSB [TRM, 0, 0], ASTPRM = 0); ; 3170 3 ; 3171 3 IF NOT .STATUS THEN LEAVE CONN_STREAMS; ; 3172 3 ; 3173 3 INCR INP_BUFNUM FROM 1 TO NUM_IN_BUF - 1 DO ; 3174 4 BEGIN ; 3175 4 ![006] Queue up an input for console terminal ; P 3176 4 STATUS = $QIO (CHAN = .MYT_CHAN, FUNC = .MYT_QIO_FUNC OR IO$M_TIMED, ASTADR = MYTINP, ; P 3177 4 P1 = INP_BUF [MYT, .INP_BUFNUM], P2 = INP_BUFSIZ, P3 = 0, ; P 3178 4 IOSB = IN_IOSB [MYT, ; 3179 4 .INP_BUFNUM, 0], ASTPRM = .INP_BUFNUM); ; 3180 4 ; 3181 4 IF NOT .STATUS THEN LEAVE CONN_STREAMS; ; 3182 4 ; P 3183 4 STATUS = $QIO (CHAN = .TERM_CHAN, FUNC = IO$_TTYREADALL OR IO$M_NOECHO OR IO$M_TIMED, ; P 3184 4 ASTADR = TRMINP, P1 = INP_BUF [TRM, .INP_BUFNUM], P2 = INP_BUFSIZ, P3 = 0, ; 3185 4 IOSB = IN_IOSB [TRM, .INP_BUFNUM, 0], ASTPRM = .INP_BUFNUM); ; 3186 4 ; 3187 4 IF NOT .STATUS THEN LEAVE CONN_STREAMS; ; 3188 4 ; 3189 3 END; ; 3190 3 ; 3191 3 $SETAST (ENBFLG = 1); ! Enable AST ; 3192 3 $WAITFR (EFN = XITEFN); ! Wait for exit flag ; 3193 3 $WFLAND (EFN = 0, MASK = EFN_MASK); ! Go when outputs completed ; 3194 3 CON_MSG_DESC [DSC$W_LENGTH] = 1 + .NODE_DESC [DSC$W_LENGTH] + .CON_MSG_4 [DSC$W_LENGTH]; ; 3195 3 CH$COPY (1, CH$PTR (UPLIT BYTE(%C'[')), .NODE_DESC [DSC$W_LENGTH], ; 3196 3 CH$PTR (.NODE_DESC [DSC$A_POINTER]), .CON_MSG_4 [DSC$W_LENGTH], ; 3197 3 CH$PTR (.CON_MSG_4 [DSC$A_POINTER]), CHR_NUL, .CON_MSG_DESC [DSC$W_LENGTH], ; 3198 3 CH$PTR (.CON_MSG_DESC [DSC$A_POINTER])); ; 3199 3 LIB$PUT_OUTPUT (CON_MSG_DESC); ; 3200 3 LIB$PUT_OUTPUT (%ASCID''); ; 3201 2 END; ; 3202 2 ! ; 3203 2 ! Program end -- Close both channels and return with STATUS ; 3204 2 ! ; 3205 2 $CANTIM (); ; 3206 2 ! ; 3207 2 ! Close any log file ; 3208 2 ! ; 3209 2 ; 3210 2 IF .SESSION_OPEN THEN LOG_CLOSE (SESSION_FAB, SESSION_RAB); ; 3211 2 ; 3212 2 SESSION_OPEN = FALSE; ; 3213 2 ! ; 3214 2 ! Call TERM_CLOSE to clean up ; 3215 2 ! ; 3216 2 STATUS = TERM_CLOSE (); ; 3217 2 ; 3218 2 IF NOT .STATUS THEN LIB$SIGNAL (.STATUS); ; 3219 2 ; 3220 2 $SETAST (ENBFLG = 1); ; 3221 2 RETURN .STATUS; ; 3222 1 END; ! End of TERM_CONNECT .PSECT $PLIT$,NOWRT,NOEXE,2 P.AEC: .BYTE 91 ; ; .BLKB 3 P.AEE: .BLKB 0 ; ; P.AED: .LONG 17694720 ; ; .ADDRESS P.AEE ; ; P.AEG: .BLKB 0 ; ; P.AEF: .LONG 17694720 ; ; .ADDRESS P.AEG ; ; P.AEH: .BYTE 91 ; ; .BLKB 3 P.AEJ: .BLKB 0 ; ; P.AEI: .LONG 17694720 ; ; .ADDRESS P.AEJ ; ; .EXTRN SYS$BINTIM, SYS$SETAST, SYS$WFLAND .PSECT $CODE$,NOWRT,2 .ENTRY TERM_CONNECT, ^M ; ; MOVAB -92(SP), SP ;-92(SP), SP ; CLRQ W^U.66 ;U.66 ; 3046 CLRW W^U.73 ;U.73 ; 3049 MOVW #769, W^U.74 ;#769, U.74 ; 3051 MOVZBL W^U.73, R0 ;U.73, R0 ; 3053 MULL2 #80, R0 ;#80, R0 ; MOVAB W^U.72[R0], W^U.75 ;U.72[R0], U.75 ; MOVZBL W^U.73+1, R0 ;U.73+1, R0 ; 3054 MULL2 #80, R0 ;#80, R0 ; MOVAB W^U.72+161[R0], W^U.75+4 ;U.72+161[R0], U.75+4 ; PUSHAB W^U.64 ;U.64 ; 3055 PUSHAB W^U.88 ;U.88 ; CALLS #2, G^SYS$BINTIM ;#2, SYS$BINTIM ; PUSHAB W^U.78 ;U.78 ; 3059 CALLS #1, W^U.105 ;#1, U.105 ; MOVL R0, W^U.77 ;R0, U.77 ; MOVW #270, 6(SP) ;#270, CON_MSG_DESC+2 ; 3061 MOVAB 12(SP), 8(SP) ;CON_MSG, CON_MSG_DESC+4 ; 3062 MOVZWL W^NODE_DESC, R0 ;NODE_DESC, R0 ; 3063 MOVZWL W^U.80, R1 ;U.80, R1 ; ADDL2 R1, R0 ;R1, R0 ; MOVZWL W^TERM_DESC, R10 ;TERM_DESC, R10 ; 3064 ADDL2 R10, R0 ;R10, R0 ; 3063 MOVZWL W^U.81, R9 ;U.81, R9 ; 3064 ADDL2 R9, R0 ;R9, R0 ; ADDL2 W^U.77, R0 ;U.77, R0 ; MOVZWL W^U.82, R6 ;U.82, R6 ; MOVAB 1(R6)[R0], R1 ;1(R6)[R0], R1 ; MOVW R1, 4(SP) ;R1, CON_MSG_DESC ; MOVZWL W^NODE_DESC, (SP) ;NODE_DESC, (SP) ; 3066 MOVZWL W^U.80, R11 ;U.80, R11 ; 3067 MOVZWL 4(SP), R8 ;CON_MSG_DESC, R8 ; 3072 MOVAB 12(SP), R7 ;CON_MSG, R7 ; MOVC5 #1, W^P.AEC, #0, R8, (R7) ;#1, P.AEC, #0, R8, (R7) ; BGEQ 1$ ;1$ ; INCL R7 ;R7 ; DECL R8 ;R8 ; MOVC5 (SP), @W^NODE_DESC+4, #0, R8, (R7) ;(SP), @NODE_DESC+4, #0, R8, (R7) ; BGEQ 1$ ;1$ ; ADDL2 (SP), R7 ;(SP), R7 ; SUBL2 (SP), R8 ;(SP), R8 ; MOVC5 R11, @W^U.80+4, #0, R8, (R7) ;R11, @U.80+4, #0, R8, (R7) ; BGEQ 1$ ;1$ ; ADDL2 R11, R7 ;R11, R7 ; SUBL2 R11, R8 ;R11, R8 ; MOVC5 R10, @W^TERM_DESC+4, #0, R8, (R7) ;R10, @TERM_DESC+4, #0, R8, (R7) ; BGEQ 1$ ;1$ ; ADDL2 R10, R7 ;R10, R7 ; SUBL2 R10, R8 ;R10, R8 ; MOVC5 R9, @W^U.81+4, #0, R8, (R7) ;R9, @U.81+4, #0, R8, (R7) ; BGEQ 1$ ;1$ ; ADDL2 R9, R7 ;R9, R7 ; SUBL2 R9, R8 ;R9, R8 ; MOVC5 W^U.77, W^U.78, #0, R8, (R7) ;U.77, U.78, #0, R8, (R7) ; BGEQ 1$ ;1$ ; ADDL2 W^U.77, R7 ;U.77, R7 ; SUBL2 W^U.77, R8 ;U.77, R8 ; MOVC5 R6, @W^U.82+4, #0, R8, (R7) ;R6, @U.82+4, #0, R8, (R7) ; 1$: CLRL -(SP) ;-(SP) ; 3076 CALLS #1, W^TERM_OPEN ;#1, TERM_OPEN ; MOVL R0, R8 ;R0, STATUS ; BLBC W^CONNECT_FLAG, 2$ ;CONNECT_FLAG, 2$ ; 3078 CALLS #0, W^TERM_CLOSE ;#0, TERM_CLOSE ; 3081 PUSHL #134316274 ;#134316274 ; 3082 CALLS #1, G^LIB$SIGNAL ;#1, LIB$SIGNAL ; MOVL #134316274, R0 ;#134316274, R0 ; 3083 RET ; ; 2$: BLBC R8, 4$ ;STATUS, 4$ ; 3086 BLBS W^U.7, 3$ ;U.7, 3$ ; 3093 CALLS #0, W^TERM_CLOSE ;#0, TERM_CLOSE ; 3096 PUSHL #134316242 ;#134316242 ; 3097 CALLS #1, G^LIB$SIGNAL ;#1, LIB$SIGNAL ; MOVL #134316242, R0 ;#134316242, R0 ; 3098 RET ; ; 3$: MOVQ W^U.4, W^U.65 ;U.4, U.65 ; 3102 BLBS R8, 5$ ;STATUS, 5$ ; 3107 CALLS #0, W^TERM_CLOSE ;#0, TERM_CLOSE ; 3110 4$: PUSHL R8 ;STATUS ; 3111 CALLS #1, G^LIB$SIGNAL ;#1, LIB$SIGNAL ; BRW 17$ ;17$ ; 3112 5$: CLRQ W^U.20 ;U.20 ; 3118 TSTW W^SESSION_DESC ;SESSION_DESC ; 3121 BEQL 6$ ;6$ ; PUSHAB W^U.18 ;U.18 ; 3124 PUSHAB W^U.17 ;U.17 ; PUSHAB W^SESSION_DESC ;SESSION_DESC ; CALLS #3, W^LOG_OPEN ;#3, LOG_OPEN ; MOVL R0, R8 ;R0, STATUS ; BLBC R8, 6$ ;STATUS, 6$ ; 3126 MOVL #1, W^U.20 ;#1, U.20 ; 3129 MOVL #1, W^U.21 ;#1, U.21 ; 3130 6$: PUSHL #5 ;#5 ; 3136 CALLS #1, G^SYS$CLREF ;#1, SYS$CLREF ; MOVL #1, R2 ;#1, FLAG ; 3138 7$: PUSHL R2 ;FLAG ; 3139 CALLS #1, G^SYS$SETEF ;#1, SYS$SETEF ; AOBLEQ #4, R2, 7$ ;#4, FLAG, 7$ ; MOVL #58, W^U.76 ;#58, U.76 ; 3145 BLBS W^ECHO_FLAG, 8$ ;ECHO_FLAG, 8$ ; 3147 MOVZBL #122, W^U.76 ;#122, U.76 ; 8$: PUSHAB W^P.AED ;P.AED ; 3153 CALLS #1, G^LIB$PUT_OUTPUT ;#1, LIB$PUT_OUTPUT ; PUSHAB 4(SP) ;CON_MSG_DESC ; 3154 CALLS #1, G^LIB$PUT_OUTPUT ;#1, LIB$PUT_OUTPUT ; PUSHAB W^P.AEF ;P.AEF ; 3155 CALLS #1, G^LIB$PUT_OUTPUT ;#1, LIB$PUT_OUTPUT ; CLRL -(SP) ;-(SP) ; 3156 CALLS #1, G^SYS$SETAST ;#1, SYS$SETAST ; CLRQ -(SP) ;-(SP) ; 3164 CLRQ -(SP) ;-(SP) ; PUSHL #1 ;#1 ; PUSHAB W^U.69 ;U.69 ; CLRL -(SP) ;-(SP) ; PUSHAB W^U.94 ;U.94 ; PUSHAB W^U.68 ;U.68 ; PUSHL W^U.76 ;U.76 ; PUSHL W^U.89 ;U.89 ; CLRL -(SP) ;-(SP) ; CALLS #12, G^SYS$QIO ;#12, SYS$QIO ; MOVL R0, R8 ;R0, STATUS ; BLBC R8, 10$ ;STATUS, 10$ ; 3166 CLRQ -(SP) ;-(SP) ; 3169 CLRQ -(SP) ;-(SP) ; PUSHL #25 ;#25 ; PUSHAB W^U.69+51 ;U.69+51 ; CLRL -(SP) ;-(SP) ; PUSHAB W^U.104 ;U.104 ; PUSHAB W^U.68+16 ;U.68+16 ; MOVZBL #122, -(SP) ;#122, -(SP) ; PUSHL W^U.4 ;U.4 ; CLRL -(SP) ;-(SP) ; CALLS #12, G^SYS$QIO ;#12, SYS$QIO ; MOVL R0, R8 ;R0, STATUS ; BLBC R8, 11$ ;STATUS, 11$ ; 3171 MOVL #1, R2 ;#1, INP_BUFNUM ; 3173 9$: CLRQ -(SP) ;-(SP) ; 3179 CLRQ -(SP) ;-(SP) ; PUSHL #25 ;#25 ; MULL3 #25, R2, R3 ;#25, INP_BUFNUM, R3 ; PUSHAB W^U.69[R3] ;U.69[R3] ; PUSHL R2 ;INP_BUFNUM ; PUSHAB W^U.94 ;U.94 ; PUSHAQ W^U.68[R2] ;U.68[INP_BUFNUM] ; BISL3 #128, W^U.76, -(SP) ;#128, U.76, -(SP) ; PUSHL W^U.89 ;U.89 ; CLRL -(SP) ;-(SP) ; CALLS #12, G^SYS$QIO ;#12, SYS$QIO ; MOVL R0, R8 ;R0, STATUS ; 10$: BLBC R8, 11$ ;STATUS, 11$ ; 3181 CLRQ -(SP) ;-(SP) ; 3185 CLRQ -(SP) ;-(SP) ; PUSHL #25 ;#25 ; PUSHAB W^U.69+51[R3] ;U.69+51[R3] ; PUSHL R2 ;INP_BUFNUM ; PUSHAB W^U.104 ;U.104 ; PUSHAQ W^U.68+16[R2] ;U.68+16[INP_BUFNUM] ; MOVZBL #250, -(SP) ;#250, -(SP) ; PUSHL W^U.4 ;U.4 ; CLRL -(SP) ;-(SP) ; CALLS #12, G^SYS$QIO ;#12, SYS$QIO ; MOVL R0, R8 ;R0, STATUS ; 11$: BLBS R8, 12$ ;STATUS, 12$ ; 3187 BRW 14$ ;14$ ; 12$: AOBLEQ #1, R2, 9$ ;#1, INP_BUFNUM, 9$ ; 3173 PUSHL #1 ;#1 ; 3191 CALLS #1, G^SYS$SETAST ;#1, SYS$SETAST ; PUSHL #5 ;#5 ; 3192 CALLS #1, G^SYS$WAITFR ;#1, SYS$WAITFR ; PUSHL #30 ;#30 ; 3193 CLRL -(SP) ;-(SP) ; CALLS #2, G^SYS$WFLAND ;#2, SYS$WFLAND ; MOVZWL W^NODE_DESC, R0 ;NODE_DESC, R0 ; 3194 MOVZWL W^U.83, R1 ;U.83, R1 ; ADDL2 R1, R0 ;R1, R0 ; ADDW3 #1, R0, 4(SP) ;#1, R0, CON_MSG_DESC ; MOVZWL W^NODE_DESC, R10 ;NODE_DESC, R10 ; 3195 MOVZWL W^U.83, R9 ;U.83, R9 ; 3196 MOVZWL 4(SP), R7 ;CON_MSG_DESC, R7 ; 3197 MOVL 8(SP), R6 ;CON_MSG_DESC+4, R6 ; 3198 MOVC5 #1, W^P.AEH, #0, R7, (R6) ;#1, P.AEH, #0, R7, (R6) ; BGEQ 13$ ;13$ ; INCL R6 ;R6 ; DECL R7 ;R7 ; MOVC5 R10, @W^NODE_DESC+4, #0, R7, (R6) ;R10, @NODE_DESC+4, #0, R7, (R6) ; BGEQ 13$ ;13$ ; ADDL2 R10, R6 ;R10, R6 ; SUBL2 R10, R7 ;R10, R7 ; MOVC5 R9, @W^U.83+4, #0, R7, (R6) ;R9, @U.83+4, #0, R7, (R6) ; 13$: PUSHAB 4(SP) ;CON_MSG_DESC ; 3199 CALLS #1, G^LIB$PUT_OUTPUT ;#1, LIB$PUT_OUTPUT ; PUSHAB W^P.AEI ;P.AEI ; 3200 CALLS #1, G^LIB$PUT_OUTPUT ;#1, LIB$PUT_OUTPUT ; 14$: CLRQ -(SP) ;-(SP) ; 3205 CALLS #2, G^SYS$CANTIM ;#2, SYS$CANTIM ; BLBC W^U.20, 15$ ;U.20, 15$ ; 3210 PUSHAB W^U.18 ;U.18 ; PUSHAB W^U.17 ;U.17 ; CALLS #2, W^LOG_CLOSE ;#2, LOG_CLOSE ; 15$: CLRL W^U.20 ;U.20 ; 3212 CALLS #0, W^TERM_CLOSE ;#0, TERM_CLOSE ; 3216 MOVL R0, R8 ;R0, STATUS ; BLBS R8, 16$ ;STATUS, 16$ ; 3218 PUSHL R8 ;STATUS ; CALLS #1, G^LIB$SIGNAL ;#1, LIB$SIGNAL ; 16$: PUSHL #1 ;#1 ; 3220 CALLS #1, G^SYS$SETAST ;#1, SYS$SETAST ; 17$: MOVL R8, R0 ;STATUS, R0 ; 3221 RET ; ; 3222 ; Routine Size: 886 bytes, Routine Base: $CODE$ + 1245 ; 3223 1 ; 3224 1 %SBTTL 'End of KERTRM' ; 3225 1 END ! End of module ; 3226 1 ; 3227 0 ELUDOM ; PSECT SUMMARY ; ; Name Bytes Attributes ; ; $OWN$ 1636 NOVEC, WRT, RD ,NOEXE,NOSHR, LCL, REL, CON,NOPIC,ALIGN(2) ; $GLOBAL$ 44 NOVEC, WRT, RD ,NOEXE,NOSHR, LCL, REL, CON,NOPIC,ALIGN(2) ; $PLIT$ 1344 NOVEC,NOWRT, RD ,NOEXE,NOSHR, LCL, REL, CON,NOPIC,ALIGN(2) ; $CODE$ 5563 NOVEC,NOWRT, RD , EXE,NOSHR, LCL, REL, CON,NOPIC,ALIGN(2) ; . ABS . 0 NOVEC,NOWRT,NORD ,NOEXE,NOSHR, LCL, ABS, CON,NOPIC,ALIGN(0) ; Library Statistics ; ; -------- Symbols -------- Pages Processing ; File Total Loaded Percent Mapped Time ; ; SYS$COMMON:[SYSLIB]STARLET.L32;1 9776 64 0 581 00:00.7 ; COMMAND QUALIFIERS ; BLISS KERTRM/LIST=KERTRM.MAR/MACHINE_CODE=(ASSEM,NOBINARY,UNIQUE)/NOOBJECT/SOURCE=NOHEADER ; Compilation Complete .END