.TITLE KEYWORD .LIBRARY "CLD" .ENTRY KEYWORD,^M $ENTDEF ; ; GET THE KEYWORD LIST NAME AND WRITE THE DEFINE TYPE RECORD OR ; JUST RETURN THE NAME SO IT CAN BE USED IN THE TYPE= CHARACTERISTIC ; ; CALL KEYWORD(ENTITY,FLAG,KEYLIST,LEN) ; WHERE ENTITY = THE ADDRESS OF THE ENTITY DESCRIPTOR ; FLAG = 0, DO NOT WRITE THE DEFINE TYPE RECORD ; = 1, WRITE THE DEFINE TYPE RECORD ; KEYLIST= KEYWORD LIST NAME (ONLY IF FLAG=0) ; LEN = LENGTH OF KEYWORD LIST NAME (ONLY IF FLAG=0) ; MOVL 4(AP),R7 MOVZWL ENT_W_KEYWORDS(R7),R9 BNEQ 10$ BRW FINI ; ; USE THE KEYWORD TABLE TO FIND THE NAME TO USE FOR THE KEYWORD LIST ; RECUR BUILDS THIS TABLE TO PREVENT DUPLICATE LIST NAMES AND TO ; PREVENT MULTIPLE DEFINITIONS OF THE SAME LIST ; KEYWORD TABLE FORMAT: ; LONGWORD 1 KEYWORD LIST ADDRESS ; LONGWORD 2 ADDRESS OF COUNTED ASCII QUAL/PARM NAME STRING ; LONGWORD 3 KLUGE CHARACTER ADDED TO THE END OF THE ; KEYWORD NAME STRING FOR CASES OF THE SAME ; NAMED QUALIFIER/PARAM HAVING DIFFERENT KEYWORD ; LISTS ; 10$: CVTWL R9,R9 ADDL R7,R9 ;R9=ADDRESS OF KEYWORD LIST MOVAL TABKEY,R10 ;R10=CURRENT KEYWORD TABLE POSITION MOVL KEYNUM,R11 ;R11=NUMBER OF KEYWORD LISTS REMAINING ; 20$: CMPL R9,(R10)+ ;COMPARE KEYWORD LIST ADDRESSES BEQL 30$ ;BRANCH IF ENTRY FOUND TSTL (R10)+ TSTL (R10)+ SOBGTR R11,20$ ;LOOP THROUGH TABLE ; 30$: MOVL (R10),R9 TSTL 8(AP) ;WRITE DEFINE TYPE RECORD? BEQL NOWRIT ;BRANCH IF NO WRITE ; ; FILL IN ALL THE ASCII JUNK AND WRITE THE DEFINE TYPE RECORD ; MOVAL DEFNAM,R11 MOVAL DEFKEY,R8 MOVC3 VERBLEN,VERB,(R11) ADDL VERBLEN,R11 MOVB UNDER,(R11)+ MOVZBL (R9)+,R6 MOVC3 R6,(R9),(R11) ADDL R6,R11 CMPL #^X30,4(R10) ;SEE IF KLUGE CHAR IS NEEDED BEQL 40$ MOVB 4(R10),(R11)+ 40$: MOVC3 #9,KWORDS,(R11) ADDL #9,R11 SUBL3 R8,R11,R6 $RAB_STORE RAB=OUTRAB,RBF=(R8),RSZ=R6 $PUT RAB=OUTRAB RET ; ; RETURN THE KEYWORD LIST NAME AND ITS LENGTH TO THE CALLER ; NOWRIT: MOVZBL (R9)+,@16(AP) ;LENGTH MOVC3 @16(AP),(R9),@12(AP) CMPL 4(R10),#^X30 BEQL FINI MOVL 12(AP),R8 ADDL @16(AP),R8 MOVB 4(R10),(R8) INCL @16(AP) ; FINI: RET ; DEFKEY: .ASCII /define type / DEFNAM: .BLKB 80. UNDER: .ASCII /_/ KWORDS: .ASCII /_KEYWORDS/ .END