Trailing-Edge
-
PDP-10 Archives
-
BB-H348C-RM_1982
-
swskit-v21/listings/mcb/inpsrv.list
There are no other files named inpsrv.list in the archive.
INPSRV - PROCESS INPUT CHARACTE MACRO M1110 13-OCT-79 13:17
TABLE OF CONTENTS
3- 100 DECLARATIONS
4- 100 INPSRV - Service CTY input
5- 100 CHRCLS - Classify a Character
6- 100 PROMPT - Generate Prompt String on CTY
7- 100 CRLF - Echo a CR/LF to the CTY
8- 100 CVPROC - Process character after ^V
9- 100 PUTCHR - Put a character in the input buffer
10- 100 TEMPLATE_EXAMPLE -
INPSRV - PROCESS INPUT CHARACTE MACRO M1110 13-OCT-79 13:17 PAGE 2
100 .TITLE INPSRV - PROCESS INPUT CHARACTERS
200 .IDENT /X0.03/
300 .ENABL LC
400
500 ;
600 ; COPYRIGHT (C) 1978
700 ; DIGITAL EQUIPMENT CORPORATION, MAYNARD, MASSACHUSETTS 01754
800 ;
900 ; THIS SOFTWARE IS FURNISHED UNDER A LICENSE FOR USE ONLY ON A SINGLE
1000 ; COMPUTER SYSTEM AND MAY BE COPIED ONLY WITH THE INCLUSION OF THE
1100 ; ABOVE COPYRIGHT NOTICE. THIS SOFTWARE, OR ANY OTHER COPIES THEREOF,
1200 ; MAY NOT BE PROVIDED OR OTHERWISE MADE AVAILABLE TO ANY OTHER PERSON
1300 ; EXCEPT FOR USE ON SUCH SYSTEM AND TO ONE WHO AGREES TO THESE LICENSE
1400 ; TERMS. TITLE TO AND OWNERSHIP OF THE SOFTWARE SHALL AT ALL TIMES
1500 ; REMAIN IN DEC.
1600 ;
1700 ; THE INFORMATION IN THIS SOFTWARE IS SUBJECT TO CHANGE WITHOUT NOTICE
1800 ; AND SHOULD NOT BE CONSTRUED AS A COMMITMENT BY DIGITAL EQUIPMENT
1900 ; CORPORATION.
2000 ;
2100 ; DEC ASSUMES NO RESPONSIBILITY FOR THE USE OR RELIABILITY OF ITS
2200 ; SOFTWARE ON EQUIPMENT WHICH IS NOT SUPPLIED BY DEC.
2300 ;
2400
2500 ;++
2600 ; FACILITY: DN200 Remote Station
2700 ; POSI Task
2800 ;
2900 ; ABSTRACT:
3000 ;
3100 ; This module processes characters typed by the operator of the
3200 ; DN200 remote station. Input lines are constructed and passed
3300 ; to either the host OPR or local command process.
3400 ;
3500 ; ENVIRONMENT: This module does not require privileges.
3600 ;
3700 ; AUTHOR: Scott G. Robinson, CREATION DATE: 10-AUG-78
3800 ;
3900 ; MODIFIED BY:
4000 ;
4100 ; Scott G. Robinson, 26-DEC-78 : VERSION X0.01, X0.02
4200 ; X0.03
4300 ; 01 - Add a LF character along with a CR to the end of
4400 ; all input lines.
4500 ;
4600 ; 02 - Add synchronization of prompting code to INPSRV
4700 ;
4800 ; 03 - Fix ^O processing due to bug introduced by edit 02
4900 ; above
5000 ;
5100 ; , : VERSION
5200 ; 01 -
5300 ;--
INPSRV - PROCESS INPUT CHARACTE MACRO M1110 13-OCT-79 13:17 PAGE 3
DECLARATIONS
100 .SBTTL DECLARATIONS
200 ;
300 ; INCLUDE FILES:
400 ;
500 .MCALL NETDF$,SETF$S
600 ;
700 ; MACROS:
800 ;
900 .MCALL QIOW$S
1000
1100 .MACRO CALLR,ARG
1200 JMP ARG
1300 .ENDM
1400 ;
1500 ; EQUATED SYMBOLS:
1600 ;
1700 000000 NETDF$
1800 000015 CR=15 ;Carriage Return
1900 000012 LF=12 ;Line feed
2000 000007 BEL=7 ;Ring the bell
2100 000205 ILBLEN=133. ;Length of input buffer
2200 ;
2300 000000 MOD.H==0 ;OPR command mode
2400 000001 MOD.C==1 ;Local command mode
2500 ; Input processing state flags
2600 000001 CI$VT==1 ;^V typed as last character
2700 000002 CI$DI==2 ;Defer input character processing
2800 ;
2900 ; OWN STORAGE:
3000 ;
3100 000000 .PSECT INPDAT,D
3200 000000 136 117 056 CTOMSG:: .ASCII /^O.../ ;Issued on ^O
000003 056 056
3300 000005 CTOLEN==.-CTOMSG
3400 .EVEN
3500 000006 000000 CIFLAG:: .WORD 0 ;Input processing state flags
3600 000010 000000 INPMOD:: .WORD MOD.H ;Input mode flag
3700 000012 000000 NTCCO:: .WORD 0 ;^O flag
3800 000014 000000 IL.IN:: .WORD 0 ;Pointer into CTYBUF
3900 000016 CTYBUF:: .BLKB ILBLEN ;CTY input buffer
4000 ;
INPSRV - PROCESS INPUT CHARACTE MACRO M1110 13-OCT-79 13:17 PAGE 4
INPSRV - SERVICE CTY INPUT
100 .SBTTL INPSRV - Service CTY input
200 ;++
300 ; FUNCTIONAL DESCRIPTION:
400 ;
500 ; INPSRV is called to process a character (possibly) entered at
600 ; the CTY of the DN200.
700 ;
800 ; Echoing of characters and processing of special characters
900 ; appears like TOPS-20 (for a hard-copy terminal). Provision
1000 ; for recognition mode processing is made but normally not
1100 ; assembled.
1200 ;
1300 ; Special Characters -- Meaning
1400 ;
1500 ; ^O Stop OPR output
1600 ; ^R Retype current input buffer
1700 ; ^U Erase current input buffer
1800 ; ^W Erase back to punctuation
1900 ; ^\ Set local command mode
2000 ; <RUBOUT> 177 Erase last character input
2100 ; <BS> ^H Erase last character input
2200 ; ^V Escape next character
2300 ; ^Z Terminate and send as EOF to OPR
2400 ; <RETURN> ^M Terminate Line unless preceded by ^V
2500 ; <LF> ^J "
2600 ; <VT> ^K "
2700 ; <FF> ^L "
2800 ;
2900 ; ^F Recognition mode terminator
3000 ; <ESC> ^[ Recognition mode terminator
3100 ; ? Recognition mode terminator
3200 ;
3300 ; CALLING SEQUENCE:
3400 ;
3500 ; CALL INPSRV
3600 ;
3700 ; INPUT PARAMETERS:
3800 ;
3900 ; R0 = character to process
4000 ;
4100 ; IMPLICIT INPUTS:
4200 ;
4300 ; CTYBUF - Current input buffer
4400 ; IL.IN - the input buffer IN pointer
4500 ; MOD.C - local command mode flag value
4600 ;
4700 ; OUTPUT PARAMETERS:
4800 ;
4900 ; NONE
5000 ;
5100 ; IMPLICIT OUTPUTS:
5200 ;
5300 ; CTYBUF - Current input buffer
5400 ; IL.IN - the input buffer IN pointer
5500 ; NTCCO - ^O flag
5600 ; INPMOD - changed on ^\ to enter local command mode
5700 ;
INPSRV - PROCESS INPUT CHARACTE MACRO M1110 13-OCT-79 13:17 PAGE 4-1
INPSRV - SERVICE CTY INPUT
5800 ; COMPLETION CODES:
5900 ;
6000 ; NONE
6100 ;
6200 ; SIDE EFFECTS:
6300 ;
6400 ; Character may be printed on the terminal.
6500 ;
6600 ;--
6700
6800 000000 .PSECT INPINS,I,RO
6900 000000 INPSRV:: ;Enter here to process input
7000 000000 004767 000000G CALL $SAVAL ;Save all registers
7100 000004 004767 000602 CALL CHRCLS ;Classify input character
7200 000010 016701 000014' MOV IL.IN,R1 ;Set R1 to input pointer
7300 000014 032767 000001 000006' BIT #CI$VT,CIFLAG ;^V typed ?
7400 000022 001402 BEQ 10$ ;No, process normally
7500 000024 CALLR CVPROC ;Process ^V and exit
7600 000030 006302 10$: ASL R2 ;Form word offset
7700 000032 004772 000040' CALL @30$(R2) ;Branch to appropriate process
7800 000036 000207 RETURN ;Exit
7900 ;
8000 ; Character Class Dispatch Table
8100 ;
8200 000040 000054' 30$: 100$ ;0 - Formatting Control Characters
8300 000042 000130' 110$ ;1 - Other Control Characters
8400 000044 000152' 120$ ;2 - Numerics
8500 000046 000152' 130$ ;3 - Alphabetics
8600 000050 000174' 140$ ;4 - Numeric punctuation
8700 000052 000176' 150$ ;5 - Other punctuation
8800 ;
8900 000054 100$: ;Formatting Control Characters
9000 000054 112761 000015 000016' MOVB #CR,CTYBUF(R1) ;Assume CR on any of these characters
9100 000062 005201 INC R1 ;Advance pointer
9200 000064 112761 000012 000016' MOVB #LF,CTYBUF(R1) ;Insert a LF also
9300 000072 005201 103$: INC R1 ;Update character count
9400 000074 010167 000014' MOV R1,IL.IN ;Update IN displacement
9500 000100 004767 000000G CALL XMTLIN ;Try to transmit line
9600 000104 005267 000000G 105$: INC CNTRLR ;Flag ^R to mail loop
9700 ; this causes synchronization
9800 ; of prompt with data
9900 000110 SETF$S #MAIEFN ;Advance main loop
10000 000122 005067 000014' CLR IL.IN ;Show no input characters
10100 000126 000207 RETURN ;Exit
10200 ;
10300 000130 110$: ;Other control characters
10400 000130 010003 MOV R0,R3 ;Setup for dispatch
10500 000132 006303 ASL R3 ;Make word offset
10600 000134 000173 000512' JMP @390$(R3) ;Go to processing routine
10700 000140 012700 000007 112$: MOV #BEL,R0 ;Ignore and issue BEL
10800 000144 004767 000000G CALL ECHO
10900 000150 000207 RETURN ;Exit
11000 ;
11100 000152 120$: ;Numerics
11200 000152 130$: ;Alphabetics
11300 000152 122700 000077 CMPB #'?,R0 ;Is it a "?" ?
11400 000156 001770 BEQ 112$ ;Yes, then BEL it
INPSRV - PROCESS INPUT CHARACTE MACRO M1110 13-OCT-79 13:17 PAGE 4-2
INPSRV - SERVICE CTY INPUT
11500 000160 004767 000772 CALL PUTCHR ;Put character into buffer
11600 000164 103765 BCS 112$ ;If failure, BEL it
11700 000166 004767 000000G CALL ECHO ;Echo character
11800 000172 000207 RETURN
11900 ;
12000 000174 140$: ;Numeric punctuation
12100 000174 000766 BR 130$ ;Process as alphabetic characters
12200 ;
12300 000176 150$: ;Other punctuation
12400 000176 122700 000177 CMPB #177,R0 ;RUBOUT?
12500 000202 001374 BNE 140$ ;No, process as numeric punctuation
12600 000204 005301 155$: DEC R1 ;Backup a character
12700 000206 002754 BLT 112$ ;Can't go negative, ignore and BEL
12800 000210 010167 000014' MOV R1,IL.IN ;Update IN displacement
12900 000214 116100 000016' MOVB CTYBUF(R1),R0 ;Issue backspaced over character
13000 000220 004767 000000G CALL ECHO
13100 000224 012700 000134 MOV #'\,R0 ;Issue \ character
13200 000230 004767 000000G CALL ECHO
13300 000234 000207 RETURN ;Exit
13400 ;
13500 000236 170$: ;Processing of ^O
13600 000236 005167 000012' COM NTCCO ;Complement ^O flag
13700 000242 001001 BNE 172$ ;NE if just set
13800 000244 000207 RETURN ;Exit
13900 ; Here to issue the ^O... Flag
14000 000246 172$: QIOW$S #IO.WLB,#LUNCTY,#HLPEFN,,,,<#CTOMSG,#CTOLEN,#0>
14100 000316 000207 RETURN ;Exit
14200 ;
14300 000320 220$: ;Processing of ^R
14400 000320 004767 000426 CALL PROMPT ;Issue Prompt Sequence
14500 000324 005002 CLR R2 ;Use R2 for displacement
14600 000326 020267 000014' 223$: CMP R2,IL.IN ;Done?
14700 000332 001406 BEQ 225$ ;Yes, exit
14800 000334 116200 000016' MOVB CTYBUF(R2),R0 ;Get character to echo
14900 000340 004767 000000G CALL ECHO
15000 000344 005202 INC R2 ;Update displacement
15100 000346 000767 BR 223$ ;Loop on for another
15200 000350 000207 225$: RETURN ;Exit
15300 ;
15400 000352 250$: ;Processing of ^U
15500 000352 012700 000040 MOV #' ,R0 ;Echo space
15600 000356 004767 000000G CALL ECHO
15700 000362 012700 000130 MOV #'X,R0 ;Echo XXX
15800 000366 004767 000000G CALL ECHO
15900 000372 004767 000000G CALL ECHO
16000 000376 004767 000000G CALL ECHO
16100 000402 000640 BR 105$ ;Join CR/LF code
16200 ;
16300 ;
16400 000404 260$: ;Processing of ^V
16500 000404 052767 000001 000006' BIS #CI$VT,CIFLAG ;Set ^V typed
16600 000412 000207 RETURN ;and ignore it
16700 ;
16800 000414 270$: ;Processing of ^W
16900 000414 005301 DEC R1 ;Backup one character
17000 000416 002650 BLT 112$ ;If no characters left ignore and BEL
17100 000420 001412 BEQ 275$ ;If now 0 we are done
INPSRV - PROCESS INPUT CHARACTE MACRO M1110 13-OCT-79 13:17 PAGE 4-3
INPSRV - SERVICE CTY INPUT
17200 000422 005301 272$: DEC R1 ;Backup another character
17300 000424 001410 BEQ 275$ ;Done if no characters left
17400 000426 116100 000016' MOVB CTYBUF(R1),R0 ;Check character
17500 000432 004767 000154 CALL CHRCLS ;Classify character
17600 000436 022702 000004 CMP #4,R2 ;Punctuation?
17700 000442 003367 BGT 272$ ;No, must be something else
17800 000444 005201 INC R1 ;Don't back over punctuation
17900 000446 010167 000014' 275$: MOV R1,IL.IN ;Restore IN pointer
18000 000452 012700 000137 MOV #'_,R0 ;Issue _
18100 000456 004767 000000G CALL ECHO
18200 000462 000207 RETURN ;Exit
18300 ;
18400 000464 320$: ;Here to process ^Z
18500 000464 110061 000016' MOVB R0,CTYBUF(R1) ;Store ^Z as terminator
18600 000470 000167 177376 JMP 103$ ;Try to send line
18700 ;
18800 000474 005701 340$: TST R1 ;If not first character BEL it
18900 000476 001220 BNE 112$ ;Ignore it
19000 000500 012767 000001 000010' MOV #MOD.C,INPMOD ;Set command input
19100 000506 000167 177372 JMP 105$ ;Now get input
19200 ;
19300 000512 390$: ;Dispatch table for control chars
19400 000512 000140' 112$ ;0 - NUL
19500 000514 000140' 112$ ;1 - SOH
19600 000516 000140' 112$ ;2 - STX
19700 000520 000140' 112$ ;3 - ETX
19800 000522 000140' 112$ ;4 - EOT
19900 000524 000140' 112$ ;5 - ENQ
20000 000526 000140' 112$ ;6 - ACK
20100 000530 000140' 112$ ;7 - BEL
20200 000532 000204' 155$ ;10 - BS
20300 000534 000140' 112$ ;11 - HT
20400 000536 000054' 100$ ;12 - LF
20500 000540 000054' 100$ ;13 - VT
20600 000542 000054' 100$ ;14 - FF
20700 000544 000054' 100$ ;15 - CR
20800 000546 000140' 112$ ;16 - SO
20900 000550 000236' 170$ ;17 - SI
21000 000552 000140' 112$ ;20 - DLE
21100 000554 000140' 112$ ;21 - DC1
21200 000556 000320' 220$ ;22 - DC2
21300 000560 000140' 112$ ;23 - DC3
21400 000562 000140' 112$ ;24 - DC4
21500 000564 000352' 250$ ;25 - NAK
21600 000566 000404' 260$ ;26 - SYN
21700 000570 000414' 270$ ;27 - ETB
21800 000572 000140' 112$ ;30 - CAN
21900 000574 000140' 112$ ;31 - EM
22000 000576 000464' 320$ ;32 - SUB
22100 000600 000140' 112$ ;33 - ESC
22200 000602 000474' 340$ ;34 - FS
22300 000604 000140' 112$ ;35 - GS
22400 000606 000140' 112$ ;36 - RS
22500 000610 000140' 112$ ;37 - US
22600 ;
INPSRV - PROCESS INPUT CHARACTE MACRO M1110 13-OCT-79 13:17 PAGE 5
CHRCLS - CLASSIFY A CHARACTER
100 .SBTTL CHRCLS - Classify a Character
200 ;++
300 ; FUNCTIONAL DESCRIPTION:
400 ;
500 ; CHRCLS classifies characters into one of 6 groups:
600 ; 0 - Formatting character (12 - 15)
700 ; 1 - Non-formatting control character (0-11,16-37)
800 ; 2 - Numeric (60-71)
900 ; 3 - Alphabetic (101-132, 141-172)
1000 ; 4 - Numeric punctuation ".-," (54-56)
1100 ; 5 - Other punctuation (40-53, 57, 72-100, 173-177)
1200 ;
1300 ;
1400 ; CALLING SEQUENCE:
1500 ;
1600 ; CALL CHRCLS
1700 ;
1800 ; INPUT PARAMETERS:
1900 ;
2000 ; R0 is character to classify
2100 ;
2200 ; IMPLICIT INPUTS:
2300 ;
2400 ; NONE
2500 ;
2600 ; OUTPUT PARAMETERS:
2700 ;
2800 ; R2 is class as documented above
2900 ;
3000 ; IMPLICIT OUTPUTS:
3100 ;
3200 ; NONE
3300 ;
3400 ; COMPLETION CODES:
3500 ;
3600 ; NONE
3700 ;
3800 ; SIDE EFFECTS:
3900 ;
4000 ; NONE
4100 ;
4200 ;--
4300
4400 000612 CHRCLS: ;Enter here to classify character
4500 000612 022700 000040 CMP #40,R0 ;Less than Space?
4600 000616 003030 BGT 20$ ;Yes, some sort of control character
4700 000620 022700 000101 CMP #'A,R0 ;Numeric or punctuation?
4800 000624 003014 BGT 10$ ;Yes, try numerics
4900 000626 012702 000003 MOV #3,R2 ;No, possibly alphabetic
5000 000632 022700 000132 CMP #'Z,R0 ;Upper case?
5100 000636 002044 BGE 90$ ;Yes, so we have classified it
5200 000640 022700 000141 CMP #'a,R0 ;Maybe lower case?
5300 000644 003037 BGT 50$ ;No, it is other punctuation
5400 000646 022700 000172 CMP #'z,R0 ;Maybe lower case?
5500 000652 002036 BGE 90$ ;Yes, we have classified character
5600 000654 000433 BR 50$ ;No, Other punctuation
5700 000656 022700 000060 10$: CMP #'0,R0 ;Numeric?
INPSRV - PROCESS INPUT CHARACTE MACRO M1110 13-OCT-79 13:17 PAGE 5-1
CHRCLS - CLASSIFY A CHARACTER
5800 000662 003020 BGT 40$ ;No, possible numeric punctuation
5900 000664 012702 000002 MOV #2,R2 ;Yes, possible numeric
6000 000670 022700 000071 CMP #'9,R0 ;Numeric?
6100 000674 002025 BGE 90$ ;Yes, we have classified character
6200 000676 000422 BR 50$ ;No, must be other punctuation
6300 000700 022700 000015 20$: CMP #15,R0 ;Formatting control character?
6400 000704 002404 BLT 30$ ;No, non-formatting control
6500 000706 005002 CLR R2 ;Possibly formatting control
6600 000710 022700 000012 CMP #12,R0 ;In range of LF-CR?
6700 000714 003415 BLE 90$ ;Yes, we have classified character
6800 000716 012702 000001 30$: MOV #1,R2 ;Non-formatting control character
6900 000722 000412 BR 90$ ;Exit
7000 000724 022700 000056 40$: CMP #'.,R0 ;Maybe numeric punctuation?
7100 000730 002405 BLT 50$ ;No, must be other punctuation
7200 000732 012702 000004 MOV #4,R2 ;Possible numeric punctuation
7300 000736 022700 000054 CMP #',,R0 ;In range of numeric punctuation?
7400 000742 002002 BGE 90$ ;Yes, we have classified character
7500 000744 012702 000005 50$: MOV #5,R2 ;Other punctuation
7600 000750 000207 90$: RETURN ;Exit
7700 ;
INPSRV - PROCESS INPUT CHARACTE MACRO M1110 13-OCT-79 13:17 PAGE 6
PROMPT - GENERATE PROMPT STRING ON CTY
100 .SBTTL PROMPT - Generate Prompt String on CTY
200 ;++
300 ; FUNCTIONAL DESCRIPTION:
400 ;
500 ; PROMPT issues the appropriate prompt string on the
600 ; CTY based upon whether we are in local command or
700 ; OPR command mode.
800 ;
900 ; CALLING SEQUENCE:
1000 ;
1100 ; CALL PROMPT
1200 ;
1300 ; INPUT PARAMETERS:
1400 ;
1500 ; NONE
1600 ;
1700 ; IMPLICIT INPUTS:
1800 ;
1900 ; INPMOD - the input mode flag word
2000 ; MOD.H - the OPR command flag value
2100 ; NSTRNG - the local command prompt string
2200 ; NSTLEN - the length of NSTRNG
2300 ; PSTRNG - the OPR command prompt string
2400 ; PSTLEN - the length of PSTRNG
2500 ; CB0+N.RND - the current host node-name
2600 ; NNMLEN - the maximum length of the host node-name
2700 ;
2800 ; OUTPUT PARAMETERS:
2900 ;
3000 ; NONE
3100 ;
3200 ; IMPLICIT OUTPUTS:
3300 ;
3400 ; NONE
3500 ;
3600 ; COMPLETION CODES:
3700 ;
3800 ; NONE
3900 ;
4000 ; SIDE EFFECTS:
4100 ;
4200 ; NONE
4300 ;
4400 ;--
4500
4600 000752 PROMPT:: ;Enter here to prompt operator
4700 000752 004767 000000G CALL $SAVAL ;Save registers
4800 000756 004767 000074 CALL CRLF ;Start with CR/LF
4900 000762 022767 000000 000010' CMP #MOD.H,INPMOD ;Is Mode for Host?
5000 000770 001405 BEQ 3$ ;Yes, must be for host
5100 000772 012701 000000G MOV #NSTRNG,R1 ;Get Local Prompt string
5200 000776 012702 000000G MOV #NSTLEN,R2 ;Length of prompt string
5300 001002 000420 BR 100$ ;Output and exit.
5400 001004 012701 000000G 3$: MOV #CB0+N.RND,R1 ;Where Host node name is stored
5500 001010 012702 000000G MOV #NNMLEN,R2 ;Number of characters
5600 001014 112100 20$: MOVB (R1)+,R0 ;Issue node name
5700 001016 001406 BEQ 30$ ;Done if 0
INPSRV - PROCESS INPUT CHARACTE MACRO M1110 13-OCT-79 13:17 PAGE 6-1
PROMPT - GENERATE PROMPT STRING ON CTY
5800 001020 122700 000040 21$: CMPB #' ,R0 ;Done if blank
5900 001024 001403 BEQ 30$ ;
6000 001026 004767 000000G CALL ECHO ;Send character
6100 001032 077210 SOB R2,20$ ;Loop on
6200 001034 30$:
6300 001034 012701 000000G MOV #PSTRNG,R1 ;Prompt String for Host
6400 001040 012702 000000G MOV #PSTLEN,R2 ;
6500 001044 112100 100$: MOVB (R1)+,R0 ;Putout character
6600 001046 004767 000000G CALL ECHO
6700 001052 077204 SOB R2,100$ ;Loop on for another
6800 001054 000207 RETURN ;Exit
6900 ;
INPSRV - PROCESS INPUT CHARACTE MACRO M1110 13-OCT-79 13:17 PAGE 7
CRLF - ECHO A CR/LF TO THE CTY
100 .SBTTL CRLF - Echo a CR/LF to the CTY
200 ;++
300 ; FUNCTIONAL DESCRIPTION:
400 ;
500 ; CRLF issues a CR followed by a LF to the CTY.
600 ;
700 ; CALLING SEQUENCE:
800 ;
900 ; CALL CRLF
1000 ;
1100 ; INPUT PARAMETERS:
1200 ;
1300 ; NONE
1400 ;
1500 ; IMPLICIT INPUTS:
1600 ;
1700 ; NONE
1800 ;
1900 ; OUTPUT PARAMETERS:
2000 ;
2100 ; NONE
2200 ;
2300 ; IMPLICIT OUTPUTS:
2400 ;
2500 ; NONE
2600 ;
2700 ; COMPLETION CODES:
2800 ;
2900 ; NONE
3000 ;
3100 ; SIDE EFFECTS:
3200 ;
3300 ; Types characters on the CTY.
3400 ;
3500 ;--
3600
3700 001056 004767 000000G CRLF:: CALL $SAVAL ;Save registers
3800 001062 012700 000015 MOV #CR,R0 ;Issue CR
3900 001066 004767 000000G CALL ECHO
4000 001072 012700 000012 MOV #LF,R0 ;Issue LF
4100 001076 004767 000000G CALL ECHO
4200 001102 000207 RETURN ;Exit
4300 ;
INPSRV - PROCESS INPUT CHARACTE MACRO M1110 13-OCT-79 13:17 PAGE 8
CVPROC - PROCESS CHARACTER AFTER ^V
100 .SBTTL CVPROC - Process character after ^V
200 ;++
300 ; FUNCTIONAL DESCRIPTION:
400 ;
500 ; CVPROC determines what to put in the input buffer when
600 ; the combination ^V <any> is typed by the user.
700 ;
800 ; Currently, the ^V is not put in the input buffer if
900 ; we are in local command mode. The character after
1000 ; the ^V is always put in the buffer.
1100 ;
1200 ; CALLING SEQUENCE:
1300 ;
1400 ; CALL CVPROC
1500 ;
1600 ; INPUT PARAMETERS:
1700 ;
1800 ; R0 - Character typed after ^V
1900 ; R1 - Current IL.IN, CTYBUF input pointer
2000 ; R2 - Class of character in R0
2100 ;
2200 ; IMPLICIT INPUTS:
2300 ;
2400 ; CTYBUF - the input buffer
2500 ;
2600 ; OUTPUT PARAMETERS:
2700 ;
2800 ; NONE
2900 ;
3000 ; IMPLICIT OUTPUTS:
3100 ;
3200 ; CTYBUF - the input buffer
3300 ; IL.IN - the input buffer pointer
3400 ;
3500 ; COMPLETION CODES:
3600 ;
3700 ; NONE
3800 ;
3900 ; SIDE EFFECTS:
4000 ;
4100 ; A character is probably typed on the terminal.
4200 ;
4300 ;--
4400
4500 001104 CVPROC: ;Enter here to process ^V <CHAR>
4600 001104 022767 000000 000010' CMP #MOD.H,INPMOD ;OPR input mode?
4700 001112 001006 BNE 100$ ;No, just issue typed character
4800 001114 010046 MOV R0,-(SP) ;Yes, save typed character
4900 001116 012700 000026 MOV #26,R0 ;Issue ^V
5000 001122 004767 000030 CALL PUTCHR ;
5100 ; BCS ??? ;Don't care if it fails
5200 001126 012600 MOV (SP)+,R0 ;Restore typed character
5300 001130 004767 000022 100$: CALL PUTCHR ;Issue typed character
5400 001134 103002 BCC 110$ ;If success, echo it
5500 001136 012700 000007 MOV #BEL,R0 ;Otherwise, BEL it
5600 001142 004767 000000G 110$: CALL ECHO ;and ECHO it
5700 001146 042767 000001 000006' BIC #CI$VT,CIFLAG ;Clear ^V typed flag
INPSRV - PROCESS INPUT CHARACTE MACRO M1110 13-OCT-79 13:17 PAGE 8-1
CVPROC - PROCESS CHARACTER AFTER ^V
5800 001154 000207 RETURN
5900 ;
INPSRV - PROCESS INPUT CHARACTE MACRO M1110 13-OCT-79 13:17 PAGE 9
PUTCHR - PUT A CHARACTER IN THE INPUT BUFFER
100 .SBTTL PUTCHR - Put a character in the input buffer
200 ;++
300 ; FUNCTIONAL DESCRIPTION:
400 ;
500 ; PUTCHR puts a character in the input buffer if there is room.
600 ; Otherwise, it sets Carry indicating failure.
700 ;
800 ; CALLING SEQUENCE:
900 ;
1000 ; CALL PUTCHR
1100 ;
1200 ; INPUT PARAMETERS:
1300 ;
1400 ; R0 is character to insert
1500 ;
1600 ; IMPLICIT INPUTS:
1700 ;
1800 ; IL.IN - input buffer pointer
1900 ; CTYBUF - input buffer
2000 ;
2100 ; OUTPUT PARAMETERS:
2200 ;
2300 ; NONE
2400 ;
2500 ; IMPLICIT OUTPUTS:
2600 ;
2700 ; IL.IN - input buffer pointer
2800 ; CTYBUF - input buffer
2900 ;
3000 ; CONDITION CODES:
3100 ;
3200 ; Carry Set if character could not be inserted into buffer.
3300 ;
3400 ; Carry Clear if character insert was sucessful.
3500 ;
3600 ; SIDE EFFECTS:
3700 ;
3800 ; NONE
3900 ;
4000 ;--
4100
4200 001156 PUTCHR: ;Enter here to put char into buffer
4300 001156 016701 000014' MOV IL.IN,R1 ;Get input pointer
4400 001162 022701 000203 CMP #ILBLEN-2,R1 ;Would character fill buffer?
4500 001166 003002 BGT 10$ ;No, so insert character
4600 001170 000261 SEC ;Set carry to show error
4700 001172 000406 BR 90$ ;Exit
4800 001174 110061 000016' 10$: MOVB R0,CTYBUF(R1) ;Store character
4900 001200 005201 INC R1 ;Increment count
5000 001202 010167 000014' MOV R1,IL.IN ;Update count
5100 001206 000241 CLC ;Show success
5200 001210 000207 90$: RETURN ;Exit
5300 ;
INPSRV - PROCESS INPUT CHARACTE MACRO M1110 13-OCT-79 13:17 PAGE 10
TEMPLATE_EXAMPLE -
100 .SBTTL TEMPLATE_EXAMPLE -
200 ;++
300 ; FUNCTIONAL DESCRIPTION:
400 ;
500 ;
600 ; CALLING SEQUENCE:
700 ;
800 ; NONE
900 ;
1000 ; INPUT PARAMETERS:
1100 ;
1200 ; NONE
1300 ;
1400 ; IMPLICIT INPUTS:
1500 ;
1600 ; NONE
1700 ;
1800 ; OUTPUT PARAMETERS:
1900 ;
2000 ; NONE
2100 ;
2200 ; IMPLICIT OUTPUTS:
2300 ;
2400 ; NONE
2500 ;
2600 ; COMPLETION CODES:
2700 ;
2800 ; NONE
2900 ;
3000 ; SIDE EFFECTS:
3100 ;
3200 ; NONE
3300 ;
3400 ;--
3500
3600
3700
3800 000001 .END
INPSRV - PROCESS INPUT CHARACTE MACRO M1110 13-OCT-79 13:17 PAGE 10-1
SYMBOL TABLE
BEL = 000007 LF = 000012 NE$TPA= 000010 N.CBL = 000142 N.RNM 000016
CB0 = ****** GX LUNCTY= ****** GX NE$UOB= 000004 N.CDA 000142 N.RNMC 000014
CHRCLS 000612R 003 MAIEFN= ****** GX NNMLEN= ****** GX N.CDAC 000140 N.ROT 000007
CIFLAG 000006RG 002 MOD.C = 000001 G NO.DTR= 000077 N.CID 000064 N.RPS 000056
CI$DI = 000002 G MOD.H = 000000 G NO.FAL= 000021 N.CIDC 000062 N.RPSC 000054
CI$VT = 000001 G NE$ABO= 000046 NO.FA1= 000001 N.CPS 000106 N.RQL = 000110
CNTRLR= ****** GX NE$ABT= 000011 NO.NCU= 000023 N.CPSC 000104 N.RUS 000012
CR = 000015 NE$ACC= 000042 NO.RTL= 000022 N.CTL 000000 N.SDE 000042
CRLF 001056RG 003 NE$ACT= 000044 NO.TAS= 000000 N.DDE 000010 N.SDEC 000040
CTOLEN= 000005 G NE$CDI= 000052 NO.TCL= 000017 N.DDEC 000006 N.SEGZ 000002
CTOMSG 000000RG 002 NE$COM= 000047 NO.TC1= 000005 N.DFM 000004 N.SFM 000036
CTYBUF 000016RG 002 NE$FCF= 000050 NO.TLK= 000020 N.DGP 000006 N.SGP 000040
CVPROC 001104R 003 NE$FMT= 000005 NR$IFC= 000030 N.DNM 000014 N.SND 000030
ECHO = ****** GX NE$GEN= 000007 NSTLEN= ****** GX N.DNMC 000012 N.SNM 000046
HLPEFN= ****** GX NE$ILS= 000043 NSTRNG= ****** GX N.DOT 000005 N.SNMC 000044
IE.NDA= 177662 NE$IMG= 000053 NTCCO 000012RG 002 N.DUS 000010 N.SOT 000037
IE.NNT= 177660 NE$MLB= 000006 NT.ABO= 000005 N.RAC 000070 N.SUS 000042
IE.NRJ= 177666 NE$NOD= 000002 NT.ABT= 000004 N.RACC 000066 PROMPT 000752RG 003
IE.URJ= 177667 NE$NSD= 000003 NT.CON= 000001 N.RDE 000012 PSTLEN= ****** GX
ILBLEN= 000205 NE$RES= 000001 NT.DSC= 000003 N.RDEC 000010 PSTRNG= ****** GX
IL.IN 000014RG 002 NE$SSR= 000000 NT.INT= 000002 N.RFM 000006 PUTCHR 001156R 003
INPMOD 000010RG 002 NE$SSS= 000045 NT.LOG= 000011 N.RGP 000010 XMTLIN= ****** GX
INPSRV 000000RG 003 NE$STA= 000051 NT.MOP= 000010 N.RID 000034 $SAVAL= ****** GX
IO.WLB= ****** GX NE$TCN= 000040 N.CAC 000120 N.RIDC 000032 $$$ARG= 000002
IS.DAO= 000002 NE$TCO= 000041 N.CACC 000116 N.RND 000000
. ABS. 000142 000
000000 001
INPDAT 000223 002
INPINS 001212 003
ERRORS DETECTED: 0
VIRTUAL MEMORY USED: 2454 WORDS ( 10 PAGES)
DYNAMIC MEMORY: 3724 WORDS ( 14 PAGES)
ELAPSED TIME: 00:00:31
INPSRV,[135,30]INPSRV/CR/-SP=[130,10]NETLIB/ML,[135,10]INPSRV
INPSRV CREATED BY MACRO ON 13-OCT-79 AT 13:18 PAGE 1
SYMBOL CROSS REFERENCE CREF
SYMBOL VALUE REFERENCES
BEL = 000007 #3-2000 4-10700 8-5500
CB0 = ****** GX 6-5400
CHRCLS 000612 R 4-7100 4-17500 #5-4400
CIFLAG 000006 RG #3-3500 4-7300 *4-16500 *8-5700
CI$DI = 000002 G #3-2700
CI$VT = 000001 G #3-2600 4-7300 4-16500 8-5700
CNTRLR = ****** GX *4-9600
CR = 000015 #3-1800 4-9000 7-3800
CRLF 001056 RG 6-4800 #7-3700
CTOLEN = 000005 G #3-3300 4-14000
CTOMSG 000000 RG #3-3200 3-3300 4-14000
CTYBUF 000016 RG #3-3900 *4-9000 *4-9200 4-12900 4-14800 4-17400 *4-18500 *9-4800
CVPROC 001104 R 4-7500 #8-4500
ECHO = ****** GX 4-10800 4-11700 4-13000 4-13200 4-14900 4-15600 4-15800 4-15900 4-16000
4-18100 6-6000 6-6600 7-3900 7-4100 8-5600
HLPEFN = ****** GX 4-14000
ILBLEN = 000205 #3-2100 3-3900 9-4400
IL.IN 000014 RG #3-3800 4-7200 *4-9400 *4-10000 *4-12800 4-14600 *4-17900 9-4300 *9-5000
INPMOD 000010 RG #3-3600 *4-19000 6-4900 8-4600
INPSRV 000000 RG #4-6900
IO.WLB = ****** GX 4-14000
LF = 000012 #3-1900 4-9200 7-4000
LUNCTY = ****** GX 4-14000
MAIEFN = ****** GX 4-9900
MOD.C = 000001 G #3-2400 4-19000
MOD.H = 000000 G #3-2300 3-3600 6-4900 8-4600
NNMLEN = ****** GX 6-5500
NSTLEN = ****** GX 6-5200
NSTRNG = ****** GX 6-5100
NTCCO 000012 RG #3-3700 *4-13600
N.RND 000000 6-5400
PROMPT 000752 RG 4-14400 #6-4600
PSTLEN = ****** GX 6-6400
PSTRNG = ****** GX 6-6300
PUTCHR 001156 R 4-11500 8-5000 8-5300 #9-4200
XMTLIN = ****** GX 4-9500
$SAVAL = ****** GX 4-7000 6-4700 7-3700
$$$ARG = 000002 #4-14000 4-14000 #4-14000 4-14000 #4-14000 4-14000 #4-14000 4-14000 4-14000
#4-14000 4-14000 4-14000 4-14000 4-14000 4-14000 4-14000 4-14000 4-14000
4-14000 4-14000 #4-14000 4-14000 4-14000 4-14000 4-14000 4-14000 4-14000
4-14000 4-14000 4-14000 4-14000 #4-14000 4-14000 4-14000 4-14000 4-14000
4-14000 4-14000 4-14000 4-14000 4-14000 4-14000
INPSRV CREATED BY MACRO ON 13-OCT-79 AT 13:18 PAGE 2
MACRO CROSS REFERENCE CREF
MACRO NAME REFERENCES
CALLR #3-1100 4-7500
DIR$ #4-9900 4-9900 #4-14000 4-14000
MOV$ #4-9900 4-9900 #4-14000 4-14000 4-14000 4-14000 #4-14000 4-14000 4-14000 #4-14000
4-14000 4-14000
MVB$ #4-14000 4-14000
NETDF$ #3-500 #3-1700
QDPB$S #4-14000 4-14000
QIOW$S #3-900 #4-14000
RVP$ #4-14000 #4-14000 #4-14000 #4-14000
SETF$S #3-500 #4-9900