************************************************** 1) DK1:[330,2]FDT.MAC;110 382 caifeb r3,#'S,pcess.,opensl ;open for char string 383 TST OPNADR ;IS LOCATION OPEN? *************** 2) DK1:[330,2]FDT.VAC;1 382 TST OPNADR ;IS LOCATION OPEN? ************************************************** 1) DK1:[330,2]FDT.MAC;110 676 br 10$ 677 opensl: 678 mov #8.,dsptyp ;8 => open as char string 679 10$: *************** 2) DK1:[330,2]FDT.VAC;1 675 10$: ************************************************** 1) DK1:[330,2]FDT.MAC;110 688 BGE 1$ ;YES. 689 cmp #8.,dsptyp ;if char string we allow 690 ;opening of next byte if not 691 ;an array 692 bne 20$ 693 1$: 694 CALL MODIF. ;MODIFY IF REQUESTED 695 MOV OPNADR,R0 ;GET OPEN ADDRESS 696 tst opneln 697 bge 5$ 698 inc r0 ;if not an array it's a 699 ;char string -- inc open 700 ;adr to display next char 701 br 6$ 702 5$: 703 ADD TABL+T.LEN,R0 ;ADVANCE TO NEXT 704 INC OPNELN 705 6$: 706 MAPVRT ;DO VIRTUAL MAPPING *************** 2) DK1:[330,2]FDT.VAC;1 684 BLT 20$ ;NO. 685 CALL MODIF. ;MODIFY IF REQUESTED 686 MOV OPNADR,R0 ;GET OPEN ADDRESS 687 ADD TABL+T.LEN,R0 ;ADVANCE TO NEXT 688 INC OPNELN 689 MAPVRT ;DO VIRTUAL MAPPING ************************************************** 1) DK1:[330,2]FDT.MAC;110 731 ;insert test for variable 732 ;type -- if a string variable and 733 ;display by type is requested or 734 ;if a ;S was specified we QIO to the 735 ;terminal the string -- the length of 736 ; the string defaults to 1 if it is not 737 ; an array or if ;S is specified without 738 ;(n:m) 739 cmp #8.,dsptyp ;is it a string var 740 bne 41$ ;no 741 52$: 742 tst tefdk3 ;tefdk3 ne 0 => an(n:m) 743 ;was specified -- we write 744 ;(n:m) -- tefdk3 has addr 745 ;of n (in ASCII) 746 beq 53$ 747 types ,<'('> 748 mov tefdk3,r1 749 call .types 750 53$: 751 types ,<'='> 752 call flush. 753 mov opnadr,r0 754 call strdsp ;call string display routine 755 br 42$ 756 41$: 757 types ,<'='> 758 mov opnadr,r0 759 call dspvar 760 types ,<' '> 761 42$: 762 return 763 ; subroutine to display a string variable 764 ; it is straight forward and does not use the tables set 765 ; up for the other type variables 766 code 767 strdsp: 768 savall 769 ;at this point we have the following 770 ;situations: 771 ; 1) display entire string -- 772 ; obtaining length from 773 ; TABL + T.LEN 774 ; 2) display substring 775 ; a)tefdk1 -- offset of substring 776 ; to display 777 ; b) tefdk2 -- # of chars to display 778 ; if tefdk1 ne 0 => display substring 779 ; = 0 => display entire string 780 ; taking length from t.len 781 ;will not check substring bounds -- 782 ;may be illegal 783 ; 784 ;r0 contains open address 785 ;substring is really a subset of string 786 clr qiostr+q.iopl 787 mov #80.,r2 788 tst tefdk2 ;the number of chars to output 789 ble 3$ ;no substring specified -- 790 ;take # from TABL + T.LEN 791 mov tefdk2,r1 792 mov tefdk1,qiostr+q.iopl 793 br 4$ 794 3$: 795 mov tabl+t.len,r1 796 4$: 797 add r0,qiostr+q.iopl ;add opnadr to offset 798 11$: 799 cmp #80.,r1 ;output 80 chars at a time 800 ble 12$ 801 mov r1,r2 802 12$: 803 mov r2,qiostr+q.iopl+2 804 dir$ #qiostr 805 sub #80.,r1 806 ble 110$ 807 add #80.,qiostr+q.iopl 808 br 11$ 809 110$: return 810 .DSABL LSB *************** 2) DK1:[330,2]FDT.VAC;1 714 TYPES ,<' = '> 715 MOV OPNADR,R0 ;GET ADDRESS 716 CALL DSPVAR ;DISPLAY VARIABLE. 717 TYPES ,<' '> 718 RETURN 719 .DSABL LSB ************************************************** 1) DK1:[330,2]FDT.MAC;110 853 opens: 854 clr tefdk1 ;these must be cleared before a 855 clr tefdk2 ; string var 856 clr tefdk3 ;is opened 857 mov #8.,dsptyp 858 ; 859 ;at this point BOL is in R0 860 ;length is in R2 861 mov r0,-(sp) 862 mov r1,-(sp) 863 mov r2,-(sp) 864 mov r0,r1 ;get BOL 865 add r2,r1 ;add length to get EOL 866 62$: cmpb #'),-(r1) 867 beq 63$ 868 sob r2,62$ 869 br 65$ ;no ")" specified 870 63$: 871 73$: 872 cmpb #'(,-(r1) ;did we fine a ( before a : 873 beq 65$ ; yes => that we do not have 874 ; a substring specified 875 cmpb #':,(r1) ; found a colon 876 beq 64$ 877 sob r2,73$ 878 inc errflg 879 br 65$ 880 ; unless specified incorrectly 881 64$: ;routine to convert(n:n) to a starting addr 882 ; and a length -- R1 has the location of : 883 ; at this point 884 ;$CDTB requires input in R0 885 ; returns the # in R1 886 ; returns the terminator in R2 887 mov r1,r0 888 66$: cmpb #'(,-(r0) 889 beq 67$ 890 sob r2,66$ 891 inc errflg 892 br 65$ 893 67$: ;found the ( 894 mov r0,tefdk3 895 inc tefdk3 896 ;at this point r0 points to the ( 897 ;we will clear this location and 898 ;make the new eol + 1 point to this 899 clrb (r0) 900 mov r0,2(sp) ;move the new eol + 1 into the saved r1 901 mov r2,(sp) ;r2 has the new line length 902 ;we move it onto the stack into 903 ;saved r2 position 904 inc r0 ;we have cleared the ( and now we increment 905 ;past the binary 0 906 call $cdtb ;convert number 907 cmpb #':,r2 ;do we have the proper terminator 908 beq 70$ 909 inc errflg 910 br 65$ 911 70$: 912 dec r1 913 mov r1,tefdk1 914 call $cdtb 915 cmpb #'),r2 916 beq 71$ 917 inc errflg 918 br 65$ 919 71$: 920 mov r1,tefdk2 921 sub tefdk1,tefdk2 922 ;tefdk1 and tefdk2 have at this point the 923 ;substring information for printing out 924 ;a substring of the specified string 925 65$: 926 mov (sp)+,r2 927 mov (sp)+,r1 928 mov (sp)+,r0 929 tst errflg 930 beq 110$ 931 jmp error. 932 110$: 933 return 934 $RESTR: *************** 2) DK1:[330,2]FDT.VAC;1 762 $RESTR: ************************************************** 1) DK1:[330,2]FDT.MAC;110 1074 cmp #8.,dsptyp ;char string? 1075 bne 11$ ;no 1076 mov opnadr,r2 1077 add tefdk1,r2 ;add offset into string -- (n:m);s 1078 12$: 1079 movb (r0)+,(r2)+ 1080 tstb (r0) 1081 bne 12$ 1082 br 30$ 1083 11$: 1084 MOV #DSPBUF,R2 ;MOVE INPUT TO DISPLAY BUFFER *************** 2) DK1:[330,2]FDT.VAC;1 902 MOV #DSPBUF,R2 ;MOVE INPUT TO DISPLAY BUFFER ************************************************** 1) DK1:[330,2]FDT.MAC;110 1332 clr errflg 1333 TYPES BOL,'\\',EOL ;TYPE ERROR *************** 2) DK1:[330,2]FDT.VAC;1 1150 TYPES BOL,'\\',EOL ;TYPE ERROR ************************************************** 1) DK1:[330,2]FDT.MAC;110 1484 qiostr: qiow$ io.wvb,5,.fdtfg,,,,<0,0,0> 1485 OPQIO: QIOW$ IO.WLB!TF.CCO,,.FDTFG,,,, *************** 2) DK1:[330,2]FDT.VAC;1 1301 OPQIO: QIOW$ IO.WLB!TF.CCO,,.FDTFG,,,, ************************************************** 1) DK1:[330,2]FDT.MAC;110 1590 cmpb #'(,(r0) ;need this check in case 1591 ;a substr (n:m) is specified 1592 beq 20$ 1593 CMPB #':,(R0)+ *************** 2) DK1:[330,2]FDT.VAC;1 1406 CMPB #':,(R0)+ ************************************************** 1) DK1:[330,2]FDT.MAC;110 1678 clr opneln ;clear this since it's 1679 ;now used in a test 1680 MOV R1,R4 *************** 2) DK1:[330,2]FDT.VAC;1 1491 MOV R1,R4 ************************************************** 1) DK1:[330,2]FDT.MAC;110 1683 135$: 1684 TST #EOV-BOV ;IS OVERLAYED? *************** 2) DK1:[330,2]FDT.VAC;1 1494 TST #EOV-BOV ;IS OVERLAYED? ************************************************** 1) DK1:[330,2]FDT.MAC;110 1690 133$: 1691 5$: 1692 MOV ROTTAB+R.ARYD,R2 1693 MOV #TABL,R3 1694 CALL GETNM. 1695 BCC 121$ 1696 MOV ROTTAB+R.VARD,R2 1697 mov #-1,opneln 1698 CALL GETNM. *************** 2) DK1:[330,2]FDT.VAC;1 1500 5$: 1501 MOV ROTTAB+R.VARD,R2 1502 MOV #TABL,R3 1503 MOV #-1,OPNELN 1504 CALL GETNM. 1505 BCC 10$ 1506 MOV ROTTAB+R.ARYD,R2 1507 CALL GETNM. ************************************************** 1) DK1:[330,2]FDT.MAC;110 1704 121$: 1705 cmp #8.,dsptyp 1706 beq 23$ 1707 cmpb #5,tabl+t.typ 1708 bne 123$ 1709 23$: 1710 mov 6(sp),r2 1711 call opens 1712 123$: 1713 tst opneln 1714 blt 10$ 1715 CALL GETAEL ;GET ARRAY ELEMENT NUMBER *************** 2) DK1:[330,2]FDT.VAC;1 1513 CALL GETAEL ;GET ARRAY ELEMENT NUMBER ************************************************** 1) DK1:[330,2]FDT.MAC;110 1870 tefdk1: .word 0 1871 tefdk2: .word 0 1872 tefdk3: .word 0 1873 errflg: .word 0 1874 LOCADR: .WORD 0 ;CODE LOCATION ADDRESS *************** 2) DK1:[330,2]FDT.VAC;1 1668 LOCADR: .WORD 0 ;CODE LOCATION ADDRESS 14 differences found FDT.CMP=FDT.MAC,FDT.VAC