; 0001 MODULE KERTRM (IDENT = '1.0.000' ; 0002 ) = ; 0003 BEGIN ; 0004 ; 0005 !++ ; 0006 ! FACILITY: ; 0007 ! ; 0008 ! KERMIT-32 terminal processing. ; 0009 ! ; 0010 ! ABSTRACT: ; 0011 ! ; 0012 ! This module will do all of the terminal processing for KERMIT-32. ; 0013 ! It contains the output routines for the terminal to send and ; 0014 ! receive messages as well as the routines to output text for debugging. ; 0015 ! ; 0016 ! ENVIRONMENT: ; 0017 ! ; 0018 ! VAX/VMS user mode. ; 0019 ! ; 0020 ! AUTHOR: Robert C. McQueen, CREATION DATE: 25-March-1983 ; 0021 !-- ; 0022 ; 0023 %SBTTL 'Table of Contents' ; 0024 ! ; 0025 ! TABLE OF CONTENTS: ; 0026 ! ; 0027 %SBTTL 'Revision History' ; 0028 ; 0029 !++ ; 0030 ! ; 0031 ! Start of version 1. 25-March-1983 ; 0032 ! ; 0033 ! 1.0.000 By: Robert C. McQueen On: 25-March-1983 ; 0034 ! Create this module. ; 0035 ! ; 0036 !-- ; 0037 ; 0038 %SBTTL 'Forward routine definitions' ; 0039 ; 0040 FORWARD ROUTINE ; 0041 TT_CHAR : NOVALUE, ! Process a single character ; 0042 TT_OUTPUT : NOVALUE; ! Output the buffer to SYS$OUTPUT ; 0043 ; 0044 %SBTTL 'Library files' ; 0045 ! ; 0046 ! INCLUDE FILES: ; 0047 ! ; 0048 ! ; 0049 ! System definitions ; 0050 ! ; 0051 ; 0052 LIBRARY 'SYS$LIBRARY:STARLET'; ; 0053 ; 0054 ! ; 0055 ! KERMIT common definitions ; 0056 ! ; 0057 ; 0058 REQUIRE 'KERCOM'; ; 0215 ; 0216 REQUIRE 'KERERR'; ; 0265 ; 0266 %SBTTL 'Structure definitions -- $GETDVI arguments' ; 0267 ! ; 0268 ! $GETDVI interface fields and structure definition ; 0269 ! ; 0270 ; 0271 LITERAL ; 0272 DVI_SIZE = 3; ! Length of a DVI item list entry ; 0273 ; 0274 ! ; 0275 ! Fields for accessing the items in a DVI item list ; 0276 ! ; 0277 ; 0278 FIELD ; 0279 DVI_FIELDS = ; 0280 SET ; 0281 DVI_BFR_LENGTH = [0, 0, 16, 0], ; 0282 DVI_ITEM_CODE = [0, 16, 16, 0], ; 0283 DVI_BFR_ADDRESS = [1, 0, 32, 0], ; 0284 DVI_RTN_LENGTH = [2, 0, 32, 0] ; 0285 TES; ; 0286 ; 0287 ! ; 0288 ! Structure definition for item list ; 0289 ; 0290 STRUCTURE ; 0291 DVI_ITEM_LIST [I, O, P, S, E; N] = ; 0292 [(N + 1)*DVI_SIZE*4] ; 0293 (DVI_ITEM_LIST + ((I*DVI_SIZE) + O)*4); ; 0294 ; 0295 %SBTTL 'Structures definitions -- Terminal characteristics' ; 0296 ! ; 0297 ! Terminal characteristics words ; 0298 ! ; 0299 ; 0300 LITERAL ; 0301 TC$_CHAR_LENGTH = 12; ; 0302 ; 0303 ! ; 0304 ! Fields for accessing the items in a characteristic block ; 0305 ! ; 0306 ; 0307 FIELD ; 0308 TC$_FIELDS = ; 0309 SET ; 0310 TC$_CLASS = [0, 0, 8, 0], ; 0311 TC$_TYPE = [0, 8, 8, 0], ; 0312 TC$_BFR_SIZE = [0, 16, 16, 0], ; 0313 TC$_PAGE_LEN = [1, 24, 8, 0], ; 0314 TC$_CHAR = [1, 0, 24, 0], ; 0315 TC$_CHAR_2 = [2, 0, 32, 0] ; 0316 TES; ; 0317 ; 0318 ! ; 0319 ! Structure definition for item list ; 0320 ! ; 0321 ; 0322 STRUCTURE ; 0323 TC$_CHAR_STR [O, P, S, E; N] = ; 0324 [TC$_CHAR_LENGTH] ; 0325 (TC$_CHAR_STR + O*4); ; 0326 ; 0327 %SBTTL 'Macro definitions' ; 0328 ! ; 0329 ! MACROS: ; 0330 ! ; 0331 %(/*macro-decl*/)% ; 0332 %SBTTL 'Symbol definitions' ; 0333 ! ; 0334 ! EQUATED SYMBOLS: ; 0335 ! ; 0336 ; 0337 LITERAL ; 0338 TEXT_BFR_LENGTH = 256; ! Length of the text buffer ; 0339 ; 0340 %SBTTL 'Storage' ; 0341 ! ; 0342 ! OWN STORAGE: ; 0343 ! ; 0344 ! ; 0345 ! TT_xxxxx routine storage ; 0346 ! ; 0347 ; 0348 OWN ; 0349 TEXT_POINTER, ! Pointer to store characters ; 0350 TEXT_BUFFER : VECTOR [CH$ALLOCATION (TEXT_BFR_LENGTH)], ! Buffer of characters ; 0351 TEXT_DESC : BLOCK [8, BYTE]; ; 0352 ; 0353 ! ; 0354 ! Communications routines storage ; 0355 ! ; 0356 ; 0357 OWN ; 0358 TERM_CHAN, ! Channel the terminal is opened on ; 0359 OLD_PARITY : BLOCK [8, BYTE], ! Old IOSB information ; 0360 OLD_TERM_CHAR : TC$_CHAR_STR FIELD (TC$_FIELDS), ! Old terminal chars ; 0361 NEW_TERM_CHAR : TC$_CHAR_STR FIELD (TC$_FIELDS); ! New terminal chars ; 0362 ; 0363 GLOBAL ; 0364 TERM_FLAG; ! Terminal open flag ; 0365 ; 0366 %SBTTL 'External routines' ; 0367 ! ; 0368 ! EXTERNAL REFERENCES: ; 0369 ! ; 0370 ! ; 0371 ! System library routines ; 0372 ! ; 0373 ; 0374 EXTERNAL ROUTINE ; 0375 LIB$SIGNAL : ADDRESSING_MODE (GENERAL), ; 0376 LIB$PUT_OUTPUT : ADDRESSING_MODE (GENERAL); ; 0377 ; 0378 %SBTTL 'External storage' ; 0379 ; 0380 !++ ; 0381 ! The following is the various external storage locations that are ; 0382 ! referenced from this module. ; 0383 !-- ; 0384 ; 0385 ! ; 0386 ! KERMSG storage ; 0387 ! ; 0388 ; 0389 EXTERNAL ; 0390 RCV_EOL, ! Receive EOL character ; 0391 RCV_TIMEOUT, ! Receive time out counter ; 0392 CONNECT_FLAG; ! Flag if communications line is TT: ; 0393 ; 0394 ! ; 0395 ! KERMIT storage ; 0396 ! ; 0397 ; 0398 EXTERNAL ; 0399 TERM_NAME, ! Terminal name ; 0400 TERM_DESC : BLOCK [8, BYTE]; ! Descriptor for terminal name ; 0401 ; 0402 %SBTTL 'Terminal routines -- TT_INIT - Initialize this module' ; 0403 ; 0404 GLOBAL ROUTINE TT_INIT : NOVALUE = ; 0405 ; 0406 !++ ; 0407 ! FUNCTIONAL DESCRIPTION: ; 0408 ! ; 0409 ! This routine will initialize the terminal processing module. It will ; 0410 ! initialize the various data locations in this module. ; 0411 ! ; 0412 ! CALLING SEQUENCE: ; 0413 ! ; 0414 ! TT_INIT(); ; 0415 ! ; 0416 ! INPUT PARAMETERS: ; 0417 ! ; 0418 ! None. ; 0419 ! ; 0420 ! IMPLICIT INPUTS: ; 0421 ! ; 0422 ! None. ; 0423 ! ; 0424 ! OUPTUT PARAMETERS: ; 0425 ! ; 0426 ! None. ; 0427 ! ; 0428 ! IMPLICIT OUTPUTS: ; 0429 ! ; 0430 ! None. ; 0431 ! ; 0432 ! COMPLETION CODES: ; 0433 ! ; 0434 ! None. ; 0435 ! ; 0436 ! SIDE EFFECTS: ; 0437 ! ; 0438 ! None. ; 0439 ! ; 0440 !-- ; 0441 ; 0442 BEGIN ; 0443 ! ; 0444 ! Initialize the text descriptor ; 0445 ! ; 0446 TEXT_DESC [DSC$B_CLASS] = DSC$K_CLASS_S; ; 0447 TEXT_DESC [DSC$B_DTYPE] = DSC$K_DTYPE_T; ; 0448 TEXT_DESC [DSC$A_POINTER] = TEXT_BUFFER; ; 0449 TEXT_DESC [DSC$W_LENGTH] = 0; ; 0450 ! ; 0451 ! Now initialize the various pointers ; 0452 ! ; 0453 TEXT_POINTER = CH$PTR (TEXT_BUFFER); ; 0454 ! ; 0455 ! Set up the terminal name descriptor ; 0456 TERM_DESC [DSC$B_CLASS] = DSC$K_CLASS_S; ; 0457 TERM_DESC [DSC$B_DTYPE] = DSC$K_DTYPE_T; ; 0458 TERM_DESC [DSC$A_POINTER] = TERM_NAME; ; 0459 TERM_DESC [DSC$W_LENGTH] = 12; ; 0460 CH$COPY (10, CH$PTR (UPLIT ('SYS$INPUT:')), 0, 11, CH$PTR (TERM_NAME)); ; 0461 ! ; 0462 ! Initialize the flags ; 0463 ! ; 0464 TERM_FLAG = FALSE; ; 0465 END; ! End of TT_INIT .TITLE KERTRM .IDENT \1.0.000\ .PSECT $PLIT$,NOWRT,NOEXE,2 P.AAA: .ASCII \SYS$INPUT:\<0><0> ; ; .PSECT $OWN$,NOEXE,2 ;TEXT_POINTER U.3: .BLKB 4 ;TEXT_BUFFER U.4: .BLKB 256 ;TEXT_DESC U.5: .BLKB 8 ;TERM_CHAN U.6: .BLKB 4 ;OLD_PARITY U.7: .BLKB 8 ;OLD_TERM_CHAR U.8: .BLKB 12 ;NEW_TERM_CHAR U.9: .BLKB 12 .PSECT $GLOBAL$,NOEXE,2 TERM_FLAG:: .BLKB 4 .EXTRN LIB$SIGNAL, LIB$PUT_OUTPUT, RCV_EOL, RCV_TIMEOUT, CONNECT_FLAG, TERM_NAME, TERM_DESC .PSECT $CODE$,NOWRT,2 .ENTRY TT_INIT, ^M ;TT_INIT, Save R2,R3,R4,R5 ; 0404 MOVL #17694720, W^U.5 ;#17694720, U.5 ; 0449 MOVAB W^U.4, W^U.5+4 ;U.4, U.5+4 ; 0448 MOVAB W^U.4, W^U.3 ;U.4, U.3 ; 0453 MOVL #17694732, W^TERM_DESC ;#17694732, TERM_DESC ; 0459 MOVAB W^TERM_NAME, W^TERM_DESC+4 ;TERM_NAME, TERM_DESC+4 ; 0458 MOVC5 #10, W^P.AAA, #0, #11, W^TERM_NAME ;#10, P.AAA, #0, #11, TERM_NAME ; 0460 CLRL W^TERM_FLAG ;TERM_FLAG ; 0464 RET ; ; 0404 ; Routine Size: 56 bytes, Routine Base: $CODE$ + 0000 ; 0466 ; 0467 %SBTTL 'Terminal routines -- TT_TEXT - Output a text string' ; 0468 ; 0469 GLOBAL ROUTINE TT_TEXT (ADDRESS) : NOVALUE = ; 0470 ; 0471 !++ ; 0472 ! FUNCTIONAL DESCRIPTION: ; 0473 ! ; 0474 ! This routine will output text on the user's terminal. It will ; 0475 ! assume that it must check to determine if it can output the text ; 0476 ! or not. ; 0477 ! ; 0478 ! CALLING SEQUENCE: ; 0479 ! ; 0480 ! TT_TEXT(TEXT_ADDRESS); ; 0481 ! ; 0482 ! INPUT PARAMETERS: ; 0483 ! ; 0484 ! None. ; 0485 ! ; 0486 ! IMPLICIT INPUTS: ; 0487 ! ; 0488 ! None. ; 0489 ! ; 0490 ! OUPTUT PARAMETERS: ; 0491 ! ; 0492 ! None. ; 0493 ! ; 0494 ! IMPLICIT OUTPUTS: ; 0495 ! ; 0496 ! None. ; 0497 ! ; 0498 ! COMPLETION CODES: ; 0499 ! ; 0500 ! None. ; 0501 ! ; 0502 ! SIDE EFFECTS: ; 0503 ! ; 0504 ! None. ; 0505 ! ; 0506 !-- ; 0507 ; 0508 BEGIN ; 0509 ; 0510 LOCAL ; 0511 CHARACTER, ! Character being processed ; 0512 ARG_POINTER; ! Pointer to the argument's text ; 0513 ; 0514 ! ; 0515 ! Construct a pointer to the argument. ; 0516 ! ; 0517 ARG_POINTER = CH$PTR (.ADDRESS); ; 0518 ! ; 0519 ! Get the first character that was passed. ; 0520 ! ; 0521 CHARACTER = CH$RCHAR_A (ARG_POINTER); ; 0522 ! ; 0523 ! Loop reading characters and calling the output routine to process ; 0524 ! them ; 0525 ! ; 0526 ; 0527 WHILE .CHARACTER NEQ CHR_NUL DO ; 0528 BEGIN ; 0529 TT_CHAR (.CHARACTER); ; 0530 CHARACTER = CH$RCHAR_A (ARG_POINTER); ; 0531 END; ; 0532 ; 0533 END; ! End of TT_TEXT .ENTRY TT_TEXT, ^M ;TT_TEXT, Save R2,R3 ; 0469 MOVL 4(AP), R2 ;ADDRESS, ARG_POINTER ; 0517 1$: MOVZBL (R2)+, R3 ;(ARG_POINTER)+, CHARACTER ; 0521 BEQL 2$ ;2$ ; 0527 PUSHL R3 ;CHARACTER ; 0529 CALLS #1, W^U.1 ;#1, U.1 ; BRB 1$ ;1$ ; 0530 2$: RET ; ; 0469 ; Routine Size: 21 bytes, Routine Base: $CODE$ + 0038 ; 0534 ; 0535 %SBTTL 'Terminal routines -- TT_NUMBER - Output a three digit number' ; 0536 ; 0537 GLOBAL ROUTINE TT_NUMBER (NUMBER) : NOVALUE = ; 0538 ; 0539 !++ ; 0540 ! FUNCTIONAL DESCRIPTION: ; 0541 ! ; 0542 ! This routine will store a three digit number into the text buffer. ; 0543 ! It will just return if the number is greater than 999. ; 0544 ! ; 0545 ! CALLING SEQUENCE: ; 0546 ! ; 0547 ! TT_NUMBER(Value); ; 0548 ! ; 0549 ! INPUT PARAMETERS: ; 0550 ! ; 0551 ! Value - Value to output. ; 0552 ! ; 0553 ! IMPLICIT INPUTS: ; 0554 ! ; 0555 ! None. ; 0556 ! ; 0557 ! OUPTUT PARAMETERS: ; 0558 ! ; 0559 ! None. ; 0560 ! ; 0561 ! IMPLICIT OUTPUTS: ; 0562 ! ; 0563 ! None. ; 0564 ! ; 0565 ! COMPLETION CODES: ; 0566 ! ; 0567 ! None. ; 0568 ! ; 0569 ! SIDE EFFECTS: ; 0570 ! ; 0571 ! None. ; 0572 ! ; 0573 !-- ; 0574 ; 0575 BEGIN ; 0576 ; 0577 IF .NUMBER LEQ 999 ; 0578 THEN ; 0579 BEGIN ; 0580 TT_CHAR ((.NUMBER/100) + %C'0'); ; 0581 TT_CHAR (((.NUMBER/10) MOD 10) + %C'0'); ; 0582 TT_CHAR ((.NUMBER MOD 10) + %C'0'); ; 0583 END; ; 0584 ; 0585 END; ! End of TT_NUMBER .ENTRY TT_NUMBER, ^M ;TT_NUMBER, Save R2 ; 0537 MOVAB W^U.1, R2 ;U.1, R2 ; CMPL 4(AP), #999 ;NUMBER, #999 ; 0577 BGTR 1$ ;1$ ; DIVL3 #100, 4(AP), R0 ;#100, NUMBER, R0 ; 0580 PUSHAB 48(R0) ;48(R0) ; CALLS #1, (R2) ;#1, TT_CHAR ; DIVL3 #10, 4(AP), R0 ;#10, NUMBER, R0 ; 0581 EMUL #1, R0, #0, -(SP) ;#1, R0, #0, -(SP) ; EDIV #10, (SP)+, R0, R0 ;#10, (SP)+, R0, R0 ; PUSHAB 48(R0) ;48(R0) ; CALLS #1, (R2) ;#1, TT_CHAR ; EMUL #1, 4(AP), #0, -(SP) ;#1, NUMBER, #0, -(SP) ; 0582 EDIV #10, (SP)+, R0, R0 ;#10, (SP)+, R0, R0 ; PUSHAB 48(R0) ;48(R0) ; CALLS #1, (R2) ;#1, TT_CHAR ; 1$: RET ; ; 0537 ; Routine Size: 71 bytes, Routine Base: $CODE$ + 004D ; 0586 ; 0587 %SBTTL 'Terminal routines -- TT_QCHAR - Output a single character' ; 0588 ; 0589 GLOBAL ROUTINE TT_QCHAR (CHARACTER) : NOVALUE = ; 0590 ; 0591 !++ ; 0592 ! FUNCTIONAL DESCRIPTION: ; 0593 ! ; 0594 ! This routine will output a quoted character to the terminal buffer. ; 0595 ! It will convert control characters to printing characters. ; 0596 ! ; 0597 ! CALLING SEQUENCE: ; 0598 ! ; 0599 ! TT_QCHAR(Character); ; 0600 ! ; 0601 ! INPUT PARAMETERS: ; 0602 ! ; 0603 ! Character - Character to store into the text buffer. ; 0604 ! ; 0605 ! IMPLICIT INPUTS: ; 0606 ! ; 0607 ! None. ; 0608 ! ; 0609 ! OUPTUT PARAMETERS: ; 0610 ! ; 0611 ! None. ; 0612 ! ; 0613 ! IMPLICIT OUTPUTS: ; 0614 ! ; 0615 ! None. ; 0616 ! ; 0617 ! COMPLETION CODES: ; 0618 ! ; 0619 ! None. ; 0620 ! ; 0621 ! SIDE EFFECTS: ; 0622 ! ; 0623 ! None. ; 0624 ! ; 0625 !-- ; 0626 ; 0627 BEGIN ; 0628 ; 0629 LOCAL ; 0630 TEMP_CHAR; ! Temp holding place for the characters ; 0631 ; 0632 ! ; 0633 ! Copy the character first ; 0634 ! ; 0635 TEMP_CHAR = .CHARACTER; ; 0636 ! ; 0637 ! Determine if this is a control character. If so then convert it to be ; 0638 ! a ^ ; 0639 ! ; 0640 ; 0641 IF .TEMP_CHAR LSS CHR_SP ; 0642 THEN ; 0643 BEGIN ; 0644 TT_CHAR (%C'^'); ; 0645 TEMP_CHAR = %C'A' - 1 + .TEMP_CHAR; ; 0646 END; ; 0647 ; 0648 ! ; 0649 ! Output the character after any conversion ; 0650 ! ; 0651 TT_CHAR (.TEMP_CHAR); ; 0652 ! ; 0653 END; ! End of TT_QCHAR .ENTRY TT_QCHAR, ^M ;TT_QCHAR, Save R2 ; 0589 MOVL 4(AP), R2 ;CHARACTER, TEMP_CHAR ; 0635 CMPL R2, #32 ;TEMP_CHAR, #32 ; 0641 BGEQ 1$ ;1$ ; MOVZBL #94, -(SP) ;#94, -(SP) ; 0644 CALLS #1, W^U.1 ;#1, U.1 ; MOVAB 64(R2), R2 ;64(R2), TEMP_CHAR ; 0645 1$: PUSHL R2 ;TEMP_CHAR ; 0651 CALLS #1, W^U.1 ;#1, U.1 ; RET ; ; 0589 ; Routine Size: 32 bytes, Routine Base: $CODE$ + 0094 ; 0654 ; 0655 %SBTTL 'Terminal routines -- TT_CHAR - Output a single character' ; 0656 ; 0657 GLOBAL ROUTINE TT_CHAR (CHARACTER) : NOVALUE = ; 0658 ; 0659 !++ ; 0660 ! FUNCTIONAL DESCRIPTION: ; 0661 ! ; 0662 ! This routine will store a character into the text buffer. It will ; 0663 ! cause the text to be output if the character is a line terminator. ; 0664 ! ; 0665 ! CALLING SEQUENCE: ; 0666 ! ; 0667 ! TT_CHAR(Character); ; 0668 ! ; 0669 ! INPUT PARAMETERS: ; 0670 ! ; 0671 ! Character - Character to store into the text buffer. ; 0672 ! ; 0673 ! IMPLICIT INPUTS: ; 0674 ! ; 0675 ! None. ; 0676 ! ; 0677 ! OUPTUT PARAMETERS: ; 0678 ! ; 0679 ! None. ; 0680 ! ; 0681 ! IMPLICIT OUTPUTS: ; 0682 ! ; 0683 ! None. ; 0684 ! ; 0685 ! COMPLETION CODES: ; 0686 ! ; 0687 ! None. ; 0688 ! ; 0689 ! SIDE EFFECTS: ; 0690 ! ; 0691 ! None. ; 0692 ! ; 0693 !-- ; 0694 ; 0695 BEGIN ; 0696 ! ; 0697 ! If this is a line feed then just output the text string and return ; 0698 ! ; 0699 ; 0700 IF .CHARACTER EQL CHR_LFD ; 0701 THEN ; 0702 TT_OUTPUT () ; 0703 ELSE ; 0704 BEGIN ; 0705 ! ; 0706 ! Increment the count of the characters ; 0707 ! ; 0708 TEXT_DESC [DSC$W_LENGTH] = .TEXT_DESC [DSC$W_LENGTH] + 1; ; 0709 ! ; 0710 ! And store the character ; 0711 ! ; 0712 CH$WCHAR_A (.CHARACTER, TEXT_POINTER); ; 0713 ; 0714 IF .TEXT_DESC [DSC$W_LENGTH] EQL TEXT_BFR_LENGTH THEN TT_OUTPUT (); ; 0715 ; 0716 END; ; 0717 ; 0718 ! ; 0719 END; ! End of TT_CHAR U.1: .ENTRY TT_CHAR, ^M<> ;TT_CHAR, Save nothing ; 0657 CMPL 4(AP), #10 ;CHARACTER, #10 ; 0700 BEQL 1$ ;1$ ; INCW W^U.5 ;U.5 ; 0708 MOVB 4(AP), @W^U.3 ;CHARACTER, @U.3 ; 0712 INCL W^U.3 ;U.3 ; CMPW W^U.5, #256 ;U.5, #256 ; 0714 BNEQ 2$ ;2$ ; 1$: CALLS #0, W^U.2 ;#0, U.2 ; 2$: RET ; ; 0657 ; Routine Size: 37 bytes, Routine Base: $CODE$ + 00B4 ; 0720 ; 0721 %SBTTL 'Terminal routines -- TT_CRLF - Output a CRLF' ; 0722 ; 0723 GLOBAL ROUTINE TT_CRLF : NOVALUE = ; 0724 ; 0725 !++ ; 0726 ! FUNCTIONAL DESCRIPTION: ; 0727 ! ; 0728 ! This routine will cause the contents of the terminal buffer to be ; 0729 ! output to SYS$OUTPUT:. ; 0730 ! ; 0731 ! CALLING SEQUENCE: ; 0732 ! ; 0733 ! TT_CRLF(); ; 0734 ! ; 0735 ! INPUT PARAMETERS: ; 0736 ! ; 0737 ! None. ; 0738 ! ; 0739 ! IMPLICIT INPUTS: ; 0740 ! ; 0741 ! None. ; 0742 ! ; 0743 ! OUPTUT PARAMETERS: ; 0744 ! ; 0745 ! None. ; 0746 ! ; 0747 ! IMPLICIT OUTPUTS: ; 0748 ! ; 0749 ! None. ; 0750 ! ; 0751 ! COMPLETION CODES: ; 0752 ! ; 0753 ! None. ; 0754 ! ; 0755 ! SIDE EFFECTS: ; 0756 ! ; 0757 ! None. ; 0758 ! ; 0759 !-- ; 0760 ; 0761 BEGIN ; 0762 TT_CHAR (CHR_LFD); ; 0763 END; ! End of TT_CRLF .ENTRY TT_CRLF, ^M<> ;TT_CRLF, Save nothing ; 0723 PUSHL #10 ;#10 ; 0762 CALLS #1, B^U.1 ;#1, U.1 ; RET ; ; 0723 ; Routine Size: 9 bytes, Routine Base: $CODE$ + 00D9 ; 0764 ; 0765 %SBTTL 'Terminal routines -- TT_OUTPUT - Output the buffer' ; 0766 ROUTINE TT_OUTPUT : NOVALUE = ; 0767 ; 0768 !++ ; 0769 ! FUNCTIONAL DESCRIPTION: ; 0770 ! ; 0771 ! This routine will dump the text buffer on the output device. ; 0772 ! ; 0773 ! CALLING SEQUENCE: ; 0774 ! ; 0775 ! TT_OUTPUT(); ; 0776 ! ; 0777 ! INPUT PARAMETERS: ; 0778 ! ; 0779 ! None. ; 0780 ! ; 0781 ! IMPLICIT INPUTS: ; 0782 ! ; 0783 ! None. ; 0784 ! ; 0785 ! OUPTUT PARAMETERS: ; 0786 ! ; 0787 ! None. ; 0788 ! ; 0789 ! IMPLICIT OUTPUTS: ; 0790 ! ; 0791 ! None. ; 0792 ! ; 0793 ! COMPLETION CODES: ; 0794 ! ; 0795 ! None. ; 0796 ! ; 0797 ! SIDE EFFECTS: ; 0798 ! ; 0799 ! None. ; 0800 ! ; 0801 !-- ; 0802 ; 0803 BEGIN ; 0804 ; 0805 LOCAL ; 0806 STATUS; ! Status returned by the library routine ; 0807 ; 0808 ! ; 0809 ! Output the text ; 0810 ! ; 0811 STATUS = LIB$PUT_OUTPUT (TEXT_DESC); ; 0812 ! ; 0813 ! Now reset the descriptor and the pointer to a virgin state ; 0814 ! ; 0815 TEXT_DESC [DSC$W_LENGTH] = 0; ; 0816 TEXT_POINTER = CH$PTR (TEXT_BUFFER); ; 0817 ! ; 0818 END; ! End of TT_OUTPUT ;TT_OUTPUT U.2: .WORD ^M<> ;Save nothing ; 0766 PUSHAB W^U.5 ;U.5 ; 0811 CALLS #1, G^LIB$PUT_OUTPUT ;#1, LIB$PUT_OUTPUT ; CLRW W^U.5 ;U.5 ; 0815 MOVAB W^U.4, W^U.3 ;U.4, U.3 ; 0816 RET ; ; 0766 ; Routine Size: 25 bytes, Routine Base: $CODE$ + 00E2 ; 0819 %SBTTL 'Communcations line -- TERM_OPEN' ; 0820 ; 0821 GLOBAL ROUTINE TERM_OPEN = ; 0822 ; 0823 !++ ; 0824 ! FUNCTIONAL DESCRIPTION: ; 0825 ! ; 0826 ! This routine will assign a channel that is used in the CONNECT ; 0827 ! processing and to send/receive a file from. ; 0828 ! ; 0829 ! CALLING SEQUENCE: ; 0830 ! ; 0831 ! TERM_OPEN(); ; 0832 ! ; 0833 ! INPUT PARAMETERS: ; 0834 ! ; 0835 ! None. ; 0836 ! ; 0837 ! IMPLICIT INPUTS: ; 0838 ! ; 0839 ! TERM_NAME - Vector of ASCII characters that represent the name of ; 0840 ! the terminal to use. ; 0841 ! ; 0842 ! OUTPUT PARAMETERS: ; 0843 ! ; 0844 ! None. ; 0845 ! ; 0846 ! IMPLICIT OUTPUTS: ; 0847 ! ; 0848 ! TERM_CHAN - Channel number of the terminal line we are using. ; 0849 ! ; 0850 ! COMPLETION CODES: ; 0851 ! ; 0852 ! SS$_NORMAL or error condition. ; 0853 ! ; 0854 ! SIDE EFFECTS: ; 0855 ! ; 0856 ! None. ; 0857 ! ; 0858 !-- ; 0859 ; 0860 BEGIN ; 0861 ; 0862 BIND ; 0863 SYS_OUTPUT = %ASCID'TT:'; ; 0864 ; 0865 LOCAL ; 0866 STATUS, ; 0867 OUTPUT_ITM : DVI_ITEM_LIST [2] FIELD (DVI_FIELDS), ; 0868 OUTPUT_NAME : VECTOR [65, BYTE], ; 0869 OUTPUT_LENGTH, ; 0870 OUTPUT_CLASS, ; 0871 OUTPUT_STATUS, ; 0872 TERM_ITM : DVI_ITEM_LIST [2] FIELD (DVI_FIELDS), ; 0873 TERM_NAME : VECTOR [65, BYTE], ; 0874 TERM_LENGTH, ; 0875 TERM_CLASS, ; 0876 TERM_STATUS; ; 0877 ; 0878 ! ; 0879 ! Initialize the first character to be an underscore, incase we have a ; 0880 ! concealed device name ; 0881 ! ; 0882 OUTPUT_NAME [0] = %C'_'; ; 0883 TERM_NAME [0] = %C'_'; ; 0884 ! ; 0885 ! Initialize the GETDVI call for the TT: ; 0886 ! ; 0887 OUTPUT_ITM [0, DVI_ITEM_CODE] = DVI$_DEVCLASS; ; 0888 OUTPUT_ITM [0, DVI_BFR_LENGTH] = 4; ; 0889 OUTPUT_ITM [0, DVI_BFR_ADDRESS] = OUTPUT_CLASS; ; 0890 OUTPUT_ITM [0, DVI_RTN_LENGTH] = 0; ; 0891 ! ; 0892 OUTPUT_ITM [1, DVI_ITEM_CODE] = DVI$_DEVNAM; ; 0893 OUTPUT_ITM [1, DVI_BFR_LENGTH] = 64; ; 0894 OUTPUT_ITM [1, DVI_BFR_ADDRESS] = OUTPUT_NAME [1]; ; 0895 OUTPUT_ITM [1, DVI_RTN_LENGTH] = OUTPUT_LENGTH; ; 0896 ! ; 0897 OUTPUT_ITM [2, DVI_ITEM_CODE] = 0; ; 0898 OUTPUT_ITM [2, DVI_BFR_LENGTH] = 0; ; 0899 ! ; 0900 ! Initialize the GETDVI call for the terminal name given ; 0901 ! ; 0902 TERM_ITM [0, DVI_ITEM_CODE] = DVI$_DEVCLASS; ; 0903 TERM_ITM [0, DVI_BFR_LENGTH] = 4; ; 0904 TERM_ITM [0, DVI_BFR_ADDRESS] = TERM_CLASS; ; 0905 TERM_ITM [0, DVI_RTN_LENGTH] = 0; ; 0906 ! ; 0907 TERM_ITM [1, DVI_ITEM_CODE] = DVI$_DEVNAM; ; 0908 TERM_ITM [1, DVI_BFR_LENGTH] = 64; ; 0909 TERM_ITM [1, DVI_BFR_ADDRESS] = TERM_NAME [1]; ; 0910 TERM_ITM [1, DVI_RTN_LENGTH] = TERM_LENGTH; ; 0911 ! ; 0912 TERM_ITM [2, DVI_ITEM_CODE] = 0; ; 0913 TERM_ITM [2, DVI_BFR_LENGTH] = 0; ; 0914 ! ; 0915 ! Get the device information ; 0916 ! ; 0917 OUTPUT_STATUS = $GETDVI (EFN = 2, DEVNAM = SYS_OUTPUT, ITMLST = OUTPUT_ITM); ; 0918 ; 0919 IF NOT .OUTPUT_STATUS ; 0920 THEN ; 0921 BEGIN ; 0922 LIB$SIGNAL (.OUTPUT_STATUS); ; 0923 RETURN .OUTPUT_STATUS; ; 0924 END; ; 0925 ; 0926 STATUS = $WAITFR (EFN = 2); ; 0927 ; 0928 IF NOT .STATUS ; 0929 THEN ; 0930 BEGIN ; 0931 LIB$SIGNAL (.STATUS); ; 0932 RETURN .STATUS; ; 0933 END; ; 0934 ; 0935 ! ; 0936 ! For both of the device names ; 0937 ! ; 0938 TERM_STATUS = $GETDVI (EFN = 2, DEVNAM = TERM_DESC, ITMLST = TERM_ITM); ; 0939 ; 0940 IF NOT .TERM_STATUS ; 0941 THEN ; 0942 BEGIN ; 0943 LIB$SIGNAL (.TERM_STATUS); ; 0944 RETURN .STATUS; ; 0945 END; ; 0946 ; 0947 STATUS = $WAITFR (EFN = 2); ; 0948 ; 0949 IF NOT .STATUS ; 0950 THEN ; 0951 BEGIN ; 0952 LIB$SIGNAL (.STATUS); ; 0953 RETURN .STATUS; ; 0954 END; ; 0955 ; 0956 ! ; 0957 ! Make sure that they are terminals ; 0958 ! ; 0959 ; 0960 IF .TERM_CLASS EQL DC$_TERM AND .OUTPUT_CLASS EQL DC$_TERM ; 0961 THEN ; 0962 BEGIN ; 0963 ; 0964 IF .OUTPUT_STATUS EQL SS$_CONCEALED ; 0965 THEN ; 0966 BEGIN ; 0967 OUTPUT_LENGTH = .OUTPUT_LENGTH + 1; ; 0968 OUTPUT_ITM [1, DVI_BFR_ADDRESS] = .OUTPUT_ITM [1, DVI_BFR_ADDRESS] - 1; ; 0969 END; ; 0970 ; 0971 IF .TERM_STATUS EQL SS$_CONCEALED ; 0972 THEN ; 0973 BEGIN ; 0974 TERM_LENGTH = .TERM_LENGTH + 1; ; 0975 TERM_ITM [1, DVI_BFR_ADDRESS] = .TERM_ITM [1, DVI_BFR_ADDRESS] - 1; ; 0976 END; ; 0977 ; 0978 IF CH$NEQ (.OUTPUT_LENGTH, CH$PTR (.OUTPUT_ITM [1, DVI_BFR_ADDRESS]), .TERM_LENGTH, ; 0979 CH$PTR (.TERM_ITM [1, DVI_BFR_ADDRESS]), CHR_NUL) ; 0980 THEN ; 0981 CONNECT_FLAG = FALSE ; 0982 ELSE ; 0983 CONNECT_FLAG = TRUE; ; 0984 ; 0985 END ; 0986 ELSE ; 0987 BEGIN ; 0988 RETURN KER_LINTERM; ; 0989 END; ; 0990 ; 0991 STATUS = $ASSIGN (DEVNAM = TERM_DESC, CHAN = TERM_CHAN); ; 0992 ; 0993 IF NOT .STATUS ; 0994 THEN ; 0995 BEGIN ; 0996 LIB$SIGNAL (.STATUS); ; 0997 RETURN .STATUS; ; 0998 END; ; 0999 ; 1000 STATUS = $QIOW (CHAN = .TERM_CHAN, FUNC = IO$_SENSEMODE, P1 = OLD_TERM_CHAR, P2 = TC$_CHAR_LENGTH, IOSB = OLD_P ; 1001 ; 1002 IF NOT .STATUS ; 1003 THEN ; 1004 BEGIN ; 1005 LIB$SIGNAL (.STATUS); ; 1006 RETURN .STATUS; ; 1007 END; ; 1008 ; 1009 NEW_TERM_CHAR [TC$_BFR_SIZE] = .OLD_TERM_CHAR [TC$_BFR_SIZE]; ; 1010 NEW_TERM_CHAR [TC$_TYPE] = .OLD_TERM_CHAR [TC$_TYPE]; ; 1011 NEW_TERM_CHAR [TC$_CLASS] = .OLD_TERM_CHAR [TC$_CLASS]; ; 1012 NEW_TERM_CHAR [TC$_PAGE_LEN] = .OLD_TERM_CHAR [TC$_PAGE_LEN]; ; 1013 NEW_TERM_CHAR [TC$_CHAR] = (.OLD_TERM_CHAR [TC$_CHAR] OR TT$M_EIGHTBIT OR TT$M_NOBRDCST) AND NOT ( ; 1014 TT$M_CRFILL OR TT$M_LFFILL OR TT$M_WRAP); ; 1015 NEW_TERM_CHAR [TC$_CHAR_2] = .OLD_TERM_CHAR [TC$_CHAR_2]; ; 1016 ; 1017 STATUS = $QIOW (CHAN = .TERM_CHAN, FUNC = IO$_SETMODE, P1 = NEW_TERM_CHAR, P2 = TC$_CHAR_LENGTH, P5 = TT$M_ALTR ; 1018 ; 1019 IF NOT .STATUS ; 1020 THEN ; 1021 BEGIN ; 1022 LIB$SIGNAL (.STATUS); ; 1023 RETURN .STATUS; ; 1024 END; ; 1025 ; 1026 TERM_FLAG = TRUE; ! Terminal now open ; 1027 RETURN KER_NORMAL; ; 1028 END; ! End of TERM_OPEN .PSECT $PLIT$,NOWRT,NOEXE,2 P.AAC: .ASCII \TT:\<0> ; ; P.AAB: .LONG 17694723 ; ; .ADDRESS P.AAC ; ; U.17= P.AAB .EXTRN SYS$GETDVI, SYS$WAITFR, SYS$ASSIGN, SYS$QIOW .PSECT $CODE$,NOWRT,2 .ENTRY TERM_OPEN, ^M ; ; MOVAB G^SYS$QIOW, R9 ;SYS$QIOW, R9 ; MOVAB G^SYS$WAITFR, R8 ;SYS$WAITFR, R8 ; MOVAB G^LIB$SIGNAL, R7 ;LIB$SIGNAL, R7 ; MOVAB G^SYS$GETDVI, R6 ;SYS$GETDVI, R6 ; MOVAB W^U.6, R5 ;U.6, R5 ; MOVAB -224(SP), SP ;-224(SP), SP ; MOVB #95, 120(SP) ;#95, OUTPUT_NAME ; 0882 MOVB #95, 16(SP) ;#95, TERM_NAME ; 0883 MOVL #262148, -36(FP) ;#262148, OUTPUT_ITM ; 0888 MOVAB 12(SP), -32(FP) ;OUTPUT_CLASS, OUTPUT_ITM+4 ; 0889 CLRL -28(FP) ;OUTPUT_ITM+8 ; 0890 MOVL #2097216, -24(FP) ;#2097216, OUTPUT_ITM+12 ; 0893 MOVAB 121(SP), -20(FP) ;OUTPUT_NAME+1, OUTPUT_ITM+16 ; 0894 MOVAB 8(SP), -16(FP) ;OUTPUT_LENGTH, OUTPUT_ITM+20 ; 0895 CLRL -12(FP) ;OUTPUT_ITM+24 ; 0898 MOVL #262148, 84(SP) ;#262148, TERM_ITM ; 0903 MOVAB 4(SP), 88(SP) ;TERM_CLASS, TERM_ITM+4 ; 0904 CLRL 92(SP) ;TERM_ITM+8 ; 0905 MOVL #2097216, 96(SP) ;#2097216, TERM_ITM+12 ; 0908 MOVAB 17(SP), 100(SP) ;TERM_NAME+1, TERM_ITM+16 ; 0909 MOVAB (SP), 104(SP) ;TERM_LENGTH, TERM_ITM+20 ; 0910 CLRL 108(SP) ;TERM_ITM+24 ; 0913 CLRQ -(SP) ;-(SP) ; 0917 CLRQ -(SP) ;-(SP) ; PUSHAB -36(FP) ;OUTPUT_ITM ; PUSHAB W^U.17 ;U.17 ; MOVQ #2, -(SP) ;#2, -(SP) ; CALLS #8, (R6) ;#8, SYS$GETDVI ; MOVL R0, R2 ;R0, OUTPUT_STATUS ; BLBS R2, 1$ ;OUTPUT_STATUS, 1$ ; 0919 PUSHL R2 ;OUTPUT_STATUS ; 0922 CALLS #1, (R7) ;#1, LIB$SIGNAL ; MOVL R2, R0 ;OUTPUT_STATUS, R0 ; 0921 RET ; ; 1$: PUSHL #2 ;#2 ; 0926 CALLS #1, (R8) ;#1, SYS$WAITFR ; MOVL R0, R4 ;R0, STATUS ; BLBC R4, 3$ ;STATUS, 3$ ; 0928 CLRQ -(SP) ;-(SP) ; 0938 CLRQ -(SP) ;-(SP) ; PUSHAB 100(SP) ;TERM_ITM ; PUSHAB W^TERM_DESC ;TERM_DESC ; MOVQ #2, -(SP) ;#2, -(SP) ; CALLS #8, (R6) ;#8, SYS$GETDVI ; MOVL R0, R3 ;R0, TERM_STATUS ; BLBS R3, 2$ ;TERM_STATUS, 2$ ; 0940 PUSHL R3 ;TERM_STATUS ; 0943 BRW 11$ ;11$ ; 2$: PUSHL #2 ;#2 ; 0947 CALLS #1, (R8) ;#1, SYS$WAITFR ; MOVL R0, R4 ;R0, STATUS ; 3$: BLBC R4, 9$ ;STATUS, 9$ ; 0949 CMPL 4(SP), #66 ;TERM_CLASS, #66 ; 0960 BNEQ 7$ ;7$ ; CMPL 12(SP), #66 ;OUTPUT_CLASS, #66 ; BNEQ 7$ ;7$ ; CMPL R2, #1681 ;OUTPUT_STATUS, #1681 ; 0964 BNEQ 4$ ;4$ ; INCL 8(SP) ;OUTPUT_LENGTH ; 0967 DECL -20(FP) ;OUTPUT_ITM+16 ; 0968 4$: CMPL R3, #1681 ;TERM_STATUS, #1681 ; 0971 BNEQ 5$ ;5$ ; INCL (SP) ;TERM_LENGTH ; 0974 DECL 100(SP) ;TERM_ITM+16 ; 0975 5$: CMPC5 8(SP), @-20(FP), #0, (SP), @100(SP) ;OUTPUT_LENGTH, @OUTPUT_ITM+16, #0, TERM_LENGTH, @TERM_ITM+16 ; 0978 BEQL 6$ ;6$ ; CLRL W^CONNECT_FLAG ;CONNECT_FLAG ; 0981 BRB 8$ ;8$ ; 0978 6$: MOVL #1, W^CONNECT_FLAG ;#1, CONNECT_FLAG ; 0983 BRB 8$ ;8$ ; 0960 7$: MOVL #134316210, R0 ;#134316210, R0 ; 0987 RET ; ; 8$: CLRQ -(SP) ;-(SP) ; 0991 PUSHL R5 ;R5 ; PUSHAB W^TERM_DESC ;TERM_DESC ; CALLS #4, G^SYS$ASSIGN ;#4, SYS$ASSIGN ; MOVL R0, R4 ;R0, STATUS ; 9$: BLBC R4, 10$ ;STATUS, 10$ ; 0993 CLRQ -(SP) ;-(SP) ; 1000 CLRQ -(SP) ;-(SP) ; PUSHL #12 ;#12 ; PUSHAB 12(R5) ;OLD_TERM_CHAR ; CLRQ -(SP) ;-(SP) ; PUSHAB 4(R5) ;OLD_PARITY ; PUSHL #39 ;#39 ; PUSHL (R5) ;TERM_CHAN ; CLRL -(SP) ;-(SP) ; CALLS #12, (R9) ;#12, SYS$QIOW ; MOVL R0, R4 ;R0, STATUS ; BLBC R4, 10$ ;STATUS, 10$ ; 1002 MOVL 12(R5), 24(R5) ;OLD_TERM_CHAR, NEW_TERM_CHAR ; 1011 MOVB 19(R5), 31(R5) ;OLD_TERM_CHAR+7, NEW_TERM_CHAR+7 ; 1012 EXTZV #0, #24, 16(R5), R0 ;#0, #24, OLD_TERM_CHAR+4, R0 ; 0860 INSV #0, #9, #3, R0 ;#0, #9, #3, R0 ; BISL3 #163840, R0, R1 ;#163840, R0, R1 ; 1013 INSV R1, #0, #24, 28(R5) ;R1, #0, #24, NEW_TERM_CHAR+4 ; MOVL 20(R5), 32(R5) ;OLD_TERM_CHAR+8, NEW_TERM_CHAR+8 ; 1015 MOVQ #32, -(SP) ;#32, -(SP) ; 1017 CLRQ -(SP) ;-(SP) ; PUSHL #12 ;#12 ; PUSHAB 24(R5) ;NEW_TERM_CHAR ; CLRQ -(SP) ;-(SP) ; MOVQ #35, -(SP) ;#35, -(SP) ; PUSHL (R5) ;TERM_CHAN ; CLRL -(SP) ;-(SP) ; CALLS #12, (R9) ;#12, SYS$QIOW ; MOVL R0, R4 ;R0, STATUS ; BLBS R4, 12$ ;STATUS, 12$ ; 1019 10$: PUSHL R4 ;STATUS ; 1022 11$: CALLS #1, (R7) ;#1, LIB$SIGNAL ; MOVL R4, R0 ;STATUS, R0 ; 1021 RET ; ; 12$: MOVL #1, W^TERM_FLAG ;#1, TERM_FLAG ; 1026 MOVL #134316043, R0 ;#134316043, R0 ; 0860 RET ; ; 0821 ; Routine Size: 426 bytes, Routine Base: $CODE$ + 00FB ; 1029 ; 1030 %SBTTL 'Communications line -- TERM_CLOSE' ; 1031 ; 1032 GLOBAL ROUTINE TERM_CLOSE = ; 1033 ; 1034 !++ ; 1035 ! FUNCTIONAL DESCRIPTION: ; 1036 ! ; 1037 ! This routine will deassign the channel that was assigned by ; 1038 ! TERM_OPEN. ; 1039 ! ; 1040 ! CALLING SEQUENCE: ; 1041 ! ; 1042 ! TERM_CLOSE(); ; 1043 ! ; 1044 ! INPUT PARAMETERS: ; 1045 ! ; 1046 ! None. ; 1047 ! ; 1048 ! IMPLICIT INPUTS: ; 1049 ! ; 1050 ! TERM_CHAN - Channel number to deassign. ; 1051 ! ; 1052 ! OUTPUT PARAMETERS: ; 1053 ! ; 1054 ! None. ; 1055 ! ; 1056 ! IMPLICIT OUTPUTS: ; 1057 ! ; 1058 ! None. ; 1059 ! ; 1060 ! COMPLETION CODES: ; 1061 ! ; 1062 ! SS$_NORMAL or error condition. ; 1063 ! ; 1064 ! SIDE EFFECTS: ; 1065 ! ; 1066 ! None. ; 1067 ! ; 1068 !-- ; 1069 ; 1070 BEGIN ; 1071 ; 1072 LOCAL ; 1073 PAR, ! Parity being set ; 1074 STATUS; ! Status returned by system service ; 1075 ; 1076 CONNECT_FLAG = FALSE; ; 1077 ; 1078 PAR = .OLD_PARITY [1, 8, 8, 0] OR TT$M_ALTRPAR; ; 1079 ; 1080 STATUS = $QIOW (CHAN = .TERM_CHAN, FUNC = IO$_SETMODE, P1 = OLD_TERM_CHAR, P2 = TC$_CHAR_LENGTH, P5 = .PAR); ; 1081 ; 1082 IF NOT .STATUS ; 1083 THEN ; 1084 BEGIN ; 1085 LIB$SIGNAL (.STATUS); ; 1086 RETURN .STATUS; ; 1087 END; ; 1088 ; 1089 STATUS = $DASSGN (CHAN = .TERM_CHAN); ; 1090 ; 1091 IF .STATUS ; 1092 THEN ; 1093 BEGIN ; 1094 TERM_FLAG = FALSE; ; 1095 RETURN KER_NORMAL ; 1096 END ; 1097 ELSE ; 1098 BEGIN ; 1099 LIB$SIGNAL (.STATUS); ; 1100 RETURN .STATUS; ; 1101 END; ; 1102 ; 1103 END; ! End of TERM_CLOSE .EXTRN SYS$DASSGN .ENTRY TERM_CLOSE, ^M ;TERM_CLOSE, Save R2,R3 ; 1032 MOVAB W^U.6, R3 ;U.6, R3 ; CLRL W^CONNECT_FLAG ;CONNECT_FLAG ; 1076 MOVZBL 6(R3), R0 ;OLD_PARITY+2, PAR ; 1078 BISL2 #32, R0 ;#32, PAR ; CLRL -(SP) ;-(SP) ; 1080 PUSHL R0 ;PAR ; CLRQ -(SP) ;-(SP) ; PUSHL #12 ;#12 ; PUSHAB 12(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 ; BLBC R2, 1$ ;STATUS, 1$ ; 1082 PUSHL (R3) ;TERM_CHAN ; 1089 CALLS #1, G^SYS$DASSGN ;#1, SYS$DASSGN ; MOVL R0, R2 ;R0, STATUS ; BLBC R2, 1$ ;STATUS, 1$ ; 1091 CLRL W^TERM_FLAG ;TERM_FLAG ; 1094 MOVL #134316043, R0 ;#134316043, R0 ; 1070 RET ; ; 1$: PUSHL R2 ;STATUS ; 1099 CALLS #1, G^LIB$SIGNAL ;#1, LIB$SIGNAL ; MOVL R2, R0 ;STATUS, R0 ; 1070 RET ; ; 1032 ; Routine Size: 91 bytes, Routine Base: $CODE$ + 02A5 ; 1104 ; 1105 %SBTTL 'Communications line -- SEND' ; 1106 ; 1107 GLOBAL ROUTINE SEND (ADDRESS, LENGTH) = ; 1108 ; 1109 !++ ; 1110 ! FUNCTIONAL DESCRIPTION: ; 1111 ! ; 1112 ! This routine will send a stream of 8-bit bytes over the terminal ; 1113 ! line to the remote KERMIT. This routine is called from KERMSG. ; 1114 ! ; 1115 ! CALLING SEQUENCE: ; 1116 ! ; 1117 ! SEND(Address-of-msg, Length-of-msg); ; 1118 ! ; 1119 ! INPUT PARAMETERS: ; 1120 ! ; 1121 ! None. ; 1122 ! ; 1123 ! IMPLICIT INPUTS: ; 1124 ! ; 1125 ! TERM_CHAN - Channel number to deassign. ; 1126 ! ; 1127 ! OUTPUT PARAMETERS: ; 1128 ! ; 1129 ! None. ; 1130 ! ; 1131 ! IMPLICIT OUTPUTS: ; 1132 ! ; 1133 ! None. ; 1134 ! ; 1135 ! COMPLETION CODES: ; 1136 ! ; 1137 ! SS$_NORMAL or error condition. ; 1138 ! ; 1139 ! SIDE EFFECTS: ; 1140 ! ; 1141 ! None. ; 1142 ! ; 1143 !-- ; 1144 ; 1145 BEGIN ; 1146 ; 1147 LOCAL ; 1148 STATUS; ! Status returned by $QIOW ; 1149 ; 1150 STATUS = $QIOW (CHAN = .TERM_CHAN, FUNC = IO$_WRITEVBLK + IO$M_NOFORMAT, P1 = .ADDRESS, P2 = .LENGTH); ; 1151 ; 1152 IF .STATUS EQL SS$_NORMAL ; 1153 THEN ; 1154 RETURN KER_NORMAL ; 1155 ELSE ; 1156 BEGIN ; 1157 LIB$SIGNAL (.STATUS); ; 1158 RETURN .STATUS; ; 1159 END; ; 1160 ; 1161 END; ! End of SEND .ENTRY SEND, ^M ;SEND, Save R2 ; 1107 CLRQ -(SP) ;-(SP) ; 1150 CLRQ -(SP) ;-(SP) ; MOVQ 4(AP), -(SP) ;ADDRESS, -(SP) ; CLRQ -(SP) ;-(SP) ; CLRL -(SP) ;-(SP) ; MOVZWL #304, -(SP) ;#304, -(SP) ; PUSHL W^U.6 ;U.6 ; CLRL -(SP) ;-(SP) ; CALLS #12, G^SYS$QIOW ;#12, SYS$QIOW ; MOVL R0, R2 ;R0, STATUS ; CMPL R2, #1 ;STATUS, #1 ; 1152 BNEQ 1$ ;1$ ; MOVL #134316043, R0 ;#134316043, R0 ; 1145 RET ; ; 1$: PUSHL R2 ;STATUS ; 1157 CALLS #1, G^LIB$SIGNAL ;#1, LIB$SIGNAL ; MOVL R2, R0 ;STATUS, R0 ; 1145 RET ; ; 1107 ; Routine Size: 61 bytes, Routine Base: $CODE$ + 0300 ; 1162 ; 1163 %SBTTL 'Communications line -- RECEIVE' ; 1164 ; 1165 GLOBAL ROUTINE RECEIVE (ADDRESS, LENGTH) = ; 1166 ; 1167 !++ ; 1168 ! FUNCTIONAL DESCRIPTION: ; 1169 ! ; 1170 ! This routine will receive a stream of 8-bit bytes over the terminal ; 1171 ! line to the remote KERMIT. This routine is called from KERMSG. ; 1172 ! The text that is stored will always contain the control-A as the ; 1173 ! first character. ; 1174 ! ; 1175 ! CALLING SEQUENCE: ; 1176 ! ; 1177 ! RECEIVE(Address-of-msg); ; 1178 ! ; 1179 ! INPUT PARAMETERS: ; 1180 ! ; 1181 ! None. ; 1182 ! ; 1183 ! IMPLICIT INPUTS: ; 1184 ! ; 1185 ! TERM_CHAN - Channel number to deassign. ; 1186 ! ; 1187 ! OUTPUT PARAMETERS: ; 1188 ! ; 1189 ! None. ; 1190 ! ; 1191 ! IMPLICIT OUTPUTS: ; 1192 ! ; 1193 ! None. ; 1194 ! ; 1195 ! COMPLETION CODES: ; 1196 ! ; 1197 ! SS$_NORMAL or error condition. ; 1198 ! ; 1199 ! SIDE EFFECTS: ; 1200 ! ; 1201 ! None. ; 1202 ! ; 1203 !-- ; 1204 ; 1205 BEGIN ; 1206 ; 1207 LOCAL ; 1208 TERMINATOR : VECTOR [2, LONG], ; 1209 IO_STATUS : VECTOR [4, WORD], ; 1210 POINTER, ! Pointer into the message ; 1211 STATUS; ! Status returned by $QIO ; 1212 ; 1213 TERMINATOR [0] = 0; ; 1214 TERMINATOR [1] = 1^.RCV_EOL; ; P 1215 STATUS = $QIOW (CHAN = .TERM_CHAN, FUNC = IO$_TTYREADALL + IO$M_NOECHO, IOSB = IO_STATUS, P1 = .ADDRESS, ; 1216 P2 = MAX_MSG, P3 = .RCV_TIMEOUT, P4 = TERMINATOR); ; 1217 .LENGTH = .IO_STATUS [1] + 1; ; 1218 ; 1219 POINTER = CH$FIND_CH(.IO_STATUS [1] + 1, CH$PTR(.ADDRESS, 0, CHR_SIZE), CHR_CTL_Y); ; 1220 IF CH$FAIL(POINTER) THEN RETURN KER_ABORTED; ; 1221 ; 1222 IF .STATUS EQL SS$_TIMEOUT THEN RETURN KER_TIMEOUT; ; 1223 ; 1224 IF .STATUS EQL SS$_NORMAL THEN RETURN KER_NORMAL; ; 1225 ! LIB$SIGNAL(KER_RECERR, .STATUS); ; 1226 RETURN KER_RECERR; ; 1227 ; 1228 END; ! End of RECEIVE .ENTRY RECEIVE, ^M ;RECEIVE, Save R2 ; 1165 SUBL2 #20, SP ;#20, SP ; CLRL 12(SP) ;TERMINATOR ; 1213 ASHL W^RCV_EOL, #1, 16(SP) ;RCV_EOL, #1, TERMINATOR+4 ; 1214 CLRQ -(SP) ;-(SP) ; 1216 PUSHAB 20(SP) ;TERMINATOR ; PUSHL W^RCV_TIMEOUT ;RCV_TIMEOUT ; MOVZBL #96, -(SP) ;#96, -(SP) ; PUSHL 4(AP) ;ADDRESS ; CLRQ -(SP) ;-(SP) ; PUSHAB 36(SP) ;IO_STATUS ; MOVZBL #122, -(SP) ;#122, -(SP) ; PUSHL W^U.6 ;U.6 ; CLRL -(SP) ;-(SP) ; CALLS #12, G^SYS$QIOW ;#12, SYS$QIOW ; MOVL R0, R2 ;R0, STATUS ; MOVZWL 6(SP), R0 ;IO_STATUS+2, R0 ; 1217 INCL R0 ;R0 ; MOVL R0, @8(AP) ;R0, @LENGTH ; LOCC #25, R0, @4(AP) ;#25, R0, @ADDRESS ; 1219 BNEQ 1$ ;1$ ; CLRL R1 ;R1 ; 1$: MOVL R1, (SP) ;R1, POINTER ; MOVAB (SP), R0 ;POINTER, R0 ; 1220 BNEQ 2$ ;2$ ; MOVL #134316226, R0 ;#134316226, R0 ; RET ; ; 2$: CMPL R2, #556 ;STATUS, #556 ; 1222 BNEQ 3$ ;3$ ; MOVL #134316216, R0 ;#134316216, R0 ; RET ; ; 3$: CMPL R2, #1 ;STATUS, #1 ; 1224 BNEQ 4$ ;4$ ; MOVL #134316043, R0 ;#134316043, R0 ; RET ; ; 4$: MOVL #134316234, R0 ;#134316234, R0 ; 1205 RET ; ; 1165 ; Routine Size: 129 bytes, Routine Base: $CODE$ + 033D ; 1229 ; 1230 %SBTTL 'End of KERTRM' ; 1231 END ! End of module ; 1232 ; 1233 ELUDOM ; PSECT SUMMARY ; ; Name Bytes Attributes ; ; $OWN$ 304 NOVEC, WRT, RD ,NOEXE,NOSHR, LCL, REL, CON,NOPIC,ALIGN(2) ; $GLOBAL$ 4 NOVEC, WRT, RD ,NOEXE,NOSHR, LCL, REL, CON,NOPIC,ALIGN(2) ; $PLIT$ 24 NOVEC,NOWRT, RD ,NOEXE,NOSHR, LCL, REL, CON,NOPIC,ALIGN(2) ; $CODE$ 958 NOVEC,NOWRT, RD , EXE,NOSHR, LCL, REL, CON,NOPIC,ALIGN(2) ; LIBRARY STATISTICS ; ; -------- Symbols -------- Blocks ; File Total Loaded Percent Read ; ; SYS$SYSROOT:[SYSLIB]STARLET.L32;1 5809 33 0 234 ; COMMAND QUALIFIERS ; BLISS KERTRM/LIST=KERTRM.MAR/MACHINE_CODE=(ASSEM,NOBINARY,UNIQUE)/NOOBJECT/SOURCE=NOHEADER ; Compilation Complete .END