; 0001 0 MODULE KERTT (IDENT = '2.0.004' ; 0002 0 ) = ; 0003 1 BEGIN ; 0004 1 ; 0005 1 SWITCHES LANGUAGE (COMMON); ; 0006 1 ; 0007 1 ! ; 0008 1 ; 0009 1 !++ ; 0010 1 ! FACILITY: ; 0011 1 ! ; 0012 1 ! KERMIT text processing ; 0013 1 ! ; 0014 1 ! ABSTRACT: ; 0015 1 ! ; 0016 1 ! This module contains all of the text processing required for ; 0017 1 ! KERMSG. ; 0018 1 ! ; 0019 1 ! ENVIRONMENT: ; 0020 1 ! ; 0021 1 ! TOPS-10, P/OS, VAX/VMS ; 0022 1 ! ; 0023 1 ! AUTHOR: Robert C. McQueen, CREATION DATE: 29-August-1983 ; 0024 1 !-- ; 0025 1 ; 0026 1 %SBTTL 'Table of Contents' ; 0027 1 ! ; 0028 1 ! TABLE OF CONTENTS: ; 0029 1 ! ; 0030 1 %SBTTL 'Revision History' ; 0031 1 ; 0032 1 !++ ; 0033 1 ! ; 0034 1 ! Create this module for PRO/Kermit 1.0, Kermit-10 2(100) and Kermit-32 1.2 ; 0035 1 ! ; 0036 1 ! 1.2.000 By: Robert C. McQueen On: 29-August-1983 ; 0037 1 ! Create this module. ; 0038 1 ! ; 0039 1 ! 1.2.001 By: Robert C. McQueen On: 9-Sept-1983 ; 0040 1 ! Make the string passed to TERM_DUMP a counted ASCIZ string, ; 0041 1 ! not a counted ASCII string. ; 0042 1 ! ; 0043 1 ! 1.2.002 By: Robert C. McQueen On: 16-September-1983 ; 0044 1 ! Make TT_OUTPUT a global routine, so we can force information ; 0045 1 ! output a various points in time. ; 0046 1 ! ; 0047 1 ! 2.0.003 Release for TOPS-10 KERMIT-10 version 2. ; 0048 1 ! Release for VAX/VMS KERMIT-32 version 2. ; 0049 1 ! ; 0050 1 ! 2.0.004 By: Nick Bush On: 22-December-1983 ; 0051 1 ! Add TT_HOLD to indicate that output should not be dumped ; 0052 1 ! when LF's are seen, only when buffer is full. ; 0053 1 !-- ; 0054 1 ; 0055 1 %SBTTL 'Library files' ; 0056 1 ! ; 0057 1 ! INCLUDE FILES: ; 0058 1 ! ; 0059 1 ! ; 0060 1 ! KERMIT common definitions ; 0061 1 ! ; 0062 1 ; 0063 1 REQUIRE 'KERCOM'; ; 0268 1 ; 0269 1 %SBTTL 'Symbol definitions' ; 0270 1 ! ; 0271 1 ! EQUATED SYMBOLS: ; 0272 1 ! ; 0273 1 ; 0274 1 LITERAL ; 0275 1 TEXT_BFR_LENGTH = 256; ! Length of the text buffer ; 0276 1 ; 0277 1 %SBTTL 'Storage' ; 0278 1 ! ; 0279 1 ! OWN STORAGE: ; 0280 1 ! ; 0281 1 ! ; 0282 1 ! TT_xxxxx routine storage ; 0283 1 ! ; 0284 1 ; 0285 1 OWN ; 0286 1 HOLD_FLAG, ! Output should be held even if CRLF seen ; 0287 1 DUMP_ROUTINE, ! Address of routine to dump text ; 0288 1 TEXT_COUNT, ! Count of the characters ; 0289 1 TEXT_POINTER, ! Pointer to store characters ; 0290 1 TEXT_BUFFER : VECTOR [CH$ALLOCATION (TEXT_BFR_LENGTH)]; ! Buffer of characters ; 0291 1 ; 0292 1 %SBTTL 'External storage' ; 0293 1 ; 0294 1 !++ ; 0295 1 ! The following is the various external storage locations that are ; 0296 1 ! referenced from this module. ; 0297 1 !-- ; 0298 1 ; 0299 1 ! ; 0300 1 ! KERMSG storage ; 0301 1 ! ; 0302 1 ; 0303 1 EXTERNAL ; 0304 1 CONNECT_FLAG; ! Flag if communications line is TT: ; 0305 1 ; 0306 1 !++ ; 0307 1 ! The following is the only external routine used by this module. This ; 0308 1 ! routine will cause the terminal buffer that we have been building to be ; 0309 1 ! output on the terminal ; 0310 1 !-- ; 0311 1 ; 0312 1 EXTERNAL ROUTINE ; 0313 1 TERM_DUMP : NOVALUE; ! Output the terminal buffer ; 0314 1 ; 0315 1 %SBTTL 'Terminal routines -- TT_INIT - Initialize this module' ; 0316 1 ; 0317 1 GLOBAL ROUTINE TT_INIT : NOVALUE = ; 0318 1 ; 0319 1 !++ ; 0320 1 ! FUNCTIONAL DESCRIPTION: ; 0321 1 ! ; 0322 1 ! This routine will initialize the terminal processing module. It will ; 0323 1 ! initialize the various data locations in this module. ; 0324 1 ! ; 0325 1 ! CALLING SEQUENCE: ; 0326 1 ! ; 0327 1 ! TT_INIT(); ; 0328 1 ! ; 0329 1 ! INPUT PARAMETERS: ; 0330 1 ! ; 0331 1 ! None. ; 0332 1 ! ; 0333 1 ! IMPLICIT INPUTS: ; 0334 1 ! ; 0335 1 ! None. ; 0336 1 ! ; 0337 1 ! OUTPUT PARAMETERS: ; 0338 1 ! ; 0339 1 ! None. ; 0340 1 ! ; 0341 1 ! IMPLICIT OUTPUTS: ; 0342 1 ! ; 0343 1 ! None. ; 0344 1 ! ; 0345 1 ! COMPLETION CODES: ; 0346 1 ! ; 0347 1 ! None. ; 0348 1 ! ; 0349 1 ! SIDE EFFECTS: ; 0350 1 ! ; 0351 1 ! None. ; 0352 1 ! ; 0353 1 !-- ; 0354 1 ; 0355 2 BEGIN ; 0356 2 ! ; 0357 2 ! Now initialize the various pointers ; 0358 2 ! ; 0359 2 TEXT_COUNT = 0; ; 0360 2 TEXT_POINTER = CH$PTR (TEXT_BUFFER); ; 0361 2 DUMP_ROUTINE = TERM_DUMP; ! Initial output routine is to terminal ; 0362 2 HOLD_FLAG = FALSE; ! Dump output on CRLF's ; 0363 1 END; ! End of TT_INIT .TITLE KERTT .IDENT \2.0.004\ .PSECT $OWN$,NOEXE,2 ;HOLD_FLAG U.1: .BLKB 4 ;DUMP_ROUTINE U.2: .BLKB 4 ;TEXT_COUNT U.3: .BLKB 4 ;TEXT_POINTER U.4: .BLKB 4 ;TEXT_BUFFER U.5: .BLKB 256 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 .EXTRN CONNECT_FLAG, TERM_DUMP .PSECT $CODE$,NOWRT,2 .ENTRY TT_INIT, ^M ;TT_INIT, Save R2 ; 0317 MOVAB W^U.3, R2 ;U.3, R2 ; CLRL (R2) ;TEXT_COUNT ; 0359 MOVAB 8(R2), 4(R2) ;TEXT_BUFFER, TEXT_POINTER ; 0360 MOVAB W^TERM_DUMP, -4(R2) ;TERM_DUMP, DUMP_ROUTINE ; 0361 CLRL -8(R2) ;HOLD_FLAG ; 0362 RET ; ; 0363 ; Routine Size: 24 bytes, Routine Base: $CODE$ + 0000 ; 0364 1 ; 0365 1 %SBTTL 'TT_SET_OUTPUT - Set output routine to use' ; 0366 1 ; 0367 1 GLOBAL ROUTINE TT_SET_OUTPUT (OUT_RTN) = ; 0368 1 ; 0369 1 !++ ; 0370 1 ! FUNCTIONAL DESCRIPTION: ; 0371 1 ! ; 0372 1 ! This routine will set the output routine to use for the TT_xxx routines. ; 0373 1 !The argument is a routine address which will output a counted ASCIZ string. ; 0374 1 !It will return the address of the previous output routine. ; 0375 1 ! ; 0376 1 ! CALLING SEQUENCE: ; 0377 1 ! ; 0378 1 ! OLD_RTN = TT_SET_OUTPUT (OUT_RTN); ; 0379 1 ! ; 0380 1 ! INPUT PARAMETERS: ; 0381 1 ! ; 0382 1 ! OUT_RTN - Address of routine to output a counted ASCIZ string ; 0383 1 ! called as OUT_RTN (Address of string, length of string) ; 0384 1 ! ; 0385 1 ! IMPLICIT INPUTS: ; 0386 1 ! ; 0387 1 ! DUMP_ROUTINE - Previous output routine ; 0388 1 ! ; 0389 1 ! OUPTUT PARAMETERS: ; 0390 1 ! ; 0391 1 ! The value of the routine is the previous output routine address. ; 0392 1 ! ; 0393 1 ! IMPLICIT OUTPUTS: ; 0394 1 ! ; 0395 1 ! DUMP_ROUTINE - New output routine ; 0396 1 ! ; 0397 1 ! COMPLETION CODES: ; 0398 1 ! ; 0399 1 ! None. ; 0400 1 ! ; 0401 1 ! SIDE EFFECTS: ; 0402 1 ! ; 0403 1 ! None. ; 0404 1 ! ; 0405 1 !-- ; 0406 1 ; 0407 2 BEGIN ; 0408 2 ; 0409 2 LOCAL ; 0410 2 OLD_RTN; ! Old routine address ; 0411 2 ; 0412 2 OLD_RTN = .DUMP_ROUTINE; ! Remember the old address ; 0413 2 DUMP_ROUTINE = .OUT_RTN; ! Save the new ; 0414 2 RETURN .OLD_RTN; ! And return the old value ; 0415 1 END; ! End of TT_SET_OUTPUT .ENTRY TT_SET_OUTPUT, ^M<> ;TT_SET_OUTPUT, Save nothing ; 0367 MOVL W^U.2, R0 ;U.2, OLD_RTN ; 0412 MOVL 4(AP), W^U.2 ;OUT_RTN, U.2 ; 0413 RET ; ; 0415 ; Routine Size: 14 bytes, Routine Base: $CODE$ + 0018 ; 0416 1 ; 0417 1 %SBTTL 'TT_HOLD - Start holding text until TT_OUTPUT call' ; 0418 1 ; 0419 1 GLOBAL ROUTINE TT_HOLD (FLAG) : NOVALUE = ; 0420 1 ; 0421 1 !++ ; 0422 1 ! FUNCTIONAL DESCRIPTION: ; 0423 1 ! ; 0424 1 ! This routine is called to start buffering an amount of data ; 0425 1 ! which should not be output until TT_OUTPUT is called. It ; 0426 1 ! sets a flag to indicate that output should not be done on ; 0427 1 ! CRLF's. ; 0428 1 ! ; 0429 1 ! CALLING SEQUENCE: ; 0430 1 ! ; 0431 1 ! TT_HOLD (TRUE or FALSE); ; 0432 1 ! ; 0433 1 ! INPUT PARAMETERS: ; 0434 1 ! ; 0435 1 ! FLAG - True if output should be held past LF's. False if output ; 0436 1 ! should be dumped on each LF. ; 0437 1 ! ; 0438 1 ! IMPLICIT INPUTS: ; 0439 1 ! ; 0440 1 ! None. ; 0441 1 ! ; 0442 1 ! OUPTUT PARAMETERS: ; 0443 1 ! ; 0444 1 ! None. ; 0445 1 ! ; 0446 1 ! IMPLICIT OUTPUTS: ; 0447 1 ! ; 0448 1 ! HOLD_FLAG is set to true. ; 0449 1 ! ; 0450 1 ! COMPLETION CODES: ; 0451 1 ! ; 0452 1 ! None. ; 0453 1 ! ; 0454 1 ! SIDE EFFECTS: ; 0455 1 ! ; 0456 1 ! None. ; 0457 1 ! ; 0458 1 !-- ; 0459 1 ; 0460 2 BEGIN ; 0461 2 HOLD_FLAG = .FLAG; ; 0462 1 END; ! End of TT_HOLD .ENTRY TT_HOLD, ^M<> ;TT_HOLD, Save nothing ; 0419 MOVL 4(AP), W^U.1 ;FLAG, U.1 ; 0461 RET ; ; 0462 ; Routine Size: 9 bytes, Routine Base: $CODE$ + 0026 ; 0463 1 ; 0464 1 %SBTTL 'Terminal routines -- TT_OUTPUT - Output the buffer' ; 0465 1 ; 0466 1 GLOBAL ROUTINE TT_OUTPUT : NOVALUE = ; 0467 1 ; 0468 1 !++ ; 0469 1 ! FUNCTIONAL DESCRIPTION: ; 0470 1 ! ; 0471 1 ! This routine will dump the text buffer on the output device. ; 0472 1 ! ; 0473 1 ! CALLING SEQUENCE: ; 0474 1 ! ; 0475 1 ! TT_OUTPUT(); ; 0476 1 ! ; 0477 1 ! INPUT PARAMETERS: ; 0478 1 ! ; 0479 1 ! None. ; 0480 1 ! ; 0481 1 ! IMPLICIT INPUTS: ; 0482 1 ! ; 0483 1 ! None. ; 0484 1 ! ; 0485 1 ! OUTPUT PARAMETERS: ; 0486 1 ! ; 0487 1 ! None. ; 0488 1 ! ; 0489 1 ! IMPLICIT OUTPUTS: ; 0490 1 ! ; 0491 1 ! None. ; 0492 1 ! ; 0493 1 ! COMPLETION CODES: ; 0494 1 ! ; 0495 1 ! None. ; 0496 1 ! ; 0497 1 ! SIDE EFFECTS: ; 0498 1 ! ; 0499 1 ! None. ; 0500 1 ! ; 0501 1 !-- ; 0502 1 ; 0503 2 BEGIN ; 0504 2 ; 0505 2 LOCAL ; 0506 2 STATUS; ! Status returned by the library routine ; 0507 2 ; 0508 2 ! ; 0509 2 ! Output the text ; 0510 2 ! ; 0511 2 CH$WCHAR_A (CHR_NUL, TEXT_POINTER); ; 0512 2 (.DUMP_ROUTINE) (TEXT_BUFFER, .TEXT_COUNT); ! Output the buffer to the correct place ; 0513 2 ! ; 0514 2 ! Now reset the descriptor and the pointer to a virgin state ; 0515 2 ! ; 0516 2 TEXT_COUNT = 0; ; 0517 2 TEXT_POINTER = CH$PTR (TEXT_BUFFER); ; 0518 2 ! ; 0519 1 END; ! End of TT_OUTPUT .ENTRY TT_OUTPUT, ^M ;TT_OUTPUT, Save R2 ; 0466 MOVAB W^U.4, R2 ;U.4, R2 ; CLRB @0(R2) ;@TEXT_POINTER ; 0511 INCL (R2) ;TEXT_POINTER ; PUSHL -4(R2) ;TEXT_COUNT ; 0512 PUSHAB 4(R2) ;TEXT_BUFFER ; CALLS #2, @-8(R2) ;#2, @DUMP_ROUTINE ; CLRL -4(R2) ;TEXT_COUNT ; 0516 MOVAB 4(R2), (R2) ;TEXT_BUFFER, TEXT_POINTER ; 0517 RET ; ; 0519 ; Routine Size: 30 bytes, Routine Base: $CODE$ + 002F ; 0520 1 ; 0521 1 %SBTTL 'Terminal routines -- TT_CHAR - Output a single character' ; 0522 1 ; 0523 1 GLOBAL ROUTINE TT_CHAR (CHARACTER) : NOVALUE = ; 0524 1 ; 0525 1 !++ ; 0526 1 ! FUNCTIONAL DESCRIPTION: ; 0527 1 ! ; 0528 1 ! This routine will store a character into the text buffer. It will ; 0529 1 ! cause the text to be output if the character is a line terminator. ; 0530 1 ! ; 0531 1 ! CALLING SEQUENCE: ; 0532 1 ! ; 0533 1 ! TT_CHAR(Character); ; 0534 1 ! ; 0535 1 ! INPUT PARAMETERS: ; 0536 1 ! ; 0537 1 ! Character - Character to store into the text buffer. ; 0538 1 ! ; 0539 1 ! IMPLICIT INPUTS: ; 0540 1 ! ; 0541 1 ! None. ; 0542 1 ! ; 0543 1 ! OUTPUT PARAMETERS: ; 0544 1 ! ; 0545 1 ! None. ; 0546 1 ! ; 0547 1 ! IMPLICIT OUTPUTS: ; 0548 1 ! ; 0549 1 ! None. ; 0550 1 ! ; 0551 1 ! COMPLETION CODES: ; 0552 1 ! ; 0553 1 ! None. ; 0554 1 ! ; 0555 1 ! SIDE EFFECTS: ; 0556 1 ! ; 0557 1 ! None. ; 0558 1 ! ; 0559 1 !-- ; 0560 1 ; 0561 2 BEGIN ; 0562 2 ! ; 0563 2 ! Increment the count of the characters ; 0564 2 ! ; 0565 2 TEXT_COUNT = .TEXT_COUNT + 1; ; 0566 2 ! ; 0567 2 ! And store the character ; 0568 2 ! ; 0569 2 CH$WCHAR_A (.CHARACTER, TEXT_POINTER); ; 0570 2 ! ; 0571 2 ! If this is a line feed then just output the text string ; 0572 2 ! ; 0573 2 ; 0574 2 IF (.CHARACTER EQL CHR_LFD) AND NOT .HOLD_FLAG THEN TT_OUTPUT (); ; 0575 2 ; 0576 2 ! ; 0577 2 ! Check to make sure we are not exceeding the limit of the buffer ; 0578 2 ! ; 0579 2 ; 0580 2 IF .TEXT_COUNT EQL TEXT_BFR_LENGTH - 1 THEN TT_OUTPUT (); ; 0581 2 ; 0582 2 ! ; 0583 1 END; ! End of TT_CHAR .ENTRY TT_CHAR, ^M ;TT_CHAR, Save R2 ; 0523 MOVAB W^U.3, R2 ;U.3, R2 ; INCL (R2) ;TEXT_COUNT ; 0565 MOVB 4(AP), @4(R2) ;CHARACTER, @TEXT_POINTER ; 0569 INCL 4(R2) ;TEXT_POINTER ; CMPL 4(AP), #10 ;CHARACTER, #10 ; 0574 BNEQ 1$ ;1$ ; BLBS -8(R2), 1$ ;HOLD_FLAG, 1$ ; CALLS #0, B^TT_OUTPUT ;#0, TT_OUTPUT ; 1$: CMPL (R2), #255 ;TEXT_COUNT, #255 ; 0580 BNEQ 2$ ;2$ ; CALLS #0, B^TT_OUTPUT ;#0, TT_OUTPUT ; 2$: RET ; ; 0583 ; Routine Size: 45 bytes, Routine Base: $CODE$ + 004D ; 0584 1 ; 0585 1 %SBTTL 'Terminal routines -- TT_TEXT - Output a text string' ; 0586 1 ; 0587 1 GLOBAL ROUTINE TT_TEXT (ADDRESS) : NOVALUE = ; 0588 1 ; 0589 1 !++ ; 0590 1 ! FUNCTIONAL DESCRIPTION: ; 0591 1 ! ; 0592 1 ! This routine will output text on the user's terminal. It will ; 0593 1 ! assume that it must check to determine if it can output the text ; 0594 1 ! or not. ; 0595 1 ! ; 0596 1 ! CALLING SEQUENCE: ; 0597 1 ! ; 0598 1 ! TT_TEXT(TEXT_ADDRESS); ; 0599 1 ! ; 0600 1 ! INPUT PARAMETERS: ; 0601 1 ! ; 0602 1 ! None. ; 0603 1 ! ; 0604 1 ! IMPLICIT INPUTS: ; 0605 1 ! ; 0606 1 ! None. ; 0607 1 ! ; 0608 1 ! OUTPUT PARAMETERS: ; 0609 1 ! ; 0610 1 ! None. ; 0611 1 ! ; 0612 1 ! IMPLICIT OUTPUTS: ; 0613 1 ! ; 0614 1 ! None. ; 0615 1 ! ; 0616 1 ! COMPLETION CODES: ; 0617 1 ! ; 0618 1 ! None. ; 0619 1 ! ; 0620 1 ! SIDE EFFECTS: ; 0621 1 ! ; 0622 1 ! None. ; 0623 1 ! ; 0624 1 !-- ; 0625 1 ; 0626 2 BEGIN ; 0627 2 ; 0628 2 LOCAL ; 0629 2 CHARACTER, ! Character being processed ; 0630 2 ARG_POINTER; ! Pointer to the argument's text ; 0631 2 ; 0632 2 ! ; 0633 2 ! Construct a pointer to the argument. ; 0634 2 ! ; 0635 2 ARG_POINTER = CH$PTR (.ADDRESS); ; 0636 2 ! ; 0637 2 ! Get the first character that was passed. ; 0638 2 ! ; 0639 2 CHARACTER = CH$RCHAR_A (ARG_POINTER); ; 0640 2 ! ; 0641 2 ! Loop reading characters and calling the output routine to process ; 0642 2 ! them ; 0643 2 ! ; 0644 2 ; 0645 2 WHILE .CHARACTER NEQ CHR_NUL DO ; 0646 3 BEGIN ; 0647 3 TT_CHAR (.CHARACTER); ; 0648 3 CHARACTER = CH$RCHAR_A (ARG_POINTER); ; 0649 2 END; ; 0650 2 ; 0651 1 END; ! End of TT_TEXT .ENTRY TT_TEXT, ^M ;TT_TEXT, Save R2,R3 ; 0587 MOVL 4(AP), R2 ;ADDRESS, ARG_POINTER ; 0635 1$: MOVZBL (R2)+, R3 ;(ARG_POINTER)+, CHARACTER ; 0639 BEQL 2$ ;2$ ; 0645 PUSHL R3 ;CHARACTER ; 0647 CALLS #1, B^TT_CHAR ;#1, TT_CHAR ; BRB 1$ ;1$ ; 0648 2$: RET ; ; 0651 ; Routine Size: 20 bytes, Routine Base: $CODE$ + 007A ; 0652 1 ; 0653 1 %SBTTL 'Terminal routines -- TT_NUMBER - Output a three digit number' ; 0654 1 ; 0655 1 GLOBAL ROUTINE TT_NUMBER (NUMBER) : NOVALUE = ; 0656 1 ; 0657 1 !++ ; 0658 1 ! FUNCTIONAL DESCRIPTION: ; 0659 1 ! ; 0660 1 ! This routine will store a three digit number into the text buffer. ; 0661 1 ! It will just return if the number is greater than 999. ; 0662 1 ! ; 0663 1 ! CALLING SEQUENCE: ; 0664 1 ! ; 0665 1 ! TT_NUMBER(Value); ; 0666 1 ! ; 0667 1 ! INPUT PARAMETERS: ; 0668 1 ! ; 0669 1 ! Value - Value to output. ; 0670 1 ! ; 0671 1 ! IMPLICIT INPUTS: ; 0672 1 ! ; 0673 1 ! None. ; 0674 1 ! ; 0675 1 ! OUTPUT PARAMETERS: ; 0676 1 ! ; 0677 1 ! None. ; 0678 1 ! ; 0679 1 ! IMPLICIT OUTPUTS: ; 0680 1 ! ; 0681 1 ! None. ; 0682 1 ! ; 0683 1 ! COMPLETION CODES: ; 0684 1 ! ; 0685 1 ! None. ; 0686 1 ! ; 0687 1 ! SIDE EFFECTS: ; 0688 1 ! ; 0689 1 ! None. ; 0690 1 ! ; 0691 1 !-- ; 0692 1 ; 0693 2 BEGIN ; 0694 2 ROUTINE TT_NUM_WORKER (VALUE) : NOVALUE = ; 0695 3 BEGIN ; 0696 3 ; 0697 3 IF .VALUE LEQ 9 ; 0698 3 THEN ; 0699 3 TT_CHAR (.VALUE + %C'0') ; 0700 3 ELSE ; 0701 4 BEGIN ; 0702 4 TT_NUM_WORKER (.VALUE/10); ; 0703 4 TT_CHAR ((.VALUE MOD 10) + %C'0'); ; 0704 3 END; ; 0705 3 ; 0706 2 END; ;TT_NUM_WORKER U.13: .WORD ^M<> ;Save nothing ; 0694 CMPL 4(AP), #9 ;VALUE, #9 ; 0697 BGTR 1$ ;1$ ; ADDL3 #48, 4(AP), -(SP) ;#48, VALUE, -(SP) ; 0699 BRB 2$ ;2$ ; 1$: DIVL3 #10, 4(AP), -(SP) ;#10, VALUE, -(SP) ; 0702 CALLS #1, B^U.13 ;#1, U.13 ; EMUL #1, 4(AP), #0, -(SP) ;#1, VALUE, #0, -(SP) ; 0703 EDIV #10, (SP)+, R0, R0 ;#10, (SP)+, R0, R0 ; PUSHAB 48(R0) ;48(R0) ; 2$: CALLS #1, B^TT_CHAR ;#1, TT_CHAR ; RET ; ; 0706 ; Routine Size: 43 bytes, Routine Base: $CODE$ + 008E ; 0707 2 ; 0708 2 IF .NUMBER LSS 0 ; 0709 2 THEN ; 0710 3 BEGIN ; 0711 3 TT_CHAR (%C'-'); ; 0712 3 NUMBER = -.NUMBER; ; 0713 2 END; ; 0714 2 ; 0715 2 TT_NUM_WORKER (.NUMBER); ; 0716 1 END; ! End of TT_NUMBER .ENTRY TT_NUMBER, ^M<> ;TT_NUMBER, Save nothing ; 0655 TSTL 4(AP) ;NUMBER ; 0708 BGEQ 1$ ;1$ ; PUSHL #45 ;#45 ; 0711 CALLS #1, B^TT_CHAR ;#1, TT_CHAR ; MNEGL 4(AP), 4(AP) ;NUMBER, NUMBER ; 0712 1$: PUSHL 4(AP) ;NUMBER ; 0715 CALLS #1, B^U.13 ;#1, U.13 ; RET ; ; 0716 ; Routine Size: 26 bytes, Routine Base: $CODE$ + 00B9 ; 0717 1 ; 0718 1 %SBTTL 'Terminal routines -- TT_CRLF - Output a CRLF' ; 0719 1 ; 0720 1 GLOBAL ROUTINE TT_CRLF : NOVALUE = ; 0721 1 ; 0722 1 !++ ; 0723 1 ! FUNCTIONAL DESCRIPTION: ; 0724 1 ! ; 0725 1 ! This routine will cause the contents of the terminal buffer to be ; 0726 1 ! output to SYS$OUTPUT:. ; 0727 1 ! ; 0728 1 ! CALLING SEQUENCE: ; 0729 1 ! ; 0730 1 ! TT_CRLF(); ; 0731 1 ! ; 0732 1 ! INPUT PARAMETERS: ; 0733 1 ! ; 0734 1 ! None. ; 0735 1 ! ; 0736 1 ! IMPLICIT INPUTS: ; 0737 1 ! ; 0738 1 ! None. ; 0739 1 ! ; 0740 1 ! OUTPUT PARAMETERS: ; 0741 1 ! ; 0742 1 ! None. ; 0743 1 ! ; 0744 1 ! IMPLICIT OUTPUTS: ; 0745 1 ! ; 0746 1 ! None. ; 0747 1 ! ; 0748 1 ! COMPLETION CODES: ; 0749 1 ! ; 0750 1 ! None. ; 0751 1 ! ; 0752 1 ! SIDE EFFECTS: ; 0753 1 ! ; 0754 1 ! None. ; 0755 1 ! ; 0756 1 !-- ; 0757 1 ; 0758 2 BEGIN ; 0759 2 TT_CHAR (CHR_CRT); ; 0760 2 TT_CHAR (CHR_LFD); ; 0761 1 END; ! End of TT_CRLF .ENTRY TT_CRLF, ^M<> ;TT_CRLF, Save nothing ; 0720 PUSHL #13 ;#13 ; 0759 CALLS #1, W^TT_CHAR ;#1, TT_CHAR ; PUSHL #10 ;#10 ; 0760 CALLS #1, W^TT_CHAR ;#1, TT_CHAR ; RET ; ; 0761 ; Routine Size: 17 bytes, Routine Base: $CODE$ + 00D3 ; 0762 1 ; 0763 1 %SBTTL 'End of KERTRM' ; 0764 1 END ! End of module ; 0765 1 ; 0766 0 ELUDOM ; PSECT SUMMARY ; ; Name Bytes Attributes ; ; $OWN$ 272 NOVEC, WRT, RD ,NOEXE,NOSHR, LCL, REL, CON,NOPIC,ALIGN(2) ; $CODE$ 228 NOVEC,NOWRT, RD , EXE,NOSHR, LCL, REL, CON,NOPIC,ALIGN(2) ; . ABS . 0 NOVEC,NOWRT,NORD ,NOEXE,NOSHR, LCL, ABS, CON,NOPIC,ALIGN(0) ; COMMAND QUALIFIERS ; BLISS KERTT/LIST=KERTT.MAR/MACHINE_CODE=(ASSEM,NOBINARY,UNIQUE)/NOOBJECT/SOURCE=NOHEADER ; Compilation Complete .END