ANS1
* /--- FILE TYPE = E
* /--- BLOCK ANS1 00 000 78/04/04 18.12
IDENT PLAT13$
LCC OVERLAY(PLATO,1,0)
END
IDENT ANS1
TITLE -ANS1-
*
*
CST
*
*
ANS1$ OVFILE
*
*
EXT PROCESS,BOUNDS,ECSPRTY,WORDS
EXT ERXBADL ERROR EXIT, -EXEC2-
EXT ERXCMAX TOO MANY CHARACTERS, -EXEC2-
EXT ANSEND IN FILE -ANSWER-
EXT WORDGET IN FILE ANSWER
EXT ANSVJ IN FILE ANSWER
EXT JLPACK
EXT EQTOLER,FGETVAR,GETNDFU,POSTOR
EXT FPUTVAR,NPUTVAR
EXT MISCON= IN FILE EXEC1
EXT GETCODX,WORDS IN FILE EXEC1
EXT SIMPLOT,FIRSTXY
*
*
* /--- BLOCK OPEN 00 000 78/07/05 01.32
TITLE OPEN
*
* SPREADS OUT THE STUDENT ANSWER ONE CHARACTER PER WORD
* STARTING IN THE VARIABLE SPECIFIED. THE NUMBER OF CHARACTERS
* SPREAD IS THE CHARACTER COUNT SPECIFIED BY THE
* /STUDENT/ COMMON VARIABLE *TJCOUNT*.
*
*
*
OPENOV OVRLAY
NGETVAR A1 = STARTING VARIABLE STORAGE ADDRESS
SA0 A1 MOVE TO A0 FOR STANDARD CHECKING ROUTINE
SA5 A5 RETRIEVE ORIGINAL COMMAND WORD
SA1 TJCOUNT X1 = STUDENT CHARACTER COUNT
ZR X1,PROCESS --- EXIT IF NO CHARS
RJ BOUNDS PERFORM BOUNDS CHECK
SB1 1
SA2 JUDGE A2 = STUDENT CHAR BASE ADDRESS
SB2 B0 B2 = CHAR INDEX
SB3 X1 B3 = END TEST
LX5 XFBIT I/F BIT OF -GETVAR- CODE TO TOP
NG X5,OPEN2 JUMP IF FLOATING POINT
OPEN1 SA3 A2+B2 X3 = NEXT STUDENT CHAR
BX6 X3
SA6 A0+B2
SB2 B2+B1 INCREMENT CHAR INDEX
LT B2,B3,OPEN1
EQ PROCESS --- EXIT
OPEN2 SA3 A2+B2 X3 = NEXT STUDENT CHAR
BX6 X3
PX6 X6
NX6 X6 PUT INTO FLOATING POINT FORM
SA6 A0+B2
SB2 B2+B1 INCREMENT CHAR INDEX
LT B2,B3,OPEN2
EQ PROCESS --- EXIT
*
ENDOV
*
*
*
*
* /--- BLOCK CONCEPT 00 000 78/08/29 17.21
TITLE CONCEPT EXECUTION
* EXECUTION OF -CONCEPT- COMMAND
*
* BASIC IDEA...THE -CONTENTED- WORDS ARE FOUND IN THE VOCABULARY
* WHERE THEIR NUMBER IS RETURNED FOR USE WITH -CONCEPT-
* COMMANDS. EXTRA WORDS ARE DROPPED OUT.
*
* COMMAND...
* 12 BITS = NUMBER OF CONCEPTS
* 15 BITS = POINTER TO CONCEPTS IN BINARY RELATIVE
* TO ECS RESIDENT EXTRA STORAGE OF UNIT
* 9 BITS = VOCABULARY UNIT NUMBER
* 12 BITS = MAXIMUM CONCEPT COMMAND RUN-ON
* 12 BITS = COMMAND NUMBER
*
* DATA WORDS IN EXTRA STORAGE...
* 1 BIT = ZERO FOR BINARY SEARCHES
* 37 BITS = HASHED CONCEPT
* 12 BITS = CONCEPT COMMAND RUN-ON COUNT
* 10 BITS = POINTER (REL TO B5) +1 TO USER INFO OPTIONS
* (THE +1 IS TO DISTINGUISH FROM RELPTR=0 CASE)
*
*
* USER INFORMATION OPTION PACKAGES
* TOP BITS = GETVAR CODE TO STORE INFO
* 39-49 = BASE SYNONYM TO DO USER OP ON
* 50-59 = PTR +1 TO ANY ADDITIONAL OPTIONS (REL TO B5)
*
*
SYNBITS EQU 11 BITS NEEDED FOR BASE SYNONYM NUMBER
PHBITS EQU 10 BITS FOR PHRASE LINK LIST
HASHBTS EQU 27 TOP 27 BITS CAN BE CONSIDERED A HASH
FONTBIT EQU 25 FONT BIT (WORD IS IN ALTERNATE FONT)
CAPBIT EQU 26 CAPITALIZATION BIT
URIBITS EQU 9 BITS NEEDED FOR USER INFO
*
CONCPOV OVRLAY
RJ WORDGET MAKE SURE ANSWER -CONTENTED-
SA3 JJXCON SEE IF ANSWER CONCEPTED WITH THIS VOCAB
MX0 51
AX5 24
BX4 -X0*X5 GET -CONCEPT- COMMAND VOCABULARY NUMBER
BX2 X3-X4
ZR X2,CNCEPTD IF YES, THEN SKIP -VOCABULARIZATION-
*
MX6 0
SA6 TJFLAGS CLEAR ALL JUDGING FLAGS
*
SX6 A5 SAVE A5 , B5
LX6 30
SX3 B5
BX6 X3+X6
SA6 CNBIAS
MX6 0 PRESET FOR -CNDPK3-
SA2 TWCOUNT GET NUMBER OF STUDENT WORDS
* /--- BLOCK CONCEPT 00 000 78/09/07 16.54
ZR X2,CNDPK3 IF NONE, GOTO END
*
* X4 HOLDS THE UNIT NUMBER
SA3 ECSULOC GET ECS ADDRESS OF -ULOC- TABLE
IX0 X3+X4 ECS ADDRESS FOR ULOC INO
RX1 X0 (-RXX- 1 WD READ, MAY CHG *A1*)
AX1 60-ULOC1 GET RELATIVE START OF VOCAB BUFFER
SA4 ECSLES GET ECS ADDRESS OF LESSON
IX6 X4+X1 MAKE ABSOLUTE
SA6 VOCEC AND SAVE LATER
BX0 X6 NOW READ IN HEADER AND VOWEL TABLE
SA0 VCTABLH
+ RE 9
RJ ECSPRTY
SA1 A0 GET IT
SX6 X1+8 GET VOCABULARY LENGTH + VOWEL TABLE BIAS
SA6 VOCLTH SAVE FOR LATER
AX1 30
SX6 X1
SA6 VOCTYPE GET TYPE OF VOCABULARY
*
SB1 B0 SET CURRENT STUDENT WORD TO ZERO
MX6 0
SA6 PERROR NO ERRORS YET
SA0 VCWORK LEAVE A0 SET FOR REST OF ROUTINE////
*
*
CNL SA3 VOCEC GET ECS ADDRESS OF VOCABS BUFFER
SA1 JJSBUF+B1 GET CONTENT WORD
* *** NOTE A1-X1 SET UNTIL CNFIND ***
BX4 X1
AX4 56 GET COUNT OF VOWELS IN THE WORD
SA2 VCTABLE+X4 GET PROPER VOWEL TABLE ENTRY
SX4 X2 GET RELATIVE START OF WORDS OF THESE VOWELS
IX3 X3+X4 MAKE ABSOLUTE
AX2 30 GET NUMBER OF WORDS WITH THIS NO OF VOWELS
IX2 X3+X2
SX0 1
IX2 X0+X2 ADD ONE TO END
SA4 VOCTYPE GET TYPE OF VOCABULARY
BX7 X4
SA4 JJHBUF+B1 GET SECOND PART OF STUDENT WORD
NZ X7,CN2
*
BX6 X1-X4 CONSTRUCT ONE WORD CONCEPT WORD
MX7 60-SYNBITS MASK FOR CONTENT BITS OF VOCAB WORDS
BX6 X7*X6
*
IX0 X2-X3 GET NUMBER OF WORDS
*
CNLL AX0 1 SINGLE WORD ECS BINARY SEARCH
ZR X0,CNOFIND SEE IF RUN OUT OF WORDS
IX0 X0+X3 MAKE ABSOLUTE ADDRESS
+ RE 1
RJ ECSPRTY
SA4 A0 READ UP WORD
BX1 X4*X7 JUST CONTENT BITS
IX1 X6-X1 SEE IF FIND A MATCH
BX4 -X7*X4 FOR LATER POSSIBLE USE IN CNFIND
ZR X1,CNFIND
* /--- BLOCK CONCEPT 00 000 78/09/07 16.47
PL X1,CNPLUS SEE WHICH WAY FOR NEXT CHOP
BX2 X0
IX0 X2-X3 SINGLE WORD ECS BINARY-CHOP
EQ CNLL RESET BOTTOM
CNPLUS BX3 X0
IX0 X2-X3 SINGLE WORD ECS BINARY-CHOP
EQ CNLL RESET TOP
*
*
* *TWO WORD ECS BINARY-CHOP*
*
CN2 IX3 X3-X0 BACK UP THE START
BX7 X4
*
CNLL2 IX0 X2-X3 GET DIFFERENCE
AX0 2 2 TO GET RID OF ONES BIT SINCE 2 WORD CHOP
ZR X0,CNSP RUN OUT OF WORDS, TRY SPELLING
LX0 1
IX0 X0+X3 MAKE ADDRESS ABSOLUTE
+ RE 2
RJ ECSPRTY
SA4 A0 GET FIRST (CONTENT) WORD
IX6 X1-X4 SEE IF THE SAME
NZ X6,CNBT2
SA4 A0+1 NEED FURTHER VERIFICATION (HASH WORD)
MX6 HASHBTS
BX6 X6*X4 JUST LOOK AT HASH
IX6 X7-X6
ZR X6,CNFIND
CNBT2 PL X6,CNPLUS2 SEE WHICH WAY TO CHOP
BX2 X0 RESET BOTTOM
EQ CNLL2
CNPLUS2 BX3 X0
EQ CNLL2 RESET TOP
*
* /--- BLOCK CONCEPT 00 000 78/09/11 00.25
*
CNSP SA3 TSPECS SEE IF SPECS NOSPELL
LX3 NOSPELL
NG X3,CNOFIND
*
BX4 X1 GET COPY OF CONTENT WORD
AX4 56 GET VOWEL COUNT
SA3 VCTABLE+X4 GET VOWEL TABLE ENTRY
SX0 X3 GET RELATIVE START OF WORDS OF THESE VOWELS
AX3 30 GET COUNT
SB2 X3
*
SX4 X4-1 TRY FOR WORDS OF ONE LESS VOWEL
NG X4,CNSP1
SA3 VCTABLE+X4
SX0 X3 RESET START TO THESE WORDS
AX3 30 GET COUNT
SB2 B2+X3 ADD TO PREVIOUS
*
CNSP1 SX4 X4+2 TRY FOR WORDS OF ONE MORE VOWEL
SA3 VCTABLE+X4
AX4 3
NZ X4,CNSP2 CAN ONLY GO UP TO 7
AX3 30
SB2 B2+X3 ADD IN TH
*
CNSP2 SX0 X0-1 BACK UP START
SA3 VOCEC GET ABSOLUTE START OF VOCABULARY
IX0 X0+X3 GET ABSOLUTE START OF SEARCH
*
MX7 0 CLEAR SPELLING FLAG
SA7 CSPBEST
*
*
CNDN SB2 B2-2 END TEST
NG B2,CND9 SEE IF ANY MISSPELLINGS FOUND
*
SX6 2
IX0 X0+X6 GET NEXT AUTHOR WORD
MX6 8 (HERE FOR BETTER PACKING OF COMMANDS)
CNDNN RE 8 GET 4 AT ONCE
RJ ECSPRTY
*
SA3 A0 GET FIRST WORD
BX4 X3-X1 GET CONTENT BITS DIFFERENCE
BX4 -X6*X4 MASK OFF TOP STUFF
CX4 X4 COUNT UP THE CONFLICT BITS
SX4 X4-6
NG X4,CSPGO ALLOW UP TO 5
*
SA3 A0+2 GET SECOND WORD
BX4 X3-X1
BX4 -X6*X4
CX4 X4
SX4 X4-6
NG X4,CSPGO2
*
SA3 A0+4 GET THIRD WORD
BX4 X3-X1
BX4 -X6*X4
CX4 X4
SX4 X4-6
NG X4,CSPGO3
*
SA3 A0+6 GET FOURTH WORD
BX4 X3-X1
BX4 -X6*X4
CX4 X4
SX4 X4-6
NG X4,CSPGO4
*
SB2 B2-8 TRY FOR ANOTHER 8
SX4 8
IX0 X0+X4
PL B2,CNDNN LOOP
EQ CND9
*
*
* /--- BLOCK CONCEPT 00 000 78/09/11 00.27
CSPGO2 SB2 B2-2
SX4 2
IX0 X0+X4
PL B2,CSPGO
EQ CND9
CSPGO3 SB2 B2-4
SX4 4
IX0 X0+X4
PL B2,CSPGO
EQ CND9
CSPGO4 SB2 B2-6
SX4 6
IX0 X0+X4
PL B2,CSPGO
EQ CND9
*
CSPGO SA2 JJHBUF+B1 GET HASH PART OF STUDENT WORD
SA4 A3+1 GET HASH PART OF AUTHOR WORD
*
CALL CKWORDX CHECK FOR A MISSPELLING
NG X6,CNDN
*
* /--- BLOCK CONCEPT 00 000 78/09/05 16.33
*
* X6 HOLDS THE RELATIVE FITTNESS...THE SMALLER THE BETTER
SA2 CSPBEST SEE IF THIS FIRST MISSPELLING
ZR X2,CND6
SA2 CSPVAL MUST SEE WHICH IS BETTER
IX2 X6-X2
PL X2,CNDN LAST TIME IS BETTER
CND6 SA6 CSPVAL STORE THIS CRITERION
BX7 X3 SAVE BEST AUTHOR MATCH
SA7 CSPBEST
BX7 X4
SA7 A7+1
EQ CNDN NOW CONTINUE THROUGH REST OF WORDS
*
*
CND9 SA3 CSPBEST FINAL CHECK IF EVER FOUND A MISSPELLING
ZR X3,CNOFIND
BX7 X3 IF ONE FOUND, MOVE WORD AROUND
SA7 A0 A0 IS USED BY FOLLOWING ROUTINES
SA3 A3+1 GET SECOND PART OF WORD BACK
BX7 X3
SA7 A0+1
*
*
* /--- BLOCK CONCEPT 00 000 78/09/01 16.51
*
SA1 CSPVAL SEE IF CAPITALIZATION ERROR
SX2 X1-3
PL X2,CNDSP
SA2 TJFLAGS SET CAP ERROR FLAG
MX7 1
LX7 60-JFCAP
BX6 X2+X7
SA6 A2
SX1 X1-1 SEE IF STU CAP, AUTHOR SMALL
NZ X1,CNDCP
SA2 TSPECS SEE IF SPECS OKCAP
LX2 OKCAP
NG X2,CNOFI
*
CNDCP SA2 TSPECS SEE IF SPELLING ERRORS OK
LX2 OKSPELL
NG X2,CNOFI IF SO, TREAT AS PERFECT
MX7 1
SA7 PERROR SET ERROR FLAG
SX7 8 SET TO CAPITALIZATION ERROR
EQ CNSTUL
*
* /--- BLOCK CONCEPT 00 000 78/09/07 14.28
*
CNDSP SA3 TJFLAGS SET ERROR FLAGS
MX7 1 SET SPELL ERROR FLAG
LX7 60-JFSPELL
BX6 X3+X7
SA6 A3
SA3 TSPECS SEE IF -OKSPELL-
LX3 OKSPELL
NG X3,CNOFI SPELLING ERROR IS OK
MX7 1
SA7 PERROR SET ERROR FLAG
SX7 3 SPELLING ERROR (GIVE ===== FEEDBACK)
EQ CNSTUL
*
CNOFIND SA3 TJFLAGS SET ERROR FLAGS
MX7 1 SET EXTRA VOCABULARY ERROR FLAG
LX7 60-JFVOCAB
MX4 1 ALSO SET EXTRA FLAG
LX4 60-JFEXTRA
BX7 X4+X7 THUS, EXTRA AND VOCAB ARE IDENTICAL
BX6 X3+X7
SA6 A3
SA3 TSPECS SEE IF EXTRA VOCABULARY -OK-
LX3 OKEXTRA
MX4 0 SET TO EXTRA WORD
NG X3,CNFIND
MX7 1
SA7 PERROR SET ERROR FLAG
*
SA4 TBLDATA+1 FOR DATA OUTPUT
MX7 1
LX7 DSVOCAB POSITION -VOCAB- BIT
BX7 X7+X4
SA7 A4
*
SX7 2 SET TO -UUU- MARK-UP
EQ CNSTUL
*
CNOFI SA4 A0+1 GET PROPER HASH WORD
CNFIND BX6 X4 TRANSFER HASH/INFO
SA6 CONBUF+B1 STORE IN CONCEPT NUMBER WORD
SA2 A0 GET AUTHOR-S CONTENT WORD
BX6 X2
SA6 CONCBUF+B1 SAVE FOR POSSIBLE PHRASE USE
MX7 0 SET TO OK
*
CNSTUL SA7 CURJBUX+B1 SET FOR POSSIBLE MARK-UP
SB1 B1+1 INCREMENT THROUGH STUDENT WORDS
SA2 TWCOUNT GET COUNT OF STUDENT WORDS
SB2 X2
LT B1,B2,CNL SEE IF DONE WITH STUDENT WORDS
*
SA2 PERROR SEE IF ANY ERROR UP TO HERE
ZR X2,CNDONE1
* /--- BLOCK CONCEPT 00 000 76/03/02 02.39
*
* NOW MUST DO ERROR MARKUPS, ETC.
CNBAD SA2 JJSBUFA SEE IF PREVIOUS JUDGEMENT
NZ X2,CNDWW IN WHICH CASE SKIP OUT
*
*
SA1 TWCOUNT GET NUMBER OF STUDENT WORDS
MX6 0
SA6 CURJBUX+X1 CLEAR EXTRA WORD TO ZERO SO THAT
* NO EXTRA WORDS ARE MARKED UP
* THIS EXTRA SPACE IS GUARANTEED BY WORDGET
BX6 X1
SA6 A2+2 SAVE NUMBER OF STUDENT WORDS
SX6 1 SET CRITERION TO SMALLEST POSSITIVE
SA6 A2
SX6 -1
SA6 JJCONPK SET TO GARBAGE CONCEPT
SA1 CNBIAS SAVE A5-B5 AT THIS COMMAND
BX6 X1
SA6 A2+4
SA1 TJFLAGS GET ERROR FLAGS INTO JUDGE BUFFERS
BX7 X1
SA7 A2+3 INTO JUDGE BUFFERS
*
SA0 CURJBUX GET JUDGEMENT ON EACH WORD
SA1 ATEMPEC GET ECS WORK BUFFER
BX0 X1
+ WE JJSENB OUT TO ECS
RJ ECSPRTY
SA0 JJSBUFA+JJINF INTO PROPER BUFFER IN CM
+ RE JJSENB
RJ ECSPRTY
*
EQ CNDWW NOW FIX SO CAN CONTINUE JUDGING
*
*
*
CNDONE1 SB1 B0 INITIALIZE WORD COUNT DONE
* B2 IS SET TO WORD COUNT ALREADY
SA1 VOCTYPE SEPARATE -VOCABS- FROM -VOCAB-
ZR X1,CORDER SINCE NO PHRASE IN -VOCAB-
*
* /--- BLOCK CONCEPT 00 000 78/09/07 14.27
*
* MUST TANGLE WITH PHRASES HERE
*
MX6 0
SA6 PERROR SET PHRASE ERROR FLAG TO GOOD
*
CPLOOP SA1 CONBUF+B1 BRING UP A WORD
BX2 X1
LX2 HASHBTS LOOK IF A START OF A PHRASE
PL X2,CPLOOPZ
*
MX7 HASHBTS START OF A POSSIBLE PHRASE
SB6 B2 GET CURRENT END OF LIST
CPLOOP1 SA5 CONCBUF+B1 GET CONTENT BITS
BX4 X1*X7 GET HASH BITS
BX5 X4-X5 PUT TOGETHER
SB3 B1
CPLOOPA SB3 B3+1
GE B3,B6,CPLOOPZ OUT IF DO NOT FIND AN END OF PHRASE
SA2 CONBUF+B3 BRING UP NEXT WORDS INFO BITS
BX3 X2
LX3 HASHBTS+1 RUN THRU MIDDLE OF PHRASE WORDS
PL X3,CPLOOPB SEE IF NO LONGER MIDDLE PHRASE
SB4 B3+1
GE B4,B6,CPLOOPB SEE IF THIS IS LAST WORD
SA4 CONCBUF+B3 BRING UP THIS WORD-S CONTENT BITS
LX5 5 BUILD A PHRASE WORD
BX5 X5-X4
BX4 X2*X7 GET ONLY HASH BITS
BX5 X5-X4
EQ CPLOOPA
CPLOOPB LX3 1 NOW SEE IF FIND END OF PHRASE
PL X3,CPLOOPM IF NOT END, TRY SOMETHING ELSE
BX4 X5 NOW MAKE PHRASE WORD
LX4 PHBITS+SYNBITS+URIBITS
BX5 X4-X5
AX5 PHBITS+SYNBITS+URIBITS GET ONLY HASH BITS
AX2 60-HASHBTS-3-PHBITS GET LINK TO PHRASE WORD
CPLOOPC MX0 60-PHBITS SET MASK FOR PHRASE
BX2 -X0*X2 GETLINK
ZR X2,CPLOOPM RUN OUT OF LINKS
SA3 VOCEC GET PHRASE WORD OUT OF VOCABS BUFFER
IX0 X2+X3
SA3 VOCLTH
IX0 X0+X3 PHRASES ARE AFTER WORDS
+ RE 1
RJ ECSPRTY
SA2 A0 FINALLY BRING UP PH
BX4 X2
AX4 PHBITS+SYNBITS+URIBITS GET ONLY HASH BITS
BX4 X4-X5 SEE IF THIS IS THE PHRASE
ZR X4,CPLOOPD GOT IT
AX2 SYNBITS+URIBITS ELSE, TRY FOR CHAIN LINK
EQ CPLOOPC
*
CPLOOPM SB6 B6-1 SO TRY FOR A SHORTER LENGTH PHRASE
EQ CPLOOP1
*
CPLOOPD SB1 B1+1 NOW SET EXTRA PHRASE WORDS TO EXTRA WORDS
MX6 0
SA6 CONBUF+B1
SA6 JJCUBUF+B1 ALSO KILL FOR USER INFO OPS
LT B1,B3,CPLOOPD
BX1 X2 GET THE PHRASE BASE SYNONYM IN PLACE
*
* /--- BLOCK CONCEPT 00 000 78/02/29 00.09
CPLOOPZ MX0 60-SYNBITS
BX6 X1
SX4 A1-CONBUF GET BIAS INTO BUFFER
SA6 JJCUBUF+X4 STORE WHOLE WORKS FOR USE IN USER INFO OPS
BX6 -X0*X1 NOW GET BASE SYNONYM BITS
SA6 A1
SX6 X6-1 MAKE SURE THAT WORD WAS DEFINED AS SOMETHIN
NZ X6,CZZZ AN ERROR IF ONLY A PART OF A PHRASE
SA1 TJFLAGS SET ERROR FLAGS
MX6 1
LX6 60-JFVOCAB SET VOCAB FLAG
BX1 X1+X6
MX6 1
LX6 60-JFEXTRA SET EXTRA FLAG
BX6 X1+X6
SA6 A1
SA1 TSPECS IF OKEXTRA, THEN NO PHRASE ERRORS
LX1 OKEXTRA
PL X1,CPERP
MX6 0
SA6 A6 JUST SET THE WORD TO -EXTRA- (IGNORE)
EQ CZZZ
CPERP SX6 9 SET PHRASE ERROR FLAG
SA6 PERROR
SA6 CURJBUX+B1 SET TO DO MARK-UP
*
CZZZ SB1 B1+1 INCREMENT THRU ALL WORDS
LT B1,B2,CPLOOP
*
*
SA1 PERROR SEE IF ANY ERRORS IN PHRASE
ZR X1,CORDER
SA1 TJFLAGS SET ERROR FLAGS
MX6 1
LX6 60-JFPHRAS SET PHRASE ERROR FLAG
BX6 X1+X6
SA6 A1
EQ CNBAD
*
*
CORDER SA3 TSPECS SEE IF ORDER IS IMPORTANT
LX3 NOORDER
PL X3,CND NORMAL CASE IS THAT ORDER IS IMPORTANT
SB1 B0
*
* ORDER IS NOT IMPORTANT...THUS, BY ORDERING THE
* WORD NUMBERS, ONE CAN ELIMINATE ANY ORDER.
*
CNBUB1 SA1 CONBUF+B1 DO BUBBLE SORT
SB3 B1
CNBUB2 SB3 B3+1
GE B3,B2,CNBUB3
SA2 CONBUF+B3
IX3 X1-X2
NG X3,CNBUB2
BX6 X1 MUST CHANGE THE ENTRIES
BX7 X2
SA6 A2
SA7 A1
BX1 X2
*
SA3 JJCUBUF+B1 ALSO SORT THE WHOLE WORKS BUFFERS
SA4 JJCUBUF+B3
BX6 X3
BX7 X4
SA6 A4
SA7 A3
EQ CNBUB2
CNBUB3 SB1 B1+1
LT B1,B2,CNBUB1
*
* NOW MUST CONSTRUCT THE CONCEPT WORD
CND MX6 0
SB1 B0
CNDPK1 SA1 CONBUF+B1 BRING UP THE WORD NUMBER
ZR X1,CNDPK2 SKIP EXTRA WORDS
LX6 SYNBITS
BX6 X6-X1 ADD IN THIS NUMBER
* /--- BLOCK CONCEPT 00 000 78/08/29 17.14
CNDPK2 SB1 B1+1
LT B1,B2,CNDPK1 LOOP THRU ALL NUMBERS
*
LX6 12+10+1 MOVE UP OUT OF WAY OF OTHER FIELDS
*
MX1 60-12-10-1 AND CLEAR OUT ANY BOTTOM BITS THAT
BX2 -X1*X6 MAY HAVE BEEN SET BY LONG CONCEPTS
BX1 X1*X6
LX2 36
BX6 X1-X2
LX6 59 MAKE SURE TOP BIT A ZERO FOR
* BINARY SEARCHES
CNDPK3 SA6 JJCONPK STORE FINISHED CONCEPT
*
CNDWW SA5 CNBIAS ENTRY HERE ALSO FROM CNBAD
SB5 X5 GET BACK A5 , B5
AX5 30
SA5 X5
AX5 24 MAKE LIKE ORIGINALLY CONCEPTED CASE
MX0 51
BX6 -X0*X5
SA6 JJXCON SET CURRENT -CONCEPT- VOCAB NUMBER
*
* MATCH STUDENT AND AUTHOR CONCEPTS
CNCEPTD SA1 JJCONPK GET STUDENT CONCEPT
SX2 -1 TEST FOR BAD STUDENT RESPONSE
BX2 X1-X2
ZR X2,CNOPE
*
MX0 45 SEE IF MATCHING CONCEPT
AX5 9 GET RELATIVE POINTER IN BINARY
BX2 -X0*X5
MX0 48
AX5 15 GET NUMBER OF CONCEPTS
BX5 -X0*X5 JUST 12 BITS
*
SA4 ECSXSTO ABSOLUTE START OF UNITS ECS RESIDENT EX STO
IX3 X4+X2 ABSOLUTE START OF CONCEPTS
IX5 X3+X5 ABSOLUTE END
SX4 1
IX3 X3-X4
*
SA0 VCWORK BE SURE A0 SET
MX6 38 CONCEPT HASH MASK
*
IX0 X5-X3
*
CBL AX0 1 BINARY SEARCH
ZR X0,CNOPE RUN OUT WITHOUT FINDING CONCEPT
IX0 X0+X3 MAKE ABSOLUTE
+ RE 1 GET AUTHOR CONCEPT
RJ ECSPRTY
SA2 A0
BX4 X6*X2 GET JUST HASH PART
IX4 X1-X4 GET DIFF BETWEEN STUDENT AND AUTHOR WD
ZR X4,CNPER FIND IT
PL X4,CBLPL
BX5 X0
IX0 X5-X3
EQ CBL
CBLPL BX3 X0
IX0 X5-X3
EQ CBL
*
* /--- BLOCK CONCEPT 00 000 77/08/14 23.44
*
*
* CANNOT FIND CONCEPT
CNOPE SA5 A5 GET COMMAND WORD AGAIN
AX5 12 GET MAXIMUM CONCEPT RUN-ON COUNT
MX0 48
BX6 -X0*X5
SA2 TANSCNT GET ANSWER COMMAND COUNT
IX6 X6+X2 ADD THE RUN-ON COUNT
SA6 A2
EQ PROCESS
*
*
CNPER MX6 48
BX4 X2 SAVE COPY OF CONCEPT WORD
AX2 10
BX7 -X6*X2 GET CONCEPT RUN-ON COUNT
SA7 CROHOLD SAVE FOR EXIT
SA1 TANSCNT GET COUNT OF ANSWER COMMANDS
IX7 X1+X7 ADD THE NUMBER OF RUN ONS
SA7 A1
*
MX7 0 CLEAR JUDGE BUFFER FLAG
SA7 JJSBUFA
SA7 CUIFLGS CLEAR THAT USER OPS HAS NOT USED ANY WORDS
*
SB7 XANSC SET TO ANSWER-CONTINGENCY
*
CUTOP MX6 50 NOW DO ANY USER INFO OPTIONS
BX4 -X6*X4 GET JUST THE LINK
ZR X4,CALDJ TEST FOR NO OPTIONS
NG X4,CALDJ JUST FOR SAFETY
*
SX4 X4-1 TAKE OFF THE ONE EXTRA ADDED
SA4 B5+X4 GET USER OP WORD
ZR X4,CALDJ CHECK FOR BAD USER OPTION ... NO OP
BX5 X4 GET COPY READY FOR NPUTVAR
BX7 X4
SA7 CUHOLD AND COPY FOR AFTER NPUTVAR
AX4 10 SHIFT OFF LINK
MX7 60-SYNBITS
BX6 -X7*X4 GET BASE SYNONYM TO SEARCH FOR
SB1 B0
SA2 TWCOUNT GET COUNT OF USER WORDS
SB2 X2
*
CUL SA1 JJCUBUF+B1 GET NEXT WORD
BX2 -X7*X1 MASK TO BASE SYN NO
BX2 X2-X6 SEE IF SAME
ZR X2,CULFND
CUL3 SB1 B1+1
LT B1,B2,CUL LOOP THRU ALL WORDS
SX6 -1 NO FIND
EQ CULSTO
*
CULFND MX3 1 SEE THAT THIS WORD NOT ALREADY USED
LX3 B1,X3
SA2 CUIFLGS
BX4 X3*X2
NZ X4,CUL3 TRY FOR A DIFFERENT ONE
BX6 X2+X3 SET THIS WORD BIT (CAN ONLY BE 40 WORDS)
SA6 A2
*
AX1 SYNBITS SHIFT TO USER INFO FIELD
MX6 60-URIBITS
BX6 -X6*X1 GET USER SUPPLIED NUMBER
*
CULSTO NPUTVAR X5=GETVAR CODE, X6= VALUE TO STORE
SA4 CUHOLD GET BACK CURRENT USER OP
EQ CUTOP AND SEE IF LINK TO ANOTHER USER OP
*
*
* /--- BLOCK CONCEPT 00 000 78/09/07 14.29
*
CALDJ SA5 A5 GET ORIGINAL COMMAND
*
MX1 -XCMNDL LOOK AT JUST COMMAND CODE
BX1 -X1*X5
SX3 MISCON= SEE IF THIS -MISCON-
IX1 X1-X3
MX7 0 PRESET TO MISCON
ZR X1,CALDN
SX7 -1 ELSE SET TO JUDGE OK
CALDN SA7 TJUDGED SET JUDGEMENT -1=OK, 0=NO
*
AX5 12 GET MAXIMUM CONCEPT RUN-ON BIAS
MX6 48
BX5 -X6*X5
SA2 CROHOLD
IX5 X5-X2 SEE IF THIS COMMAND IS THE LAST IN RUN
EXT ANSMARK
NZ X5,ANSMARK IF NOT, THEN NO POSSIBLE ANS-CONTINGENCY
* FOR THIS CONCEPT COMMAND
*
EQ PROCESS AND GO TO EXECUTE
*
PERROR BSS 1 ERROR IN PHRASE FLAG
VOCEC BSS 1 HOLDS STARTING LOC OF ECS VOCABS BUFFER
VCWORK BSS 9 TO HOLD HEADER AND VOWEL TABLE OF COM WDS
VCTABLH BSS 1 VOCABULARY HEADER WORD
VCTABLE BSS 8 VOWEL TABLE
*////VCTABLE MUST FOLLOW VCTABLH///
VOCLTH BSS 1 LENGTH OF VOCAB WORDS + VOWEL TABLE BIAS
VOCTYPE BSS 1 TYPE OF VOCABULARY (0=VOCAB,1=VOCABS)
CSPBEST BSS 2 HOLDS BEST SPELLING MATCH WORD
CSPVAL BSS 1 HOLDS SPELLING CRITERION FOR CSPBEST
CNBIAS BSS 1
CONBUF BSS JJSENB HOLDS NUMBER OF WORD IN VOCABULARY
CONCBUF BSS JJSENB HOLDS AUTHOR-S CONTENT BITS FOR PHRASE USE
CURJBUX BSS JJSENB HOLDS JUDGEMENT ON EACH WORD
CUHOLD BSS 1 HOLDS USER OP OVER NPUTVAR
CROHOLD BSS 1 HOLDS CONCEPT RUN-ON COUNT OVER NPUTVAR
CUIFLGS BSS 1 HOLDS BITS SET IF USER OP USES A WORD
*
ENDOV
*
* /--- BLOCK CLOSE 00 000 78/07/05 01.33
TITLE -CLOSE-
*
* 'LOADS THE JUDGE BUFFER FROM VARIABLES (ASSUMED
* TO HOLD ONE 6 BIT CHARACTER RIGHT-JUSTIFIED PER
* WORD). 'LOADING CEASES AT THE 1ST ZERO CHARACTER
* OR WHEN THE SPECIFIED NUMBER OF CHARACTERS IS
* EXHAUSTED.
*
* 1ST ARGUMENT = STARTING VARIABLE
* 2ND ARGUMENT = NUMBER OF CHARACTERS
*
*
*
CLOSEOV OVRLAY
NGETVAR A1 = *FROM* ADDRESS
SX6 A1 SAVE ADDRESS
SA6 CLOSAV
SA5 A5
LX5 XCODEL
NGETVAR X1 = NUMBER OF CHARACTERS
SX1 X1+0 TO CATCH SOME WEIRD BIG NUMBERS
NG X1,ERXBADL --- ERROR EXIT IF NEGATIVE
SX0 X1-JUJLTH
PL X0,ERXCMAX --- ERROR IF BUFFER EXCEEDED
SX7 -1
SA7 JJSTORE TO TELL -STORE- COMMAND TO RECOMPILE ANSWER
SX6 0
SA6 JUDGE GUARANTEE A 0 CODE
SA6 JJFBUF SET COMMON SWITCH THAT ANSWER MODIFIED
SA6 TJCOUNT 0 IN CASE OF 0 STRING LENGTH
ZR X1,PROCESS --- EXIT IF COUNT=0
SA2 CLOSAV GET ADDRESS FOR BOUNDS CHECK
SA0 X2
RJ BOUNDS BOUNDS CHECK--ERRORS DO NOT RETURN
SB1 1
SB2 0 B2 = STORAGE INDEX
SA2 A0-1 PRE-LOAD
SB3 X1 B3 = END TEST
MX0 -6 X0 = CHAR MASK
*
*
CLLP SA2 A2+B1 INCREMENT ADDRESS / LOAD CHAR
BX6 -X0*X2 GET BOTTOM 6 BITS
ZR X6,CLX EXIT IF 0 CHAR
SA6 JUDGE+B2 STORE CHAR
SB2 B2+1
LT B2,B3,CLLP LOOP IF COUNT NOT REACHED
*
*
CLX SX6 B2
MX7 0
SA6 TJCOUNT STORE CORRECT JCOUNT
SA7 JUDGE+B2 GUARANTEE TERMINATING 0 CODE
EQ PROCESS --- RETURN
*
* CERXBIG SX2 JUJLTH
* EXECERR 84 TOO MANY CHARACTERS
*
*
CLOSAV BSS 1
ENDOV
* /--- BLOCK LOADA 00 000 78/04/04 18.12
TITLE -LOADA-
*
* 'LOADS THE JUDGE BUFFER FROM VARIABLES (ASSUMED
* PACKED WITH 10 CHARS PER WORD). 'LOADING CEASES
* AT THE 1ST ZERO CHARACTER OR WHEN THE SPECIFIED
* NUMBER OF CHARACTERS HAS BEEN EXHAUSTED.
*
* 1ST ARGUMENT = STARTING VARIABLE
* 2ND ARGUMENT = NUMBER OF CHARACTERS
*
*
LOADAOV OVRLAY
NGETVAR A1 = *FROM* ADDRESS
SX6 A1 SAVE ADDRESS
SA6 LOASAV
BX6 X1
SA6 LOAVAL SAVE VALUE IN CASE LITERAL
SA5 A5 RETRIEVE ORIGINAL COMMAND WORD
LX5 XCODEL
NGETVAR X1 = NUMBER OF CHARACTERS
SX1 X1+0 TO CATCH SOME WEIRD BIG NUMBERS
NG X1,ERXBADL --- ERROR EXIT IF NEGATIVE
SX0 X1-JUJLTH-1 CAN HAVE UP TO 300...
PL X0,ERXCMAX --- ERROR IF BUFFER EXCEEDED
SX7 -1
SA7 JJSTORE TO TELL -STORE- COMMAND TO RECOMPILE ANSWER
SX6 0
SA6 JUDGE GUARANTEE A 0 CODE
SA6 JJFBUF SET COMMON SWITCH THAT ANSWER MODIFIED
SA6 TJCOUNT 0 IN CASE OF 0 STRING LENGTH
ZR X1,PROCESS --- EXIT IF COUNT=0
SX2 X1-11 SEE IF ONLY 1 WORD (10 CHARS)
PL X2,LOADAX1
SA0 LOAVAL SET ADDRESS
EQ LOADAX2
*
* LERXBIG SX2 JUJLTH
* EXECERR 84 TOO MANY CHARACTERS
*
LOADAX1 SA2 LOASAV GET ADDRESS FOR BOUNDS CHECK
SA0 X2
RJ WORDS BOUNDS CHECK--ERRORS DO NOT RETURN
LOADAX2 SB1 10 INITIALIZE CHARS LEFT IN WORD
SA2 A0 X2 = 1ST WORD
MX0 -6 X0 = CHAR MASK
SB2 B0 B2 = STORAGE INDEX
SB3 X1 B3 = END TEST
*
LACHAR LX2 6 POSITION NEXT CHAR
BX6 -X0*X2 EXTRACT IT
ZR X6,LAX EXIT IF 0 CHAR
SA6 JUDGE+B2 STORE CHAR
SB2 B2+1
EQ B2,B3,LAX EXIT IF CHAR COUNT REACHED
SB1 B1-1 DECREMENT CHARS-IN-WORD COUNT
NZ B1,LACHAR
SA2 A2+1 LOAD NEXT WORD
SB1 10 RESET CHARS-IN-WORD COUNT
EQ LACHAR
*
LAX SX6 B2
MX7 0
SA6 TJCOUNT STORE CORRECT JCOUNT
SA7 JUDGE+B2 GUARANTEE TERMINATING 0 CODE
* NOTE, JUDGE HAS 301 SPACES SO 300 CASE FITS
EQ PROCESS --- RETURN
*
*
LOASAV BSS 1
LOAVAL BSS 1 VALUE SAVED FOR LITERALS
*
*
ENDOV
* /--- BLOCK ANSV 00 000 80/04/22 01.35
TITLE ANSV/WRONGV (AND ANSU/WRONGU)
*
* NUMERICAL ANSWER IS SPECIFIED BY VARIABLE
* (EXPRESSION) AND TOLERANCE (ABSOLUTE OR PERCENT)
*
ANSVOV OVRLAY
*
SA1 XSLCLOK
BX7 X1 SAVE MILLISECOND CLOCK ON ENTRY
SA7 AVETIM
SA1 TANSCNT INCREMENT ANSCNT
SX7 X1+1
SA7 A1
SA1 JJSTORE IF JJSTORE=-2 (RESPONSE WILL NOT COMPILE)
SX1 X1+2 JUST SKIP OVER THIS ANSV
ZR X1,PROCESS
FGETVAR FLOATING POINT RESULT TO X1
BX6 X1
SA6 AVALUE SAVE ANSWER VALUE SPECIFIED
SA5 A5 RETRIEVE COMMAND WORD
LX5 XCODEL
FGETVAR FLOATING POINT RESULT TO X1
SA5 A5 RETRIEVE COMMAND WORD
LX5 2*XCODEL
PL X5,ATOLSAV JUMP IF ABSOLUTE TOLERANCE
SA2 AVHUN 100.0
FX3 X1/X2 CONVERT PERCENTAGE TO FRACTION
SA4 AVALUE X4 = ANSWER VALUE
FX1 X3*X4 CONVERT PERCENTAGE TOLERANCE TO ABSOLUTE
ATOLSAV BX6 X1
PL X6,ATOLOK JUMP IF TOLERANCE POSITIVE
BX6 -X1 FLIP SIGN
ATOLOK SA6 ATOLER SAVE ABSOLUTE VALUE OF TOLERANCE SPECIFIED
SA1 JJSTORE CHECK WHETHER STUDENT ANS ALREADY COMPILED
PL X1,ANSV2 JUMP IF ALREADY COMPILED
*
*
RJ GETNDFU GET NDEFU INITIALIZED
SA1 NDEFU
SX7 -2
ZR X1,ANSV11 JUMP IF NO UNITS
SX7 -1
ANSV11 SA7 NUNITS
SX7 JUDGE INITIALIZE STRING ADDRESS
SA7 WORDPT
MX7 0
SA7 INX ZERO *INX* TO BEGIN EXTRA STORAGE IN *INFO*
CALL QUIKCMP GENERATE MACHINE CODE IN INFO
BX7 X1
SA7 JJSTORE SAVE GETVAR CODE FOR NEXT ANSV
ANSV2 BX5 X1 MOVE TO REQUIRED X5
LX5 60-XCODEL LEFT-ADJUST -GETVAR- CODE
SB1 A5
SX7 B5-B1 SAVE COMMAND BIAS
SA7 OLDB5
SB5 INFO SET UP B5 FOR EXTRA STORAGE IN INFO
MX7 59 FORM -1
SA7 TFORMOK SET OK--WILL BE SET ZERO IF EXEC ERROR
FGETVAR EVALUATE STUDENT EXPRESSION, VALUE IN X1
BX6 X1
SA6 ANSVSAV SAVE VALUE
SA1 OLDB5 RESTORE B5
MX6 59 -1
SA6 A1 CLEAR OLDB5
SB5 X1
SB5 A5+B5
* /--- BLOCK ANSV 00 000 74/08/17 17.20
SA1 ANSVSAV
SA2 AVALUE X2 = VALUE OF SPECIFIED ANSWER
OR X1,ABNORMAL
ID X1,ABNORMAL
OR X2,ABNORMAL
ID X2,ABNORMAL
SA3 ATOLER X3 = ABSOLUTE VALUE OF TOLERANCE
NZ X3,NONZTOL JUMP IF NONZERO TOLERANCE
FX1 X1-X2 COMPARE ARGUMENTS
UX2 X1,B0
AX2 10
ZR X2,AOK MOSTLY EQUAL
PL X1,AEQ1 JUMP IF DIFF POSITIVE
BX1 -X1 ABS VALUE
AEQ1 SA2 EQTOLER TINY ABSOLUTE TOLERANCE
FX1 X1-X2
NG X1,AOK EQUAL IF DIFF LT TOLERANCE
EQ ANSVTIM NO MATCH
NONZTOL SA4 EQTOLER PICK UP ROUNDOFF TOLERANCE
FX3 X3+X4 INCREASE TOLERANCE
NX3 X3
FX4 X1-X2 STUDENT-AUTHOR
NX4 X4
PL X4,NZTOL2
BX4 -X4 TAKE ABS VALUE
NZTOL2 FX7 X3-X4 ALLOWED TOLERANCE - DIFF
NG X7,ANSVTIM JUMP IF NO MATCH
AOK SA5 A5 PICK UP COMMAND AGAIN
AX5 XCMNDL
MX7 2*XCODEL+XCMNDL+1 UNITS POINTER MASK
BX7 -X7*X5 GET POINTER
ZR X7,AOKU JUMP IF NO UNITS
SB1 X7-2 POINTER IS ACTUALLY POINTER+1
SA1 B5+B1 A1 = FIRST UNIT LOC MINUS 1
SB1 1 INDEX
SA2 NDEFU NUMBER OF UNITS DEFINED
SB2 X2 COUNT
SA2 UADS-1 STUDENT UNIT ARRAY MINUS 1
SA3 EQTOLER
AOKL SA1 A1+B1 PICK UP NEXT AUTHOR DIM
SA2 A2+B1 NEXT STUDENT DIM
FX7 X1-X2 COMPARE ARGUMENTS
UX2 X7
AX2 10
ZR X2,AOKL3 MOSTLY EQUAL
PL X7,AOKL2 JUMP IF DIFF POSITIVE
BX7 -X7 ABS VALUE
AOKL2 FX7 X3-X7
NG X7,ANSVTIM JUMP IF DIFF GT TOLERANCE
AOKL3 SB2 B2-B1 COUNT
GT B2,B0,AOKL JUMP IF NOT DONE
AOKU SB7 XANSC SWITCH TO ANS-C
SA1 ANSVJ PICK UP ANSV OR WRONGV JUDGEMENT
BX7 X1
SA7 TJUDGED SET JUDGMENT
EQ PROCESS --- RESUME PROCESSING
*
ABNORMAL BX1 X1-X2 INFINITE OR INDEFINITE
NG X1,ANSVTIM
NZ X1,ANSVTIM
EQ AOK STUDENT = AUTHOR
* /--- BLOCK ANSV 00 000 80/04/22 01.34
*
ANSVTIM SA1 XSLCLOK SEE IF TOO MUCH PROCESSING GOING ON
SA2 AVETIM
IX2 X1-X2 COMPUTE ELAPSED TIME
SX7 30 MAXIMUM ELAPSED TIME
PX7 X7 FLOAT IT
NX7 X7
SA1 CPSPD SCALE BY CPU-SPEED FACTOR
FX1 X7/X1
UX1,B1 X1
LX1 B1
IX2 X2-X1
NG X2,PROCESS EXIT IF LESS THAN 30 MILL
SX7 16
SA7 TFORMOK TIME-SLICE ERROR, LONG COMPILE
EQ ANSEND DEFAULT -NO-
*
*
ANSVSAV BSS 1
AVALUE BSS 1 ANSWER VALUE SPECIFIED
ATOLER BSS 1 ABSOLUTE VALUE OF TOLERANCE
AVHUN DATA 100.0
AVETIM BSS 1
*
ENDOV
*
* /--- BLOCK STOREN 00 000 76/11/16 21.57
*
TITLE STOREN (STORE NUMERIC)
* STOREN COMMAND
*
* STOREN V1 RETURNS NUMERIC FROM STUDENT ANSWER IN V1
* ALSO BUMPS NUMERIC, SIMILAR TO MATCH.
* IF NO NUMERIC PRESENT, V1 SET TO 0 AND GO INTO ANS-C
*
*
STRNOV OVRLAY
RJ WORDGET GET STUDENT ANSWER IN -CONTENT- WORDS
*NOTE---WORDGET DOES NOT ALTER A5 OR X5.
SB1 1 B1 = CONSTANT 1
SB2 -1 INITIALIZE BUFFER POINTER
SA2 TWCOUNT GET NUMBER OF STUDENT WORDS
SB3 X2 GET END OF BUFFER POINTER
*
STNLOOP SB2 B2+B1 INCREMENT WORD POINTER
EQ B2,B3,STNONE JUMP IF SEARCH DONE AND NO NUMBER
SA2 JJHBUF+B2 BRING UP NEXT WORD CONTENT
LX2 1 GET WORD/NUMBER BIT TO TOP
PL X2,STNLOOP KEEP LOOKING FOR A NUMBER
SA1 JJSBUF+B2 GET NUMBER
MX6 1
LX2 1 GET THE SIGN BIT BACK IN PLACE
BX2 X6*X2 GET IT CLEAN
BX6 X1+X2 RESTORE WHOLE 60 BIT NUMBER
SA6 SMNUM SAVE NUMBER
* /--- BLOCK STOREN 00 000 76/11/17 00.18
*
* DECREMENT STUDENT WORD COUNT, BUMP -CONTENT- WORD, AND
* REPLACE CHARACTERS IN -JUDGE- BUFFER WITH SPACES.
*
SA2 TWCOUNT GET NUMBER OF STUDENT WORDS
SX6 X2-1 DECREMENT NUMBER OF STUDENT WORDS
SA6 A2
*
MX6 0 SET TO RE-CONCEPT
SA6 JJXCON
*
*
* GET INFO ABOUT CHARACTER POSITIONS INVOLVED
* SAVE IN -X3- AND -X4-
SA1 JJXY+B2 X1 = COUNT INFO WORD FOR WORD MATCHED
MX0 15
BX3 X0*X1
LX3 15 X3 = INDEX TO FIRST CHAR OF WORD
LX1 15
BX4 X0*X1
LX4 15 X4 = INDEX TO LAST CHAR
*
* NOW MOVE ALL BUFFERS DOWN ONE WORD
*
MBUMP SB2 B2+B1 GET NEXT ENTRY
EQ B2,B3,MFLL SEE IF AT END OF BUFFER
*
SA1 JJSBUF+B2 -JJSBUF-
BX6 X1
SA6 A1-B1
SA1 JJXY+B2 -JJXY-
BX6 X1
SA6 A1-B1
SA1 JJHBUF+B2 -JJHBUF-
BX6 X1
SA6 A1-B1
SA1 JJSBUFA+JJINF+B2 -JJSBUFA-
BX6 X1
SA6 A1-B1
*
EQ MBUMP
*
* NOW CHANGE CHARACTERS TO SPACES
MFLL SX6 1R X6 = SPACE CODE
SB2 X3 B2 = STARTING CHAR INDEX
SB3 X4 B3 = ENDING CHAR INDEX
MPUT SA6 JUDGE+B2
SB2 B2+B1
LE B2,B3,MPUT
*
*
MX6 -1
SA6 JJSTORE FLAG RECOMPILE STUDENT RESPONSE
*
SA2 SMNUM
BX6 X2 SET UP VALUE FOR STORE
FPUTVAR STORE FLOATING POINT VALUE
EQ PROCESS
*
STNONE SX6 1
SA6 TJUDGED SET JUDGMENT=NO (UNIVERSAL)
SB7 XANSC AND SWITCH TO ANS-CONTINGENCY
MX6 0
NPUTVAR STORE ZERO INTO AUTHOR VARIABLE
EQ PROCESS
SMNUM BSS 1
*
*
ENDOV
* /--- BLOCK SPECS 00 000 75/10/10 23.09
LIST L
TITLE SPECS EXECUTION
*
SPECXOV OVRLAY
*
*** -SPECS- COMMAND HAD RESTRICTION IT COULD NOT BE
*** EXECUTED IN A LESSON WITH LVARS AND IN A -JOIN-
*** UNIT. DONT SEE WHY WE HAVE THIS RESTRICTION, SO
*** HAVE REMOVED IT UNTIL WE FIND OUT WHY. CMH 2/16/95
*
* SA1 TLVLESS SEE IF LESSON HAS LVARS
* ZR X1,SPECSA IF NO LVARS
**
* SA1 JOIN
* ZR X1,SPECSA IF NOT IN ATTACHED UNIT
**
* EXECERR 127 -SPECS- NOT ALLOWED
*
SPECSA BSS 0
*
BX6 X5 X5 HAS SPECS COMMAND INFO
SA6 TSPECS SAVE
*
MX7 0
SA7 TANSCNT CLEAR ANSCNT WITH SPECS COMMAND
*
SA7 JJFBUF SET TO RE-CONTENT, RE-CONCEPT
*
SA7 JJSBUFA FORGET ABOUT PREVIOUS JUDGING
*
MX6 -1
SA6 JJSTORE FLAG RECOMPILE STUDENT RESPONSE
*
RJ JLPACK PACK UP A5 AND B5
SA6 TSPLOC PUT AWAY FOR LATER
*
SA1 TSPECS GET SPECS BITS AGAIN
LX1 CANON
NG X1,SPECSC IF CANONICAL FORM
LX1 NOCANON-CANON
NG X1,SPECSNC IF NO CANONICAL FORM
LX1 BUMPSHFT-NOCANON
NG X1,SPECSB IF SHIFT CODE TO BE BUMPED
EQ PROCESS --- RETURN
*
* /--- BLOCK SPECS 00 000 79/02/16 20.15
*
* BUMP ALL SHIFT CODES FROM STUDENT ANSWER
*
SPECSB SA1 TJCOUNT JUDGE COUNT
ZR X1,PROCESS --- RETURN
SB1 1
SB2 B0 CHAR POINTER
SB3 X1 (B3) = ANSWER LENGTH
SX0 KUP
*
BUMPUP SA1 JUDGE+B2 STUDENT CHAR TO X1
BX1 X1-X0
ZR X1,BUMPUP1 SEE IF A SHIFT CODE
SB2 B2+B1 INCREMENT
LT B2,B3,BUMPUP CONTINUE LOOPING
EQ PROCESS FINISHED WITHOUT FINDING ANY SHIFT CODES
*
BUMPUP1 SA0 B2 NOW A0 HOLDS WHERE CHARS WITHOUT SHIFTS END
*
BUMPUP2 SB2 B2+B1 INCREMENT
GE B2,B3,BUMPUP4 SEE IF FINISHED
SA1 JUDGE+B2 GET NEXT CHARACTER
BX2 X1-X0
ZR X2,BUMPUP2 JUST LOOP IF FIND ANOTHER SHIFT CODE
*
BX6 X1
SA6 A0+JUDGE RESTORE THIS CHARACTER DOWN SOME
SA2 JJCHAR+B2 AND ALSO RESTORE THE REAL CHARACTER COUNT
BX7 X2
SA7 JJCHAR+A0
SA0 A0+B1 INCREMENT NUMBER OF REAL CHARACTERS
EQ BUMPUP2
*
BUMPUP4 SX6 A0 NOW STORE THE NUMBER OF CHARS WITHOUT SHIFT
SA6 TJCOUNT
MX6 0
SA6 A0+JUDGE AND A TAILING ZERO IN -JUDGE-
EQ PROCESS
* /--- BLOCK SPECSC 00 000 75/10/09 19.41
TITLE CANONICAL FORM
*
* 'THE CANONICAL FORM FOR A RESPONSE IS OBTAINED
* USING THE FOLLOWING RULES--
*
* (1) 'ALL INVISIBLE CODES AT THE END OF THE
* RESPONSE ARE REMOVED; THESE CODES ARE--
* SPACE, BACKSPACE, SHIFT, FONT, ACCESS,
* SUPERSCRIPT, SUBSCRIPT, AND CARRIAGE RETURN.
*
* (2) 'IF A SINGLE DISPLAYED CHARACTER IS
* SUPERSCRIPTED OR SUBSCRIPTED, IT WILL BE
* DONE WITH A SIMPLE SUPER OR SUB CODE--I.E.,
* ANY SUCH CASES THAT WERE DONE USING THE
* LOCKING SUPER OR SUB (SHIFT-SUPER, SHIFT-SUB)
* WILL BE CONVERTED. 'HOWEVER, A LOCKING CODE
* WILL NOT BE CHANGED IF IT CAUSES A RETURN TO
* THE BASE LEVEL. 'THUS IN X'&12'!Y THE SHIFT-SUB
* RETURNING THE Y TO THE ORIGINAL LEVEL WILL
* BE RETAINED, WHILE IN X'&12'!Y&3 A SHIFT-SUPER FOR
* THE 3 WOULD BE CONVERTED TO A SIMPLE SUPER.
*
*
SPECSC SA1 TJCOUNT
ZR X1,SCEND EXIT IF NO CHARS
SB1 1
SA0 JUDGE A0 = START OF CHARS
SB2 X1 B2 = CHARACTER COUNT
*
* 'SCAN FROM THE END BACKWARDS, ELIMINATING ANY
* TRAILING CODES WHICH ARE INVISIBLE.
*
SC1 SB2 B2-B1
NG B2,SC90 JUMP IF OUT OF CHARS
SA1 A0+B2
SX2 X1-1R CHECK FOR SPACE
ZR X2,SC1
SX2 X1-KSUB CHECK FOR SUBSCRIPT
ZR X2,SC1
SX2 X1-KSUP CHECK FOR SUPERSCRIPT
ZR X2,SC1
SX2 X1-KUP CHECK FOR SHIFT CODE
ZR X2,SC1
SX2 X1-KCR CHECK FOR CARRIAGE RETURN
ZR X2,SC1
SX2 X1-KBKSP CHECK FOR BACKSPACE
ZR X2,SC1
SX2 X1-FONT CHECK FOR FONT CODE
ZR X2,SC1
SX2 X1-ACCESS CHECK FOR ACCESS CODE
ZR X2,SC1
*
SX6 0
SA6 UPDN CLEAR SHIFT-SUPER/SHIFT-SUB
SB3 B2+1 SET END TEST MARKER
SB2 0 INITIALIZE CHAR INDEX
* /--- BLOCK SC2 00 000 75/10/09 03.09
*
SC2 SA1 A0+B2 X1 = NEXT CHAR
SB2 B2+B1 INCREMENT CHAR COUNT
SX2 X1-KUP CHECK FOR SHIFT CODE
ZR X2,SCSHF
SX2 X1-KSUP CHECK FOR SUPERSCRIPT
ZR X2,SCSUP
SX2 X1-KSUB CHECK FOR SUBSCRIPT
ZR X2,SCSUB
LT B2,B3,SC2
EQ SC99 DONE
*
* SHIFT CODE (CANNOT BE LAST CHAR)
*
SCSHF SA1 A0+B2 NEXT CHAR
SB2 B2+B1 INCREMENT CHAR COUNT
SX2 X1-KSUP
ZR X2,SCSUP1 IF SHIFT-SUPER
SX2 X1-KSUB
ZR X2,SCSUB1 IF SHIFT-SUB
LT B2,B3,SC2
EQ SC99 DONE
*
SCSUP1 SX4 1 X4 = +1 FOR SHIFT-SUPER
EQ SCS1
SCSUB1 SX4 -1 X4 = -1 FOR SHIFT-SUB
EQ SCS1
* /--- BLOCK SCS1 00 000 75/10/01 03.46
*
SCS1 SA2 UPDN
IX6 X2+X4
SA6 A2 UPDATE SHIFT-SUPER/SUB COUNTER
SCS2 SA2 A0+B2
SB2 B2+B1
GE B2,B3,SC98 IF THIS CHAR IS LAST
SX3 X2-FONT CHECK FOR FONT CODE
ZR X3,SCS2
SX3 X2-ACCESS CHECK FOR ACCESS CODE
ZR X3,SCS2
SX3 X2-KUP CHECK FOR SHIFT CODE
NZ X3,SCS3
SA2 A0+B2 GET CHAR AFTER SHIFT
SB2 B2+B1
GE B2,B3,SC98 IF THIS CHAR IS LAST
SX3 X2-KSUP
ZR X3,SCSU JUMP IF SHIFT-SUPER
SX3 X2-KSUB
ZR X3,SCSD JUMP IF SHIFT-SUB
*
SCS3 SA2 A0+B2 SEE IF ONLY 1 SYMBOL
SB2 B2+B1
GE B2,B3,SC99 IF DONE
SX3 X2-KUP
NZ X3,SC2 IF NOT SHIFT
SA2 A0+B2
SB2 B2+B1
SX3 X2-KSUP
ZR X3,SCSU JUMP IF SHIFT-SUPER
SX3 X2-KSUB
ZR X3,SCSD JUMP IF SHIFT-SUB
LT B2,B3,SC2
EQ SC99 DONE
*
SCSU NG X4,SCSFIX IF SHIFT-SUB PRECEDED
SA1 A2 RESET ADDRESS POINTER
EQ SCS1 PROCESS ANOTHER SHIFT-SUPER
SCSD PL X4,SCSFIX IF SHIFT-SUPER PRECEDED
SA1 A2 RESET ADDRESS POINTER
EQ SCS1 PROCESS ANOTHER SHIFT-SUB
* /--- BLOCK SCSFIX 00 000 75/10/09 21.27
*
SCSFIX SA3 UPDN
BX4 -X4 COMPLEMENT
IX6 X3+X4
SA6 A3
NZ X3,SCSF1 IF NOT LEAVING MAIN LEVEL
SA1 A2 RESET ADDRESS POINTER
EQ SCS2 PROCESS THIS SHIFT-SUPER/SUB
*
SCSF1 SX3 A1+B1 ADDRESS OF 1ST SUPER/SUB +1
SX4 A2-B1 ADDRESS OF 2ND SUPER/SUB -1
IX6 X3-X4
PL X6,SCSF4 IF NO CHARS IN-BETWEEN
SB2 A0
SB2 A1-B2
SCSF2 SA1 A0+B2
BX6 X1
SA3 JJCHAR+B2 ALSO FIX CHAR COUNT BUFFER
BX7 X3
SA6 A1-B1 MOVE BACK ONE
SA7 A3-B1
SB2 B2+B1
SX3 A0+B2
IX6 X3-X4
NG X6,SCSF2
SB2 A0-B1
SB2 A2-B2 CHAR AFTER 2ND SUPER/SUB
SCSF3 SA1 A0+B2
BX6 X1
SA6 A1-3 MOVE BACK 3 CHARS
SA3 JJCHAR+B2 ALSO FIX CHAR COUNT BUFFER
BX7 X3
SB2 B2+B1
SA7 A3-3
LT B2,B3,SCSF3
SB3 B3-3 ADJUST END MARKER
SB2 A0+2
SB2 A2-B2 RESET TO NEXT CHAR
EQ SC2 RESUME
*
SCSF4 SA2 A0+B2 NO CHARS IN-BETWEEN
BX6 X2
SA6 A2-4 MOVE BACK 4 CHARS
SA3 JJCHAR+B2 ALSO FIX CHAR COUNT BUFFER
BX7 X3
SB2 B2+B1
SA7 A3-4
LT B2,B3,SCSF4
SB2 A0+B1
SB2 A1-B2 CHAR BEFORE 1ST SUPER/SUB
SB3 B3-4 ADJUST END MARKER
EQ SC2 RESUME
* /--- BLOCK SCSUP 00 000 75/09/24 19.28
*
*
* SUPERSCRIPT (CANNOT BE LAST CHAR)
*
SCSUP EQ SC2 *** NOTHING YET ***
*
* SUBSCRIPT (CANNOT BE LAST CHAR)
*
SCSUB EQ SC2 *** NOTHING YET ***
* /--- BLOCK SC90 00 000 75/10/09 03.28
*
*
SC90 SB2 0 NO CHARS
EQ SC99
SC98 SA2 UPDN CHECK SHIFT SUPER/SUB
ZR X2,SC99 DONE IF BACK ON MAIN LEVEL
SB2 A0 SET TO CODE AFTER THE SHIFT
SB2 A1-B2
SC98B SA1 A0+B2 MOVE BACK ONE CHAR
BX6 X1
SA3 JJCHAR+B2 ALSO FIX CHAR COUNT BUFFER
BX7 X3
SA6 A1-B1
SA7 A3-B1
SB2 B2+B1
LT B2,B3,SC98B
SB2 B2-1
SC99 SX6 0
SA6 A0+B2 ZERO FOR END TEST MARKER
SX6 B2
SA6 TJCOUNT RESET CHARACTER COUNT
*
SCEND SA1 TSPECS GET SPECS BITS AGAIN
LX1 BUMPSHFT
NG X1,SPECSB IF SHIFT CODE TO BE BUMPED
EQ PROCESS --- RETURN
*
*
UPDN BSS 1 SHIFT-SUPER=+1, SHIFT-SUB=-1
* /--- BLOCK SPECSNC 00 000 75/10/01 17.33
TITLE NO CANONICAL FORM
*
* 'GET ALL CHARACTERS, NO CANONICAL FORM.
*
*
SPECSNC SX6 0
SA6 JUDGE BE SURE OF ONE ZERO
SA2 TJCOUNT X2 = JUDGE COUNT
ZR X2,SPNCEND
SB1 1
*
* SET CHARACTER COUNTS
*
SA1 XNUMRUN BUFFER OF ASCENDING NUMBERS
BX0 X1
SB2 X2 B2 = CHARACTER COUNT
SA0 JJCHAR CHARACTER-COUNT BUFFER
RE B2
RJ =XECSPRTY
*
SA1 TBINPUT STARTING ADDRESS OF CHARS
SB3 10 B3 = CHARS LEFT IN WORD
SA1 X1 A1 = CURRENT INPUT ADDRESS
MX0 -6 6 BIT MASK
SA6 A6-B1 *** PRESET A6 TO 1 BEFORE START (PREJUDGE)
*
SPNC1 LX1 6 SHIFT TO GET NEXT CHARACTER
BX6 -X0*X1 MASK OFF REST
SA6 A6+B1 STORE IN NEXT JUDGE LOCATION
SB2 B2-B1 DECREMENT COUNT TO DO
ZR B2,SPNC2 JUMP IF DONE
SB3 B3-1
NZ B3,SPNC1 CHECK IF WORD EXHAUSTED
SA1 A1+1 BRING UP NEXT PACKED INPUT WORD
SB3 10 10 CHARACTERS PER WORD
EQ SPNC1
*
SPNC2 MX6 0 CLEAR OUT AN EXTRA WORD
SA6 A6+B1
*
SPNCEND SA1 TSPECS GET SPECS BITS AGAIN
LX1 BUMPSHFT
NG X1,SPECSB IF SHIFT CODE TO BE BUMPED
EQ PROCESS --- RETURN
*
*
ENDOV
* /--- BLOCK GETWORD 00 000 78/04/20 20.30
TITLE GETWORD
*
* -GETWORD-
*
* GET THE N-TH WORD OUT OF THE STUDENT ANSWER
* AND PUT INTO THE STATED BUFFER..
*
* GETWORD VAR0,VAR1,VAR2,VAR3
*
* VAR0 = WORD WANTED
* VAR1 = ADDRESS TO PUT WORD PACKED 10 CHARS PER WORD
* VAR2 = RETURN ACTUAL CHARACTER COUNT
* VAR3 = MAXIMUM ALLOWABLE NUMBER OF CHARACTERS
* (IF ABSENT, SET TO DEFAULT 10)
GETWDOV OVRLAY
*
SX6 4 ALWAYS FOUR ARGUMENTS HERE
RJ GETCODX GET THE FOUR GETVAR CODES
SA1 VARBUF+2 GET RETURN ADDRESS FIRST IN CASE OF ERROR
BX5 X1
NGETVAR
SX6 A1
SA6 VARBUF+2 SAVE THE ADDRESS
SA1 TJUGBUF
SX1 X1
ZR X1,GETERR IF NO JUDGE BUFFER
*
* NOW MAKE SURE ANSWER IN WORDS
SA3 TANSCNT
SX7 X3-1 NEED TO SUBTRACT ONE SINCE
SA7 A3 WORDGET ALWAYS ADDS ONE
RJ WORDGET
*
SA1 VARBUF GET NUMBER OF WORD USER DESIRES
BX5 X1
NGETVAR
BX6 X1
SA6 VARBUF SAVE FOR LATTER
*
SA2 TWCOUNT SEE IF ALL THINGS WITHIN BOUNDS
ZR X2,GETERR MAKE SURE THERE ARE STUDENT WORDS
NG X1,GETERR MAKE SURE AUTHOR HAS POSITIVE NUMBER
ZR X1,GETERR AND NON-ZERO NUMBER
IX3 X2-X1
NG X3,GETERR AND THAT AUTHORS NUMBER IN RANGE OF STU WDS
*
SA1 VARBUF+3 GET MAXIMUM NUMBER OF CHARS AUTHOR ALLOWS
BX5 X1
NGETVAR
BX6 X1
SA6 VARBUF+3 SAVE FOR LATER
*
SA1 VARBUF+1 GET STARTING ADDRESS OF WHERE TO STORE CHRS
BX5 X1
NGETVAR
SX6 A1
SA6 VARBUF+1 SAVE FOR LATER
*
SA0 A1 NOW DO BOUNDS TEST
SA1 VARBUF+3 GET MAX CHARS ALLOWED
RJ WORDS SO THAT MAXIMUM STORAGE ADDRESS WITHIN BNDS
* /--- BLOCK GETWORD 00 000 76/02/21 19.27
*
* NOW GET INFO ON STUDENT WORD
SA1 VARBUF GET WORD DESIRED AGAIN
SA1 JJXY-1+X1 15 BITS START, 15 BITS END CHAR CNT IN JUDG
MX0 45
LX1 15
BX2 -X0*X1 GET STARTING INDEX IN JUDGE BUFFER
LX1 15
BX3 -X0*X1 GET ENDING INDEX IN JUDGE BUFFER
IX6 X3-X2 GET DIFFERENCE BETWEEN FIRST AND LAST CHAR
SX6 X6+1 ADD ONE TO GET TRUE LENGTH
*
SA1 VARBUF+2 GIVE THE AUTHOR THE REAL CHARACTER COUNT
SA6 X1
*
SA1 VARBUF+3 GET MAXIMUM ALLOWED BY AUTHOR
IX7 X1-X6
PL X7,GETJJ MAKE SURE WITHIN LIMITS AUTHOR PROVIDES FOR
*
SX1 X1-1 NOW MUST FIX ENDING TO FIT BUFFER
IX3 X2+X1 SO, ADD START AND NUMBER PROVIDED FOR
*
* PACK UP THE CHARS IN AUTHORS BUFFER
GETJJ SB2 X2+JUDGE ABSOLUTE ADDRESS OF STARTING CHARACTER
SB3 X3+JUDGE ABSOLUTE ADDRESS OF LAST CHARACTER
SA3 VARBUF+1 GET ADDRESS OF AUTHOR WORD BUFFER
MX6 0 INITIALIZE PACKED CHARACTER WORD
SB1 54 STARTING SHIFT COUNT
*
GETLP SA1 B2 GET STUDENT CHARACTER
SB2 B2+1 INCREMENT
LX1 X1,B1 SHIFT CHARACTER INTO POSITION
BX6 X1+X6 BUILD THE PACKED WORD
SB1 B1-6 DECREMENT SHIFT COUNT
PL B1,GETON SEE IF 10 CHAR WORD FILLED
SA6 X3 STORE WORD AWAY
SX3 X3+1 AND GET READY FOR NEXT WORD
SB1 54
MX6 0
*
GETON LE B2,B3,GETLP LOOP UNTIL ALL CHARACTERS PACKED UP
ZR X6,PROCESS SEE IF NEED TO STORE LAST WORD
SA6 X3 STORE LAST WORD
EQ PROCESS
*
*
GETERR SA1 VARBUF+2 GET AUTHOR RETURN WORD
MX6 0
SA6 X1 STORE SOMETHING WRONG
EQ PROCESS
*
ENDOV
* /--- BLOCK GETMARK 00 000 78/04/20 20.35
TITLE GETMARK
* GETMARK ARG1,AGR2
* ARG1 = WORD INFORMATION WANTED ABOUT IN STUDENT RESPONSE
* ARG2 = INFORMATION RETURNED
* = -2 = NO MARKUP POSSIBLE
* = -1 = OUT OF RANGE OF STUDENT WORDS
* 0 = PERFECT WORD
* +N...ALL THE POSSIBLE MARK-UPS...
* BITS SET FROM BOTTOM
* 1=MISSING WORD BEFORE
* 2=OUT OF ORDER...MOVE LEFT
* 3=CAPITALIZATION ERROR ON FIRST LETTER
* 4=SPELLING ERROR
* 5=PART OF A BROKEN PHRASE
* 6=EXTRA WORD
* 7=SOMETHING MISSING AT END (ONLY FOR LAST WORD)
*
* /--- BLOCK GETMARK 00 000 78/04/20 20.37
GETMKOV OVRLAY
LX5 XCODEL GET RETURN ADDRESS FIRST
NGETVAR
SX6 A1
SA6 GETMSAV AND SAVE FOR LATER USE
SA2 TJUGBUF
SX2 X2
ZR X2,GETMNA IF NO JUDGE BUFFER
SA2 JJSBUFA GET CRITERION
ZR X2,GETMNA SEE IF REASONABLE
SA5 A5
NGETVAR GET WORD NUMBER WANTED
SA2 TWCOUNT SEE IF WORD IN BOUNDS
ZR X2,GETMERR
NG X1,GETMERR
ZR X1,GETMERR
IX5 X2-X1 WILL USE X5 ALSO NEAR END
NG X5,GETMERR
SA2 JJSBUFA+JJINF-1+X1 GET JUDGEMENT ON WORD
NG X2,GETMNA SEE IF REASONABLE
SX3 X2-ANTOT
PL X3,GETMNA
SA3 X2+MKBITS GET BIT SETTING FOR THIS ERROR
BX6 X3
SA4 GETMSAV GET ADDRESS OF RETURN BUFFER
SA6 X4
NZ X5,PROCESS EXIT IF NOT LAST WORD
SA2 JJSBUFA+JJINF+X1 GET AN ADDITIONAL WORD IF LAST
NG X2,GETMNA
SX3 X2-ANTOT
PL X3,GETMNA
SA3 X2+MKBITS SET MISSING WORD AT END BIT IN LAST WORD
BX6 X3+X6
SA6 X4
EQ PROCESS
*
GETMERR SX6 -1 WORD REQUESTED OUT OF RANGE
GETMER1 SA1 GETMSAV
SA6 X1
EQ PROCESS
*
GETMNA SX6 -2 ANSWER NOT JUDGED PROPERLY
EQ GETMER1
*
GETMSAV BSS 1 SAVE RETURN ADDRESS
*
ANTOT EQU 13 13 POSSIBILITIES
MKBITS DATA 00B GOOD WORD
DATA 40B EXTRA WORD
DATA 40B NOT IN VOCAB
DATA 10B MISSPELLED
DATA 02B OUT OF ORDER
DATA 12B MISSPELLED-OUT OF ORDER
DATA 01B MISSING WORD
DATA 11B MISSPELL-MISSING WORD
DATA 04B CAPITALIZATION ERROR
DATA 20B BROKEN PHRASE
DATA 06B CAP-OUT OF ORDER
DATA 05B CAP-MISSING WORD
DATA 100B MISSING WORD AT END
*
ENDOV
*
* /--- BLOCK GETLOC 00 000 78/04/20 20.43
*
TITLE GETLOC
*
* GETLOC COMMAND
*
* GETLOC ARG1,ARG2,ARG3,(ARG4,ARG5)
*
* GET THE SCREEN LOCATION OF STUDENT WORDS
* ARG1 = WORD WANTED
* ARG2 = STARTING X
* ARG3 = STARTING Y
* ARG4 = ENDING X --OPTIONAL
* ARG5 = ENDING Y --OPTIONAL
*
GETLCOV OVRLAY
*
SX6 5 ALWAYS FIVE ARGS (4,5 MIGHT BE DUMMY)
RJ GETCODX
*
SA1 VARBUF
BX5 X1
NGETVAR
BX6 X1 HOLDS WORD WANTED (ARG 1)
SA6 VARBUF
*
SA1 VARBUF+1
BX5 X1
NGETVAR
SX6 A1 GET ARG 2 ADDRESS
SA6 VARBUF+1
*
SA1 TJUGBUF
SX1 X1
ZR X1,LOCERR IF NO JUDGE BUFFER
*
SA1 VARBUF+2
BX5 X1
NGETVAR
SX6 A1 GET ARG 3 ADDRESS
SA6 VARBUF+2
*
SA1 TBSIZE ALLOW ONLY FOR NORMAL SIZE
NZ X1,LOCERR
*
*
SA3 TANSCNT MAKE SURE ANSWER IN WORDS
SX7 X3-1 NEED TO SUBTRACT ONE SINCE
SA7 A3 WORDGET ALWAYS ADDS ONE
RJ WORDGET
*
SA1 VARBUF GET NUMBER OF WORD USER WANTS
SA2 TWCOUNT SEE IF ALL THINGS WITHIN BOUNDS
ZR X2,LOCERR MAKE SURE THERE ARE STUDENT WORDS
NG X1,LOCERR MAKE SURE AUTHOR HAS POSITIVE NUMBER
ZR X1,LOCERR AND NON-ZERO
IX3 X2-X1
NG X3,LOCERR AND THAT AUTHORS NUMBER IN RANGE OF STU WDS
*
RJ FIRSTXY GET STARTING X AND Y
*
SA6 GETX SAVE ARROW X POSITION
SA7 GETY SAVE ARROW Y POSITION
SA2 TBMARG GET CURRENT MARGIN
BX7 X2 AND SAVE
SA7 GETMARG SINCE MUST RESET AT EXIT
SA6 A2 NOW SET MARGIN TO THAT AT ARROW
*
SA1 VARBUF GET WORD AUTHOR WANTS
SA2 JJXY-1+X1 GET ORIGINAL CHARACTER POSITION
MX3 -15
BX6 -X3*X2 ENDING CHAR
AX2 15
BX7 -X3*X2 STARTING CHAR
SX7 X7-1
SA7 NCHAR SAVE CHAR BEFORE START
SA6 GETLOC1 SAVE ENDING ADDRESS
*
* /--- BLOCK GETLOC 00 000 76/09/04 23.26
*
SA1 TBINPUT GET ADDRESS OF STUDENT CHAR STRING
SB1 X1
SB2 NCHAR
RJ SIMPLOT GET STARTING NX AND NY
*
SA1 NX GET X
BX6 X1
SA2 VARBUF+1
SA6 X2 STORE IN USER ARG2
SA1 NY GET Y
BX6 X1
SA2 VARBUF+2
SA6 X2 STORE IN USER ARG 3
*
*
SA1 VARBUF+3 GET 4TH ARG
ZR X1,GETRSET IF ZERO, THE 3-ARG OPTION AND DONE
*
BX5 X1
NGETVAR
SX6 A1 GET ARG 4 ADDRESS
SA6 VARBUF+3
*
SA1 VARBUF+4
BX5 X1
NGETVAR
SX6 A1 GET ARG 5 ADDRESS
SA6 VARBUF+4
*
SA1 GETX GET X AT ARROW
BX6 X1
SA6 NX
SA2 GETY AND Y
BX7 X2
SA7 NY
*
SA1 TBINPUT
SB1 X1
SB2 GETLOC1 GET SAVED ENDING COUNT
RJ SIMPLOT GET ENDING X AND Y
*
SA1 NX GET ENDING X
BX6 X1
SA2 VARBUF+3
SA6 X2 STORE ENDING X IN ARG 4
SA1 NY GET ENDING Y
BX6 X1
SA2 VARBUF+4
SA6 X2 STORE IN ARG 5
*
GETRSET SA1 GETMARG GET ORIGINAL MARGIN IN OPERATION
BX6 X1 AT TIME OF GETLOC CALL
SA6 TBMARG
EQ PROCESS ON TO NEXT COMMAND
*
*
LOCERR SA1 VARBUF+1 GET AUTHOR RETURN WORD
SX6 -1
SA6 X1 STORE SOMETHING WRONG
EQ PROCESS
*
GETLOC1 BSS 1 HOLDS ENDING CHARACTER COUNT
GETX BSS 1 SAVED ARROW X+2...ALSO ARROW MARGIN
GETY BSS 1 SAVED ARROW Y
GETMARG BSS 1 SAVED MARGIN IN OPERATION AT TIME
* OF GETLOC CALL...MUST RESTORE AT EXIT
*
ENDOV
*
* /--- BLOCK END 00 000 76/05/13 21.13
*
*
OVTABLE
*
*
END ANS1$