ANSW1
* /--- FILE TYPE = E
* /--- BLOCK ANSW1 00 000 78/12/18 20.10
IDENT PLAT16$
LCC OVERLAY(PLATO,1,0)
END
IDENT ANSW1
TITLE -ANSW1-
*
*
CST
*
*
ANSW1$ OVFILE
*
*
EXT PROCESS IN FILE EXEC1
EXT ECSPRTY IN FILE ECSPRT
EXT WORDGET,GETJSYM IN FILE ANSWER
EXT EQTOLER IN FILE GETVAR
EXT NPUTVAR IN FILE GETVAR
EXT WRONG=,WRONGC= IN FILE EXEC1
EXT CKWORDX,ANSOUT IN FILE ANSWER
EXT TUTWRT,SIMPLOT,FIRSTXY,WHRFOUT
EXT OFFITR IN FILE TUTOUT
EXT GETCODX,BOUNDS IN FILE EXEC1
EXT CONTENT,CONTAB IN CONTEN
EXT FONTFLG,CSSPERM IN FILE CONTEN
EXT WRONGA= IN EXEC1
EXT WORDS,GETOP,UNUM
EXT CSLOAD,LOADFLG IN AUTLOAD
*
*
HASHBTS EQU 27 TOP 27 BITS CAN BE CONSIDERED A HASH
SYNBITS EQU 10 BITS NEEDED FOR BASE SYNONYM NUMBER
PSTART EQU 27 LEFT SHIFT TO PHRASE START BIT
SPINFOB EQU 15 SPELLING FITNESS BITS
*
*
* /--- BLOCK ANS1 00 000 78/12/18 20.11
TITLE ANSWER/WRONG COMMAND EXECUTION ROUTINE
NANSOV OVRLAY
*
* -A5- NOT TOUCHED FOR ENTIRE ROUTINE
*
*
RJ WORDGET GET STUDENT ANSWER INTO -CONTENT- WORDS
*
*
AREDO AX5 12 GET RID OF COMMAND CODE
*
SX6 -1 SET TO START AT FIRST STUDENT WORD
SA6 AREGB1
SA6 ANYFIND NEG IF NO WORD EVER MATCHED
*
ZERO ABUFW,JJSENB ZERO OUT JUDGEMENT WORDS
*
MX6 48
BX7 -X6*X5 GET KEYWORD COUNT IN THIS ANSWER
SA7 AKEYWDS
AX5 12
BX1 -X6*X5 GET NUMBER OF AUTHOR WORDS
SB3 X1 B3 HOLDS REMAINING AUTHOR WORDS TO LOOK AT
AX5 12 GET RELATIVE START OF WORDS IN ECS
MX6 42
BX7 -X6*X5
*
SA2 ECSXSTO ABSOLUTE ADDRESS OF START OF ECS EXTRA STOR
IX0 X2+X7 NOW HAVE ABSOLUTE STARTING ADDRESS OF WORDS
*
AX5 18 SEE IF SYNONYMOUS ANSWER FOLLOWING
MX6 0
ZR X5,ASTO
IX6 X0+X1 THEN GET ABSOLUTE ECS ADDRESS OF SYN ANSWER
ASTO SA6 ASFLAG
*
ZR B3,ABLANK SEE IF BLANK AUTHOR ANSWER
*
SA3 TWCOUNT SEE IF BLANK STUDENT ANSWER
ZR X3,ABLANK0
*
SA0 AWORK SET TILL RUN OUT OF AUTHOR WORDS
MX6 0
SA6 ALIST INITIALIZE TO MAIN LIST
SA6 ASPELL SET TO NO MISSPELLED KEYWORDS
SA6 ATAKEN NO WORDS OUT OF CIRCULATION YET
*
*
* B2 = LAST STUDENT WORD TO SEARCH (DOES WRAP AROUND SEARCH
* OF STUDENT WORDS)
* B3 = NUMBER OF REMAINING AUTHOR WORDS
* A0 = POINTS TO -WORK- BUFFER
* X0 = ADDRESS OF NEXT AUTHOR WORD
*
*
* /--- BLOCK ALOOP 00 000 78/02/13 17.04
ALOOP GT B3,B0,ALOOP1 SEE IF RUN OUT OF AUTHOR WORDS
SA3 ALIST SEE IF IN A SUB LIST
ZR X3,ADONE IF NOT, THEN ALL DONE
SX6 1
IX0 X3+X6 RE-ESTABLISH AND INCREMENT ECS POINTER
SA4 ALISTCT GET BACK REMAINING LIST COUNT
SB3 X4-1
MX6 0
SA6 A3 AND SET FLAG TO WORKING ON MAIN LIST
EQ ALOOP
*
ALOOP1 RE 2 GET IN NEXT AUTHOR WORD
RJ ECSPRTY
*
SA3 A0 GET AUTHOR WORD
PL X3,AWORD SEPARATE MAIN LIST FROM SUB LIST
*
ALOOP2 BX6 X3 SAVE MAIN LIST INFO WORD
SA6 AMAIN
BX6 X0 SAVE ECS POINTER
SA6 ALIST
SX7 B3 SAVE REMAINING COUNT
SA7 ALISTCT
*
LX3 1 NOW GET SUB-LIST
AX3 31 GET UNIT NUMBER
SA4 ECSULOC GET ECS ADDRESS OF -ULOC- TABLE
IX0 X3+X4
+ RE 1 READ IT IN
RJ ECSPRTY
SA4 A0 GET ENTRY
NG X4,PROCESS SOMETHING WRONG...JUST SKIP THIS COMMAND
*
BX0 X4
AX0 60-ULOC1 TOP BITS ARE BIAS TO REL LOCATION IN BIN
SA3 ECSLES GET ECS ADDRESS OF LESSON
IX0 X0+X3 NOW HAVE ABSOLUTE ECS ADDRESS
LX4 ULOC1+ULOC2+ULOC3+ULOC4 NOW GET THE LENGTH
MX5 60-ULOC4
BX7 -X5*X4
SB3 X7
EQ ALOOP NOW BACK TO LOOP
*
*
*
AWORD SB3 B3-2 DECREMENT NUMBER OF REMAINING AUTHOR WORDS
SX6 2
IX0 X0+X6 INCREMENT AUTHOR WORD ECS POINTER
SA4 A0+1 BRING UP SECOND PART OF AUTHOR WORD
*
SA1 AREGB1 START SEARCHING AT THIS STUDENT WORD
SA2 TWCOUNT AND TO END OF STUDENT WORDS
SB1 X1 THIS DOES BETTER ORDERING JOB WHEN
SB2 X2 AUTHOR ANSWER HAS DUPLICATE WORDS
*
*
ASLOOP SB1 B1+1 INCREMENT STUDENT POINTER
GE B1,B2,ASDONE SEE IF DONE WITH STUDENT WORDS
*
* /--- BLOCK AWORD 00 000 76/04/08 14.28
SA1 ATAKEN SEE IF THIS WORD ALREADY OUT OF CIRCULATION
LX1 X1,B1
PL X1,ASL1
SA1 TSPECS SEE IF SPECS EXORDER
LX1 EXORDER
PL X1,ASLOOP
MX7 60-SYNBITS THEN MUST NOT ALLOW IGNORE WORDS
BX2 X4 TO GO BEYOND THEIR KEYWORD FIELDS
SA1 ALIST SEE IF IN LIST
ZR X1,ASL0
BX2 X1
ASL0 BX1 -X7*X2 SEE IF KEYWORD OR IGNORE
NZ X1,ASLOOP TRY FOR ANOTHER AUTHOR WORD
EQ ALOOP DO NOT LET IGNORE (EXORDER) GO PAST KEYWORD
*
ASL1 SA1 JJSBUF+B1 GET FIRST PART OF STUDENT WORD
SA2 JJHBUF+B1 GET SECOND PART
RJ CKWORDX SEE IF NO MATCH, PERFECT MATCH, MISSPELLING
NG X6,ASLOOP NO MATCH...ON TO NEXT WORD
SA6 ANYFIND SOMETHING
*
SA1 TSPECS SEE IF SPECS EXORDER
LX1 EXORDER
PL X1,ASLOOP1
MX7 60-SYNBITS THEN MUST NOT ALLOW IGNORE WORDS
BX2 X4
SA1 ALIST SEE IF IN LIST
ZR X1,ASL11
BX2 X1
ASL11 BX1 -X7*X2 TO GET IN FRONT OF PRECEEDING KEYWORDS
NZ X1,ASLOOP1
SA1 AREGB1 SEE IF ANY PREVIOUS MATCHED KEYWORD
NG X1,ASLOOP1
SX2 B1
IX2 X1-X2
PL X2,ASLOOP
*
*
ASLOOP1 BX7 X4 SEE IF WORD PART OF A PHRASE
LX7 PSTART
MX5 3
BX5 X5*X7
NZ X5,APHRASE
*
NZ X6,ASP SEE IF MISSPELLING
*
*
BX6 X4 ---PERFECT MATCH---
*
SA1 ALIST SEE IF IN LIST
ZR X1,AST
SA2 AMAIN IN WHICH CASE, MUST GET AUTHOR INFO WORD
BX6 X2
*
AST MX7 60-SYNBITS GET ONLY THE AUTHOR INFO BITS HERE
BX6 -X7*X6
MX7 1 SET TOP BIT OF PERFECT MATCH
BX7 X6+X7
SA7 ABUFW+B1 STORE AUTHOR WORD INFO
*
*
*
ARATTLE MX7 60-SYNBITS FOR PERFECT MATCH, SKIP ANY OTHER
BX5 -X7*X6 KEYWORDS OF THIS COUNT
ZR X5,ASLOOP BUT GO THRU ALL STUDENT WORDS IF IGNORE
*
* X5 AND X7 USED ALL THE WAY TO -AROLL1-
*
MX6 1 TAKE THIS WORD OUT OF CIRCULATION
LX6 59
AX6 X6,B1
LX6 1
SA1 ATAKEN
BX6 X1+X6
SA6 A1
*
CX6 X6 SEE IF ALL WORDS TAKEN BY KEYWORDS
SA1 TWCOUNT
BX6 X1-X6
ZR X6,ADONE
* /--- BLOCK AWORD 00 000 76/04/08 14.28
*
* /--- BLOCK AWORD 00 000 75/07/28 03.03
SX6 B1 SAVE THIS LOCATION FOR START OF
SA6 AREGB1 NEXT SEARCH ON STUDENT WORDS
*
SA1 ASPELL MUST CLEAR OUT ANY PREVIOUS MISSPELLED
ZR X1,ARATT KEYWORD OF SAME GROUP OF SYNONYMS
SX2 ABUFW+B1 SEE IF THIS SAME WORD
BX2 X1-X2
ZR X2,ARAT
SA2 X1 GET PREVIOUS MISSPELLING
BX2 -X7*X2 GET KEYWORD COUNT
BX2 X2-X5 IS IT DIFFERENT FROM THIS TIME
MX6 0
NZ X2,ARAT IF SAME, MUST CLEAR OUT PREVIOUS
SA6 A2 SO THAT WORD IS NOT TAKEN
ARAT MX6 0
SA6 A1 KILL SPELL FLAG
*
ARATT SA1 TSPECS SEE IF SPECS EXORDER
LX1 EXORDER
PL X1,ARO
AEO SB1 B1+1 GET JUDGEMENT ON REST OF STUDENT WORDS
GE B1,B2,ARO
SA1 ABUFW+B1
ZR X1,AEO
BX1 -X7*X1
NZ X1,AEO SEE IF THIS AN IGNORE WORD
MX6 0
SA6 A1 KILL SINCE IT IS OUT OF ORDER
EQ AEO
*
ARO SA3 ALIST BACK OUT OF LIST IF IN ONE
ZR X3,AROLL
SX6 1
IX0 X3+X6 INCREMENT ECS POINTER
SA4 ALISTCT GET MAIN AUTHOR WORD COUNT
SB3 X4-1 DECREMENT AUTHOR WORD COUNT
MX6 0
SA6 A3 KILL LIST FLAG
*
AROLL LE B3,B0,ADONE SEE IF EXHAUSTED ALL AUTHOR WORDS
+ RE 2 GET NEXT AUTHOR WORD
RJ ECSPRTY
SA3 A0 BRING UP TO CM
NG X3,AROLL1 SEPARATE MAIN WORDS FROM LIST
SA4 A0+1 GET AUTHOR INFO WORD
BX1 -X7*X4 GET THIS AUTHOR KEYWORD COUNT
BX2 X1-X5 SEE IF SAME AS MATCHED WORD
NZ X2,AWORD STOP SKIPPING WHEN FIND DIFFERENT NUMBER
SB3 B3-2 DECREMENT AUTHOR WORD COUNT
SX6 2
IX0 X0+X6 INCREMENT ECS POINTER
EQ AROLL TRY TO SKIP ANOTHER WORD
*
AROLL1 BX1 -X7*X3 GET AUTHOR KEYWORD COUNT
BX2 X1-X5 SEE IF THE NUMBER SKIPPING
NZ X2,ALOOP2 EXIT IF DIFFERENT
SB3 B3-1 DECREMENT AUTHOR WORD COUNT
SX6 1
IX0 X0+X6 INCREMENT ECS POINTER
EQ AROLL
*
*
*
*
*
* /--- BLOCK ASP 00 000 76/04/19 02.36
ASP BX7 X4 ---MISSPELLED WORD---
SA1 ALIST SEE IF IN LIST
ZR X1,ASP1
SA2 AMAIN
BX7 X2
ASP1 MX5 60-SYNBITS GET ONLY AUTHOR INFO HERE
BX7 -X5*X7
*
SA1 ABUFW+B1 MUST SEE IF THIS STUDENT WORD ALREADY
ZR X1,ASP2 MISSPELLED
BX2 X1 SPELL TAKES PRECEDENCE OVER BAD PHRASE
LX2 PSTART+1
NG X2,ASP2
AX1 60-SPINFOB GET SPELLING FITNESS
IX1 X6-X1 IF SO, THEN MUST SEE IF THIS BETTER SPELL
PL X1,ASLOOP IF PREVIOUS EQUAL OR BETTER, SKIP OUT
*
ASP2 LX6 60-SPINFOB SHIFT SPELLING FITNESS UP
BX6 X6+X7 POSITIVE WORD WITH FITNESS AND INFO
NZ X7,ASP3 SEPARATE KEYWORDS FROM IGNORE WORDS
SA6 ABUFW+B1 STORE MISSPELLED IGNORE WORD JUDGEMENT
MX6 0
SA6 ASPELL KILL THE KEYWORD SPELL FLAG
EQ ASLOOP AND ON TO NEXT STUDENT WORD
*
ASP3 SA1 ASPELL SEE IF PREVIOUS MISSPELLING IN THIS
ZR X1,ASP5 SYNONYMOUS GROUP OF KEYWORDS
SA2 X1 GET ADDRESS OF PREVIOUS MISSPELLING
BX1 -X5*X2 GET KEYWORD COUNT
BX1 X1-X7 SEE IF SAME COUNT AS THIS KEYWORD
NZ X1,ASP5 ONLY INTERESTED IN SAME COUNT
IX1 X6-X2 SEE WHICH IS CLOSEST MISSPELLING
PL X1,ASLOOP PREVIOUS AS GOOD OR BETTER
MX7 0
SA7 A2 CLEAR OUT PREVIOUS WORDS JUDGEMENT
* SINCE ONLY ONE JUDGEMENT PER KEYWORD GROUP
ASP5 SA6 ABUFW+B1 AND FINALLY STORE WORD JUDGEMENT
SX7 A6 SAVE THIS LOCATION AS PREVIOUS MISSPELL FLG
SA7 ASPELL
EQ ASLOOP CONTINUE THROUGH STUDENT WORDS
*
*
* /--- BLOCK APHRASE 00 000 77/11/24 12.38
* ---PHRASE---
APHRASE PL X5,ABADPH PASS ONLY START OF PHRASE
*
MX7 0 CLEAR PHRASE SPELLING FLAGS
SA7 APHSPL CAN ONLY BE 40 STUDENT WORDS
SA7 APHSPC CLEAR CAP FLAGS
SA7 APHSPC1 CLEAR CAP FLAGS NOT OK BY SPECS OKCAP
*
ZR X6,APH1 SEE IF PERFECT MATCH
*
MX7 1 SET UP PROPER BIT
LX7 59
AX7 X7,B1 SET A BIT FOR THIS WORD
LX7 1
SA7 APHSPL SET SPELL FLAG
SX6 X6-3 SEE IF CAPITALIZATION ERROR
PL X6,APH1
SA7 APHSPC SET CAP FLAG
SX6 X6+2
ZR X6,APH1 SEPARATE SPECS OKCAPS TYPES
SA7 APHSPC1 NOT OK BY SPECS OKCAPS
*
APH1 BX6 X0 SAVE ECS POINTER
SA6 APREGX0
SX6 B3 SAVE REMAINING AUTHOR WORDS
SA6 APREGB3
SX6 B1 SAVE STUDENT WORD POINTER
SA6 APREGB1
*
APLOOP SB1 B1+1 INCREMENT TO NEXT STUDENT WORD
GE B1,B2,ANOPH SEE IF CAN CONTINUE
*
SA1 ATAKEN SEE IF THIS WORD ALREADY OUT OF CIRCULATION
LX1 X1,B1
NG X1,ANOPH
*
SA1 JJSBUF+B1 GET NEXT STUDENT WORD
SA2 JJHBUF+B1
LE B3,B0,ANOPH SEE IF CAN GET AUTHOR WORD
+ RE 2
RJ ECSPRTY
SA3 A0 GET AUTHOR WORDS
SA4 A0+1
SX6 2
IX0 X0+X6
SB3 B3-2
*
RJ CKWORDX SEE IF WORDS MATCH
*
NG X6,ANOPH OUT IF NO MATCH
*
SA6 ANYFIND SOMETHING
*
ZR X6,APL2 PASS PERFECT MATCHES
*
* /--- BLOCK APHRASE 00 000 78/08/28 22.56
MX5 1 MISSPELLING HERE
LX5 59
AX5 X5,B1 SET A BIT FOR THIS WORD
LX5 1
SA1 APHSPL GET SPELL FLAGS
BX7 X5+X1
SA7 A1
SX6 X6-3 SEE IF CAPITALIZATION ERROR
PL X6,APL2
SA1 APHSPC
BX7 X5+X1
SA7 A1 SET CAP FLAG
SX6 X6+2
ZR X6,APL2 SEPARATE CAP TYPES
SA1 APHSPC1 SET BIT FOR TYPE NOT OK BY SPECS OKCAPS
BX7 X5+X1
SA7 A1
*
*
*
APL2 BX5 X4 SEE IF MIDDLE OF PHRASE
LX5 PSTART+1
NG X5,APLOOP LOOP UNTIL FIND END
*
* PERFECT MATCH TO A PHRASE
SA1 ALIST SEE IF IN LIST
ZR X1,APD
SA1 AMAIN GET AUTHOR INFO
MX7 60-SYNBITS
BX1 -X7*X1
BX4 X4+X1 AND PUT INTO THIS WORD
*
APD SA1 APREGB1 GET POSITION OF START OF PHRASE
SB3 B1 GET END OF PHRASE
SB1 X1 START OF PHRASE
SX5 B3-B1
SX5 X5+1 GET NUMBER OF WORDS IN PHRASE
*
*
MX2 1 GET PHRASE BITS RIGHT
LX2 60-PSTART SET PHRASE START BIT
BX7 X4+X2 COMBINE AUTHOR INFO WITH PHRASE BITS
AX2 2 KILL PHRASE END BIT (THIS WORD IS
BX7 -X2*X7 THE END OF PHRASE WORD)
* FIRST OF PHRASE WORD NOT AS IGNORE WORD
*
MX3 1 SEE IF PERFECT OR MISSPELLED
SA1 APHSPL GET MISSPELL FLAGS
LX2 X1,B1 SEE IF THIS WORD MISSPELLED
NG X2,APD1S NEGATIVE MEANS MISSPELLED
BX7 X3+X7
EQ APD1
*
APD1S SA1 APHSPC SEE IF CAP ERROR
LX2 X1,B1
NG X2,APD1C
SX2 1
LX2 60-SPINFOB+2 GUARANTEE SOMETHING IN SPELL FIELD
BX7 X2+X7
EQ APD1
*
APD1C MX2 SPINFOB CLEAR OUT SPELL AREA
BX7 -X2*X7
MX2 1 PUT A ONE INTO SPELL AREA
SA1 APHSPC1 SEPARATE SPECS OKCAPS TYPES
LX1 X1,B1
PL X1,APD1CC
SX2 1 PUT A TWO INTO SPELL AREA
APD1CC LX2 60-SPINFOB+1 PUT A 1 OR 2 IN SPELL AREA
BX7 X7+X2
*
* /--- BLOCK APHRASE 00 000 78/08/28 22.23
APD1 SA7 ABUFW+B1 STORE THIS WORD JUDGEMENT FOR FIRST OF PHR
*
SA2 ASPELL SEE IF SHOULD KILL SPELL FLAG
ZR X2,APDLY
SX7 ABUFW+B1 GET THIS ADDRESS
IX7 X2-X7
NG X7,APDLY IS PREVIOUS MISSPELLING EARLIER
SX7 ABUFW+B3 GET LAST POSSIBLE ADDRESS
IX7 X7-X2 IS PREVIOUS MISSPELLING LATER
NG X7,APDLY
MX7 0
SA7 A2
*
APDLY SA2 ATAKEN SET BITS TO TAKE THESE WORDS OU OF CIRC
MX7 1 TAKE THIS WORD OUT OF CIRCULATION
LX7 59
AX7 X7,B1
LX7 1
BX7 X2+X7 COMBINE WITH PREVIOUS SET BITS
*
APDL SB1 B1+1 STORE JUDGEMENT FOR REST OF PHRASE WORDS
*
MX6 1 TAKE THESE WORDS OUT OF CIRCULATION
LX6 59
AX6 X6,B1
LX6 1
BX7 X6+X7
*
SA1 APHSPL SEE IF SPELL FLAG
LX2 X1,B1 GET SPELLING JUDGEMENT
NG X2,APDLS NEGATIVE MEANS MISSPELLED
BX6 X3+X4 SET PERFECT BIT
EQ APDLZ
*
APDLS SA1 APHSPC SEE IF CAP ERROR
LX2 X1,B1
NG X2,APDLC
SX2 1
LX2 60-SPINFOB+2 GUARANTEE SOMETHING IN SPELL FIELD
BX6 X2+X4
EQ APDLZ
*
APDLC MX2 SPINFOB CLEAR OUT SPELL AREA
BX6 -X2*X4
MX2 1 PUT A 1 IN SPELL AREA
SA1 APHSPC1 SEPARATE SPECS OKCAPS TYPES
LX1 X1,B1
PL X1,APDLCC
SX2 1 PUT A 2 INTO SPELL AREA
APDLCC LX2 60-SPINFOB+1 PUT A 1 OR 2 IN SPELL AREA
BX6 X6+X2
*
APDLZ SA6 ABUFW+B1 THIS WORD HAS ONLY END OF PHRASE BIT SET
LT B1,B3,APDL
*
SA7 A2 FINALLY SAVE BITS OF WORDS OUT OF CIRC
*
* /--- BLOCK ASDONE 00 000 79/05/02 14.44
*
* -X6- SHOULD NOT BE TOUCHED UNTIL -ARATTLE-
*
*
SA1 APREGX0 RESTORE REGISTERS TO JUST LIKE SINGLE WORD
BX0 X1 MATCH CASE SO CAN USE -ARATTLE-
SA1 APREGB3
SB3 X1
+ RE 2 GET ORIGINAL AUTHOR WORD BACK
RJ ECSPRTY
SA3 A0
SA4 A0+1
* B1 OK AS SET TO LAST WORD OF PHRASE
*
EQ ARATTLE DO WHAT PERFECT MATCH DOES
*
*
*
ANOPH SA1 APREGX0 NO PHRASE...SO RESTORE ALL REGISTERS
SX0 2
IX0 X1-X0 POINT TO ORIGINAL AUTHOR WORD
SA1 APREGB3
SB3 X1 AND ORIGINAL LENGTH
SA1 APREGB1
SB1 X1
+ RE 2 GET ORIGINAL AUTHOR WORD BACK
RJ ECSPRTY
SA3 A0
SA4 A0+1
*
SX1 2 ADJUST X0 TO BE LIKE AT START
IX0 X0+X1 OF PHRASE JUDGING
*
* SET THIS WORD TO BROKEN PHRASE
*
*
ABADPH BX6 X4
SA1 ABUFW+B1 EXIT IF OTHER JUDGMENT ALREADY
NZ X1,ASLOOP
SA1 ALIST SEE IF IN A LIST
ZR X1,ABADPH1
SA1 AMAIN GET MAIN LIST INFO
BX6 X1
ABADPH1 MX7 60-SYNBITS
BX6 -X7*X6
MX7 2 SET JUDGEMENT TO BROKEN PHRASE
LX7 60-PSTART-1 (FLAGGED BY HAVING MIDDLE AND END
BX6 X6+X7
SA6 ABUFW+B1 OF PHRASE BITS SET)
EQ ASLOOP ON TO NEXT STUDENT WORD
*
*
*
ASDONE SA2 AREGB1 SEE IF DONE WITH STUDENT WORDS
NG X2,ALOOP IF NEGATIVE, DID ALL ALREADY
SB2 X2
LE B1,B2,ALOOP SEE IF ALREADY DID WORDS BEFORE LAST MT
SB1 -1 DO WORDS BEFORE LAST PERFECT MATCH
EQ ASLOOP
*
*
* /--- BLOCK ADONE 00 000 76/06/26 16.14
TITLE
* THE FOLLOWING SETS A CRITERION ON THE STUDENT ANSWER.
* CRITERION = +4 FOR EVERY KEYWORD IN ORDER
* +3 FOR KEYWORD OUT OF ORDER
* OR FOR CAPITALIZATION ERROR
* +2 FOR MISSPELLED KEYWORD
* OR FOR CAP AND OUT OF ORDER ERROR
* +1 FOR MISSPELLED KEYWORD OUT OF ORDER
* ALSO, THE JUDGE BUFFER IS CHANGED TO THE FOLLOWINGIN
* PREPARATION FOR ERROR FEEDBACK TO STUDENT.
*
* 0 FOR GOOD WORD
* 1 FOR UNFOUND WORD (XXX-OUT)
* 2 FOR NOT IN VOCABULARY (UUU-OUT)
* 3 FOR MISSPELLED WORD (===-OUT)
* 4 FOR OUT OF ORDER (MOVE LEFT)
* 5 FOR MISSPELLED, OUT OF ORDER
* 6 FOR OUT OF SEQUENCE (INSERT BEFORE)
* 7 FOR MISPELLED, OUT OF SEQUENCE
* 8 FOR BAD CAPITALIZATION (POINT UP FIRST LETTER)
* 9 FOR BROKEN PHRASE
* 10 FOR BAD CAPITALIZATION, OUT OF ORDER
* 11 FOR BAD CAPITALIZATION, OUT OF SEQUENCE
* 12 FOR WORDS MISSING AT THE END OF ANSWER (SPECIAL CASE)
* 12 IS EXTRA WORD AT END OF BUFFER
*
* /--- BLOCK ADONE 00 000 76/03/01 13.42
*
*
ADONE SA1 ANYFIND SEE IF ANY WORDS MATCHED
NG X1,AMORE IF NOT, THEN EXIT IMMEDIATELY
*
SB1 B0 INITIALIZE STUDENT WORD POINTER
SA1 TWCOUNT GET NUMBER OF STUDENT WORDS
SB2 X1
SB3 B0 WILL HOLD COUNT OF KEYWORDS
MX7 0 NO ERRORS YET (BAD BITS)
SA1 TSPECS
BX0 X1 X0 HOLDS SPECS BITS
MX4 0 CRITERION
MX5 0 HIGHEST KEYWORD YET FOUND (FOR ORDER CK)
SA0 B0 NO FATAL ERRORS YET
*
* A0 HOLDS FATAL ERROR FLAG
* B1 HOLDS STUDENT WORD CURRENTLY ON
* B2 HOLDS NUMBER OF STUDENT WORDS
* X0 HOLDS SPECS BITS
* X4 HOLDS CRITERION
* X5 HOLDS HIGHEST KEYWORD YET FOUND
* X7 HOLDS BAD BITS
*
*
ADONEL SA1 ABUFW+B1 GET JUDGEMENT WORD
NZ X1,AREAL SOMETHING THERE
*
MX6 1 SET -EXTRA- WORD FLAG
LX6 60-JFEXTRA
BX7 X7+X6
*
BX6 X0
LX6 OKEXTRA SEE IF EXTRA WORDS OK
NG X6,ALOK
SX6 1
EQ ALSTORE
*
*
AREAL BX2 X1 SEE IF MIDDLE/END OF PHRASE
LX2 PSTART+2 BOTH HAVE THE END PHRASE BIT SET
NG X2,AIGNOR PASS FIRST WORD, TREAT REST AS IGNORE
*
MX6 60-SYNBITS MASK FOR COMMAND INFO
BX2 -X6*X1 GET INFO
ZR X2,AIGNOR SEE IF IGNORE WORD, PASS KEYWORDS
*
SB3 B3+1 KEEP COUNT OF KEYWORDS FOUND
*
IX3 X5-X2 COMPARE THE KEYWORD NUMBER WITH HIGHEST YET
PL X3,AKOOR SEE IF OUT OF ORDER
BX5 X2 SAVE THIS NEW HIGH
*
*
SX3 X3+1 SEE IF OUT OF SEQUENCE (IF JUMP BY MORE
NZ X3,AKOS THAN ONE KEYWORD)
*
* /--- BLOCK ADONE 00 000 76/06/26 16.15
AKO PL X1,AKSP SEPARATE PERFECTS FROM MISSPELLINGS
*
AKOK SX4 X4+4 ADD 4 TO CRITERION
EQ ALOK
*
AKOOR MX6 1 SET BAD ORDER BIT
LX6 60-JFORDER
BX7 X7+X6
BX6 X0
LX6 NOORDER SEE IF SPECS -NOORDER-
NG X6,AKO NOORDER
NG X1,AKOORR CHECK SPELLING
AX1 60-SPINFOB SEE IF CAPITALIZATION ERROR
SX1 X1-3
PL X1,AKOOR1
MX6 1 SET BAD CAP BIT
LX6 60-JFCAP
BX7 X6+X7
SX1 X1+2 LIMIT SPECS OKCAP
NZ X1,AKOOR0
BX6 X0
LX6 OKCAP SEE IF OKCAP
NG X6,AKOORR
AKOOR0 BX6 X0 SEE IF OKSPELL
LX6 OKSPELL
NG X6,AKOORR
SX6 10 OUT OF ORDER AND CAPITALIZATION ERR
SX4 X4+2 GIVE 2 POINTS
EQ ALSTORE
AKOOR1 MX6 1 SET SPELL BAD BIT
LX6 60-JFSPELL
BX7 X7+X6
AKOOR2 BX6 X0
LX6 OKSPELL
NG X6,AKOORR
SX6 5 MISSPELLED KEYWORD OUT OF ORDER
SX4 X4+1 ONLY 1 FOR MISSPELL KEYWORD OUT OF ORDER
EQ ALSTORE
AKOORR SX6 4 SET TO SHOW OUT OF ORDER ARROW
SX4 X4+3 INCREASE CRITERION
EQ ALSTORE
*
* /--- BLOCK ADONE 00 000 76/06/14 01.19
*
* OUT OF SEQUENCE (STUDENT MISSED A WORD)
AKOS MX6 1 SET BAD ORDER BIT
LX6 60-JFORDER
BX7 X7+X6
BX6 X0
LX6 NOORDER SEE IF SPECS -NOORDER-
NG X6,AKO NOORDER
NG X1,AKOS3 CHECK SPELLING
AX1 60-SPINFOB SEE IF CAPITALIZATION ERROR
SX1 X1-3
PL X1,AKOS1
MX6 1 SET BAD CAP BIT
LX6 60-JFCAP
BX7 X6+X7
SX1 X1+2 LIMIT OKCAP
NZ X1,AKOS0
BX6 X0
LX6 OKCAP SEE IF OKCAP
NG X6,AKOS3
AKOS0 BX6 X0 SEE IF OKSPELL
LX6 OKSPELL
NG X6,AKOS3
SX6 11 OUT OF SEQUENCE AND CAPITALIZATION
SX4 X4+2
EQ ALSTORE
AKOS1 MX6 1 SET SPELL BAD BIT
LX6 60-JFSPELL
BX7 X7+X6
AKOS2 BX6 X0
LX6 OKSPELL
NG X6,AKOS3
SX6 7 MISSPELLED KEYWORD OUT OF SEQUENCE
SX4 X4+2 ONLY 2 SINCE MISSPELLED
EQ ALSTORE
AKOS3 SX6 6 SET TO SHOW OUT OF SEQUENCE WEDGE
SX4 X4+4 INCREASE CRITERION BY FULL AMOUNT
EQ ALSTORE
* /--- BLOCK ADONE 00 000 76/06/26 16.15
*
*
AKSP AX1 60-SPINFOB SEE IF CAPITALIZATION ERROR
SX6 X1-3 SEE IF STUDENT WORD A NUMBER
ZR X6,AKSP4
PL X6,AKSP1
MX6 1 SET BAD CAP BIT
LX6 60-JFCAP
BX7 X6+X7
SX1 X1-1 LIMIT OKCAP
NZ X1,AKSP0
BX6 X0
LX6 OKCAP SEE IF OKCAP
NG X6,AKOK
AKSP0 BX6 X0
LX6 OKSPELL
NG X6,AKOK
SX4 X4+3 GIVE 3 POINTS FOR CAPITALIZATION ERROR
SX6 8 POINT OUT BAD CAPITALIZATION
EQ ALSTORE
AKSP1 MX6 1 SET SPELL BAD BIT
LX6 60-JFSPELL
BX7 X7+X6
BX6 X0
LX6 OKSPELL
NG X6,AKOK
SX4 X4+2 ONLY 2 FOR MISSPELLED KEYWORD
SX6 3 SET TO DISPLAY MISSPELLED WORD
EQ ALSTORE
*
AKSP4 MX6 1 A CLOSE NUMBER...FOR NOW JUST UNDERLINE
LX6 60-JFSPELL AND GIVE AUTHOR INFO LIKE MISSPELLING
BX7 X7+X6
SX4 X4+2 TREAT SAME A MISSPELLING
SX6 3 MISSPELLING MARKUP
EQ ALSTORE EVENTUALLY NEED SPECIAL NUMBER CASE
*
* IGNORE WORD CHECKING
AIGNOR NG X1,ALOK SEE IF PERFECT IGNORE
LX2 59 SEE IF BROKEN PHRASE
NG X2,ABRP
AX1 60-SPINFOB SEE IF CAPITALIZATION ERROR
SX1 X1-3
PL X1,AIS1
MX6 1 SET BAD CAP BIT
LX6 60-JFCAP
BX7 X6+X7
SX1 X1+2 LIMIT OKCAP
NZ X1,AIS0
BX6 X0
LX6 OKCAP SEE IF OKCAP
NG X6,ALOK
AIS0 BX6 X0
LX6 OKSPELL
NG X6,ALOK
SX6 8 POINT OUT BAD CAPITALIZATION
EQ ALSTORE
* /--- BLOCK ADONE 00 000 76/06/14 02.25
AIS1 MX6 1 SET SPELL BAD BIT
LX6 60-JFSPELL
BX7 X7+X6
BX6 X0
LX6 OKSPELL
NG X6,ALOK
SX6 3 SET TO DISPLAY MISSPELLED WORD
EQ ALSTORE
*
*
ABRP MX6 1 BROKEN PHRASE
LX6 60-JFPHRAS
BX7 X7+X6 SET BAD BIT
BX6 X0
LX6 OKEXTRA SEE IF IGNORE EXTRA WORDS
NG X6,ALOK
SX6 9 SHOW BROKEN PHRASE MARKUP
MX2 60-SYNBITS SEE IF BROKEN KEYWORD PHRASE
BX2 -X2*X1
ZR X2,ALSTORE
SX4 X4+1 IF SO, THEN ADD A LITTLE TO CRITERION
EQ ALSTORE
*
*
ALOK MX6 0 THIS WORD IS OK
SA6 A1 STORE AWAY THIS JUDGEMENT
EQ ALNXT
ALSTORE SA6 A1 STORE AWAY THIS JUDGEMENT
SA0 1 SET FATAL ERROR FLAG
*
ALNXT SB1 B1+1 INCREMENT WORD POINTER
LT B1,B2,ADONEL LOOP UNTIL FINISHED
* ** B2 NOT TO BE CHANGED UNTIL ABAD *******
*
MX6 0 CLEAR AN EXTRA WORD TO ZERO
SA6 ABUFW+B1 SPACE GUARANTEED BY -WORDGET-
* ** A6 NOT TO BE CHANGED TILL AFTER ABAD **
*
SA2 AKEYWDS SEE IF STUDENT HAS ENOUGH KEYWORDS
* * X2 AND X5 NOT TO BE TOUCHED TILL ABAD ***
SB1 X2
EQ B1,B3,ASJFLG SEE IF ANSWER ENTIRE
MX6 1 SET ENTIRE BAD BIT
LX6 60-JFENTIR
BX7 X6+X7
SA0 1 SET FATAL ERROR FLAG
*
ASJFLG SA7 TJFLAGS STORE JUDGEMENT FLAGS
*
SB1 A0
NZ B1,ABAD SEE IF FATAL ERROR FOUND
*
BX3 X2 GET COPY OF -AKEYWDS-
LX3 2 MULTIPLY BY 4
BX6 X3-X4 SEE IF STUDENT CRITERION THIS HIGH
ZR X6,AOK IF SO, PERFECT ANSWER
*
*
* ***SHOULD EVENTUALLY ADD TO CRITERION
* SETTING THE MATCH OF AUTHORS AND STUDENTS NUMBER OF KEYWORDS
* /--- BLOCK ADONE 00 000 78/06/09 14.50
*
ABAD SA1 JJSBUFA
IX3 X4-X1 SEE IF THIS JUDGEMENT BETTER THAN LAST BEST
NG X3,AMORE SEE IF SYNONYMOUS ANSWER FOLLOWING
*
IX3 X2-X5 SEE IF STUDENT NEEDS MORE WORDS AT END
ZR X3,ABAD1
BX3 X0 GET SPECS BITS
LX3 NOORDER SEE IF NOORDER IN OPERATION
NG X3,ABAD1 IN WHICH CASE, BETTER NOT DO ANYTHING
SX6 12 PUT WEDGE AFTER ANSWER
SA6 A6 SET UP ONE EXTRA DUMMY WORD
SA3 LONG GET LENGTH OF STUDENT INPUT
SX6 X3+1 ADD ONE (SINCE IT IS -1 AT ANSMARK)
LX6 15 GET INTO POSITION
SA6 JJXY+B2 STORE IN DUMMY WORD AT END
* THIS SPACE GUARANTEED BY WORDGET
*
ABAD1 BX6 X4
SA6 A1 STORE THIS CRITERION
SA7 A1+3 STORE BAD BITS
BX6 X2
SA6 A1+1 STORE NUMBER OF AUTHOR KEYWORDS
SX6 B2
SA6 A1+2 STORE NUMBER OF STUDENT WORDS
BX6 X0
SA6 A1+5 STORE SPECS BITS
*
SA0 ABUFW WRITE THESE BUFFERS OUT TO ECS
SA1 ATEMPEC GET TEMPORARY ECS SCRATCH BUFFER
BX0 X1 GET WORK ECS BUFFER
+ WE JJSENB
RJ ECSPRTY
SA0 JJSBUFA+JJINF MOVE INTO -A- BUFFER
+ RE JJSENB
RJ ECSPRTY
*
AMORE SA1 ASFLAG SEE IF THERE IS A FOLLOWING SYN ANSWER
ZR X1,PROCESS
BX0 X1 READ IN THIS ANSWER COMMAND INFO WORD
SA0 AWORK
+ RE 1
RJ ECSPRTY
SA1 A0
BX5 X1 IF SO, THEN FIX LIKE ORIGINAL CASE
EQ AREDO
*
*
* /--- BLOCK ADONE 00 000 78/06/09 14.52
*
ABLANK0 SA2 AKEYWDS SEE IF NO KEYWORDS IN AUTHOR
EQ ABLANK1
ABLANK SA2 TWCOUNT SEE IF STUDENT ANSWER BLANK
ABLANK1 NZ X2,AMORE SEE IF ANOTHER SYN AUTHOR ANS
MX7 0
SA7 TJFLAGS CLEAR JUDGE FLAGS
AOK SB7 XANSC SET TO ANSWER CONTINGENCY
MX6 0 CLEAR JUDGE BUFFER FLAG
SA6 JJSBUFA
SA5 A5 BRING UP COMMAND WORD
MX6 60-XCMNDL
BX5 -X6*X5 GET COMMAND CODE
SX7 WRONG= GET WRONG COMMAND NUMBER
IX7 X5-X7 BRANCH OFF WRONG
ZR X7,AWRONG
SX7 WRONGC= GET WRONGC COMMAND NUMBER
IX7 X5-X7 BRANCH OFF WRONGC
ZR X7,AWRONG
SX7 WRONGA= WRONGA COMMAND
IX7 X5-X7 BRANCH OFF WRONGA
ZR X7,AWRONG
SX6 -1 ANSWER COMMAND
SA6 TJUDGED
EQ PROCESS
AWRONG SX6 0 WRONG COMMAND
SA6 TJUDGED
EQ PROCESS
*
*
*
* /--- BLOCK ADONE 00 000 77/11/24 12.35
AMAIN BSS 1 AUTHOR MAIN LIST INFO WORD
ALIST BSS 1 MAIN LIST ECS ADDRESS AS SUB LIST FLAG
ALISTCT BSS 1 REMAINING COUNT OF MAIN LIST
AKEYWDS BSS 1 NUMBER OF AUTHOR KEYWORDS
AREGB1 BSS 1 HOLDS B1 OF LAST WORD MATCHED PERFECTLY
ASPELL BSS 1 -B1- INDEX OF PREVIOUS MISSPELLED KEYWORD
APREGX0 BSS 1 SAVED REG X0 FOR PHRASE CHECKING
APREGB1 BSS 1 SAVED REG B1 FOR PHRASE CHECKING
APREGB3 BSS 1 SAVED REG B3 FOR PHRASE CHECKING
APHSPL BSS 1 PHRASE SPELL FLAGS (CAN ONLY BE 40 STU WDS)
APHSPC BSS 1 PHRASE CAP FLAGS
APHSPC1 BSS 1 PHRASE CAP FLAGS NOT OK BY SPECS OKCAP
ATAKEN BSS 1 BITS SET TO TAKE WORDS OUT OF CIRCULATION
*
AWORK BSS 2 TWO WORD ECS READ-IN BUFFER
*
ABUFW BSS JJSENB JUDGMENT ON EACH WORD
ASFLAG BSS 1 FLAG TO TELL IF SYNONYMOUS ANSWER FOLLOWING
ANYFIND BSS 1 NEGATIVE IF NO WORDS MATCHED
*
*
ENDOV
* /--- BLOCK ANSWER 00 000 76/06/02 13.15
TITLE ANSWERA/WRONGA COMMAND EXECUTION
EJECT
*
* -ANSWERA- COMMAND (NUMBER 413)
* -WRONGA- COMMAND (NUMBER 433)
*
* THESE COMMANDS READ A CHARACTER STRING FROM STUDENT
* VARIABLES, CONTENT IT, AND COMPARE THE CONTENT
* WITH THE STUDENT ANSWER.
*
* SYNONYMOUS ANSWERS ARE NOT ALLOWED.
*
* USES'; A0,A1,A2,A3,A4,A6,A7
* ALL X
* B1,B2,B3
*
* MACROS'; NGETVAR
*
* CALLS'; WORDS, CSLOAD, CSULOAD, CONTENT,
* AUNAM,GETOP,UNUM,GETJSYM
*
ANSAOV OVRLAY
*
* MAKE SURE THE PROPER JUDGING SYMBOL SET IS
* IN CM.
*
SA1 TJSYM USER JUDGING SYMBOL SET NAME
SA2 CONTAB SET CURRENTLY IN CM
BX2 X1-X2 SEE IF SAME SET
ZR X2,ANSAXXX --- SAME SET, CONTINUE
RJ GETJSYM ELSE GET PROPER SET
ANSAXXX SA5 A5 RESTORE COMMAND WORD
LX5 XCODEL SHIFT UNIT ECS BIAS
MX3 -XCODEL
BX1 -X3*X5 EXTRACT UNIT ECS BIAS
SA2 ECSXSTO UNIT ECS BASE ADDRESS
SA0 ECSBUFA TEMP STORE ECS WORD
IX0 X1+X2 FORM UNIT ECS WORD ADDRESS
+ RE 1
RJ ECSPRTY
SA1 A0 RETRIEVE ECS WORD
BX5 X1 TO X5 FOR NGETVAR
LX5 XCODEL SHIFT BUFFER BIAS TO LOW ORDER
BX6 -X3*X5 EXTRACT WORDS BUFFER BIAS
SA6 A0 STORE FOR LATER
NGETVAR GET STRING ADDRESS INTO A1
SX6 A1 SAVE FOR LATER
SA6 SAVSSA
LX5 XCODEL SHIFT CHAR COUNT CODE
NGETVAR GET CHAR COUNT INTO X1
ZR X1,ERRBADL BAD NUMBER OF CHARS
SX3 X1-JUJLTH-1 CHECK FOR > *JUJLTH*
PL X3,ERRBADL BAD NUMBER OF CHARS
SX1 X1+0 CHECK FOR WIERD BIG NUMBERS
NG X1,ERRBADL BAD NUMBER OF CHARS
SX3 X1 SAVE COUNT OVER ',WORDS',
SA2 SAVSSA (X2) = ADDRESS OF STRING
SA0 X2
RJ WORDS CHECK BOUNDS
SB3 X3 RETRIEVE CHAR COUNT
SA2 A0 1ST WORD OF STRING
SA0 JJANSA TEMP STRING BUFFER
*
* CLEAR THE CHAR BUFFER
*
SA1 AZERBUF ADDRESS OF 0 WORDS IN ESM
BX0 X1
+ RE JUJLTH+1 CLEAR CHAR BUFFER
RJ ECSPRTY
**
* STUFF CHARACTERS FROM STRING INTO BUFFER
**
SB1 10 CHARS / WORD
MX0 -6 CHARACTER MASK
* /--- BLOCK ANSWER 00 000 78/12/18 20.12
SB2 B0 STORAGE INDEX
LACHAR LX2 6 POSITION NEXT CHAR
BX6 -X0*X2 EXTRACT IT
ZR X6,ZAPWORK EXIT IF 0 CHAR
SA6 A0+B2 STORE CHAR
SB2 B2+1
EQ B2,B3,ZAPWORK 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
ZAPWORK SA1 PREANSA CHAR BUFFER ADDRESS FOR LATER
ZERO CONBUF,CONBUFL CLEAR CONTENT WORDS
AATOP SX7 0
SA7 PHRASE NOT IN PHRASE
SX7 1 INITIALIZE';
SA7 KEYWDS - KEYWORD COUNT
SA7 WDTYPE - WORD TYPE
SA7 ATYPE - 0=IGNORE, 1=KEYWD, -1=SYN. KEYWD
*
AALOOP SX7 0
SA7 FONTFLG CLEAR FONT FLAG
SA7 CSSPERM CLEAR PERMANENT SUP/SUB BIAS
RJ CONTENT GET NEXT ELEMENT
NZ X7,ALOOPA SEE WHAT'7S THERE
SA4 PHRASE SEE IF IN PHRASE
ZR X4,ACK NO PHRASE, CONTINUE
EQ ERRPHR ERROR IF IN PHRASE
*
ALOOPA SX2 0 INITIALIZE PHRASE BITS
SX3 X1-COPASTR SET UP PHRASE CONTINUE TEST
SA4 PHRASE LOAD PHRASE FLAG
NZ X4,PHMIDDL SEE IF PHRASE STARTED
NZ X3,ALOOP1 NOT IN PHRASE OR STARTING ONE
SA2 PSTART STARTING PHRASE
MX4 1 SET PHRASE FLAG
EQ ALOOP1
* /--- BLOCK ANSWER 00 000 78/12/15 08.55
PHMIDDL NZ X3,PHEND IN PHRASE CHECK CONTINUATION
SA2 PMIDDLE IN MIDDLE OF PHRASE
EQ ALOOP1
PHEND SA2 PEND END OF PHRASE
SX4 0 CLEAR PHRASE FLAG
ALOOP1 BX7 X7+X2 ADD PHRASE BITS
SA2 WDTYPE GET WORD TYPE
BX7 X7+X2 ADD WORD TYPE
SA2 CONBUF CHECK FOR OVERFLOW
SX3 X2-JUJLTH-2
PL X3,ERRWDS TOO MANY CONTENT WORDS
SA6 X2+CONBUF+1 STORE CONTENT WORD
SA7 A6+1 STORE HASH WORD
SX6 X2+2 INCREMENT CONTENT WORD COUNT
SA6 CONBUF STORE CONTENT WORD COUNT
BX6 X4 MOVE PHRASE FLAG
SA6 A4 STORE PHRASE FLAG
SA2 ATYPE GET LOCATION IN COMMAND
ZR X2,ACK IGNORABLE WORDS
NG X2,ACK SYNONYMS
NZ X4,ACK IF IN PHRASE
SA2 KEYWDS INCREMENT NUMBER OF KEYWORDS
SX6 X2+1
SA6 KEYWDS STORE NUMBER OF KEYWORDS
SA6 WDTYPE AND WORD TYPE
ACK ZR X1,ADONE SEE IF END-OF-LINE
SX2 X1-COPCOMA .LT. 0 IS LETTER/NUMBER
NG X2,AALOOP NEXT ITEM IF LETTER/NUMBER
SA4 PHRASE GET PHRASE FLAG
NZ X4,ERRPHRC PHRASE HAS BAD CHARACTER
SA2 ATYPE GET WHERE IN ANSWER COMMAND
ZR X2,IGN IGNORABLE WORDS
NG X2,SYNK SYNONYMS
SX3 X1-COPCOMA SEE IF SYNONYM FOLLOWS
ZR X3,ERRSYNA SYNONYMOUS ANSWERS NOT ALLOWED
SX3 X1-COPLPRN START OF SYNONYMOUS KEYWORDS
NZ X3,OTH OTHER THINGS
MX6 -1 SET TO SYNONYMOUS KEYWORDS
SA6 ATYPE STORE TYPE
EQ AALOOP
* /--- BLOCK ANSWER 00 000 78/12/15 08.55
SYNK SX3 X1-COPCOMA TEST FOR COMMA
ZR X3,AALOOP COMMA OK IN KEYWORDS
SX3 X1-COPRPRN CHECK FOR END OF KEYWORDS
NZ X3,SYNKK CHECK FOR SYNONYM LIST
SA3 KEYWDS INCREMENT KEYWORD COUNT
SX6 X3+1
SA6 KEYWDS
SA6 ATYPE ANSWER TYPE
SA6 WDTYPE WORD TYPE
EQ AALOOP
SYNKK SX3 X1-COPLPRN SEE IF KEYWORD LIST ((LIST))
NZ X3,ERRCHAR ILLEGAL CHARACTER
SX3 COPRPRN PROBABLY UNNECESSARY
EQ ALISTIN
OTH SX3 X1-COPLTH SEE IF <
NZ X3,ERRCHAR ILLEGAL CHARACTER
MX6 0 SET TO IGNORABLE
SA6 WDTYPE
SA6 ATYPE
EQ AALOOP
IGN SX3 X1-COPGTH SEE IF >
NZ X3,IGN1
SA4 KEYWDS SET BACK TO KEYWORDS
BX6 X4
SA6 WDTYPE
SA6 ATYPE
EQ AALOOP
IGN1 SX3 X1-COPCOMA SEE IF COMMA
ZR X3,AALOOP COMMA OK IN EXTRA WORDS
SX3 X1-COPLTH SEE IF EXTRA LIST
NZ X3,ERRCHAR ILLEGAL CHARACTER
SX3 COPGTH PROBABLY UNNECESSARY
ALISTIN BX7 X3 SAVE FOR POSSIBLE LATER USE
SA7 WKWD
SX7 B1 SAVE B1 AND B2 OVER ',AUNAM',
SA7 SAVEB1
SX7 B2
SA7 SAVEB2
RJ AUNAM FIND LIST UNIT NUMBER
ZR X6,ERRLIST LIST NOT FOUND
SA3 SAVEB1 RESTORE B1, B2
SB1 X3
SA3 SAVEB2
SB2 X3
LX6 30 MOVE UNIT NUMBER
MX7 1 SET TO LIST WORD
BX6 X6+X7 FORM LIST WORD
SA2 WDTYPE GET WORD TYPE
BX6 X6+X2 ADD TO LIST WORD
* /--- BLOCK ANSWER 00 000 76/06/02 13.15
SA2 CONBUF GET CURRENT WORD COUNT
SX3 X2-JUJLTH-1 DO OVERFLOW TEST
PL X3,ERRWDS TOO MANY CONTENT WORDS
SA6 X2+CONBUF+1 STORE LIST REFERENCE
SX6 X2+1 INCREMENT WORD COUNT
SA6 CONBUF STORE CONTENT WORD COUNT
SA3 WKWD RESTORE X3
SX4 X1-COPCOMA CHECK FOR ((LISTX,LISTY))
ZR X4,ALISTIN GET NEXT LIST
BX4 X1-X3 CHECK FOR > OR )
ZR X4,AALOOP
EQ ERRTERM IMPROPER LIST TERMINATOR
ADONE SA2 ATYPE MUST NOT BE IGN, SYN, PHRASE
ZR X2,ERRIEND PREMATURE END OF IGNORABLES
NG X2,ERRSEND PREMATURE END OF SYNONYMS
SA2 PHRASE GET PHRASE FLAG
NZ X2,ERRPHR PREMATURE PHRASE END
SA2 CONBUF GET NUMBER OF WORDS SO FAR
MX7 48 TEST FOR 12-BIT OVERFLOW
BX7 X7*X2
NZ X7,ERR12B 12-BIT OVERFLOW
SA3 ECSBUFA RETRIEVE UNIT ECS BUFFER BIAS
SA4 ECSXSTO UNIT ECS BASE ADDRESS
IX0 X3+X4 FORM UNIT ECS BUFFER ADDRESS
SB1 X2 NUMBER OF WORDS TO WRITE
SA0 A2+1 STARTING ADDRESS TO READ
+ WE B1 STORE CONTENT WORDS
RJ ECSPRTY
LX3 12 MOVE BIAS INTO EXTRA STORAGE
BX5 X3+X2 ADD NUMBER OF CONTENT WORDS
SA2 KEYWDS GET NUMBER OF KEYWORDS
ZR X2,ERRKEY NO KEYWORDS
SX2 X2-1 ADJUST TO CORRECT NUMBER
LX5 12 MAKE ROOM FOR KEYWORDS COUNT
BX5 X5+X2 ADD TO PSEUDO-COMMAND WORD
LX5 12 FINALIZE PSEUDO-COMMAND
GOANS EXEC ANSW1,NANSOV GO JUDGE STUDENT INPUT
TITLE -ANSWERA-/-WRONGA- ERRORS
EJECT
ERRBADL SX6 3 BAD NUMBER OF INPUT CHARACTERS
EQ ERROUT
*
ERRPHR SX6 4 PREMATURE PHRASE END
EQ ERROUT
*
ERRPHRC SX6 5 BAD CHAR IN PHRASE
EQ ERROUT
*
ERRWDS SX6 6 TOO MANY CONTENT WORDS
EQ ERROUT
*
ERR12B SX6 7 12-BIT OVERFLOW
EQ ERROUT
*
ERRCHAR SX6 8 STRING CONTAINS ILLEGAL CHAR
EQ ERROUT
*
ERRIEND SX6 9 PREMATURE END OF IGNORABLES
EQ ERROUT
*
ERRSEND SX6 10 PREMATURE END OF SYNONYMS
EQ ERROUT
*
ERRKEY SX6 11 NO KEYWORDS IN STRING
EQ ERROUT
*
ERRSYNA SX6 12 SYNONYMOUS ANSWERS NOT ALLOWED
* /--- BLOCK ANSWER 00 000 76/06/02 13.15
EQ ERROUT
*
ERRTERM SX6 13 IMPROPER -LIST- TERMINATION CHAR
EQ ERROUT
*
ERRLCH SX6 14 TOO MANY CHARS IN -LIST- NAME
EQ ERROUT
*
ERRLIST SX6 15 BAD -LIST- NAME (0 OR NOT FOUND)
ERROUT SA6 TJUDGED
SB7 XANSC ANSWER CONTINGENCY
EQ PROCESS DON'7T BOTHER CHECKING STUDENT INPUT
TITLE AUNAM -- FIND LIST IN UNIT TABLE
EJECT
*
* AUNAM -- FIND -LIST- UNIT IN TABLE
*
* ENTER'; X3 = END CHARACTER ',)', OR ',>',
*
* EXIT'; X6 = 0 UNIT NOT FOUND
* = +N UNIT NUMBER N
*
AUNAM EQ *
SB1 42 ONLY ALLOW 7 CHARS, SPACE AT START
MX6 0
VUN SB3 A1 SAVE CURRENT CHAR ADDRESS
RJ GETOP GET NEXT OPCODE FROM ',CONTEN',
SX0 B2-COPSP SEE IF LEADING SPACE
ZR X0,VUN LOOP TO CLEAN OFF LEADING SPACES
VULOOP ZR B2,VUMADE SEE IF END-OF-LINE
SX0 B2-COPCOMA SEE IF COMMA
ZR X0,VUMADE
SX0 B2-COPSP SEE IF SPACE
ZR X0,VUMADE
SX0 B2
IX0 X0-X3 TEST FOR END MARK
ZR X0,VUMADE
VUMAKE SB1 B1-6 DECREMENT SHIFT COUNT
NG B1,ERRLCH TOO MANY CHARS IN LIST NAME
SB3 B3+1 GET 6-BIT CHARACTERS NEEDED
SA2 B3
LX0 B1,X2 SHIFT TO CORRECT POSITION
BX6 X6+X0 ADD TO NAME BUILDING
SX2 A1-B3
NZ X2,VUMAKE LOOP FOR CHARS OF .GT. 6 BITS
RJ GETOP GET NEXT OPCODE FROM ',CONTEN',
EQ VULOOP
VUMADE ZR X6,ERRLIST NO -LIST- NAME
SX0 1R SPACE AT START OF WORD
LX0 42
BX6 X6+X0 UNAM ENTRY STARTS W/SPACE
SX7 B2 SAVE LAST OPCODE
LX7 30
SX2 A1 SAVE LAST CHAR ADDRESS
BX7 X7+X2
SA7 SAVIT
BX1 X6 ',UNUM', EXPECTS IT IN X1
SA6 SAVLIST SAVE NAME FOR EXECERR
LX1 12 LEFT-JUSTIFY UNIT NAME
RJ UNUM RETURN W/NUMBER IN X6
SA2 SAVIT RESTORE CHAR ADDRESS, LAST OP
SA1 X2
LX2 30
SX1 X2
EQ AUNAM
*
SAVIT BSS 1 SCRATCH USED BY ',AUNAM',
PHRASE BSS 1 PHRASE START FLAG
WDTYPE BSS 1 CURRRENT WORD TYPE
KEYWDS BSS 1 NUMBER OF KEYWORDS
ATYPE BSS 1 0=IGNORE, 1=KEYWORD, -1=SYN KEYWORDS
* /--- BLOCK ANSWER 00 000 76/06/02 13.15
WKWD BSS 1 SAVES X3
ECSBUFA BSS 1 ECS BUFFER ADDRESS
SAVEB1 BSS 1 TEMP. STORE B1, B2
SAVEB2 BSS 1
SAVSSA BSS 1 SAVE STARTING STRING ADDRESS
SAVLIST BSS 1 SAVE LIST NAME FOR EXECERR
PREANSA BSS 1 ADDRESS OF *JJANSA*-1
JJANSA BSS JUJLTH+1 CHAR BUFFER
*
CONBUFL EQU JUJLTH+2 CONTENT WORDS BUFFER LENGTH
CONBUF BSS CONBUFL CONTENT WORDS BUFFER
*
*
PSTART VFD 27/0,1/1,22/0 PHRASE START BIT
PMIDDLE VFD 28/0,1/1,21/0 MIDDLE WORD IN PHRASE
PEND VFD 29/0,1/1,20/0 LAST WORD IN PHRASE
*
ENDOV
TITLE MATCH JUDGING ROUTINE
* EACH STUDENT WORD IS BROUGHT UP IN TURN. THEN RUN THROUGH
* ALL AUTHOR WORDS LOOKING FOR A MATCH.
*
NMATOV OVRLAY
RJ WORDGET GET STUDENT ANSWER INTO -CONTENT- WORDS
MX6 0
SA6 MLIST NOT IN SUB-LIST
SA6 MSPEVER NO MISSPELLING YET
SA6 MCEVER NO CAP ERROR YET
SA6 MBADPH NO PHRASE ERROR YET
SB7 XANSC PRE-SET TO ANS-C
SA2 TWCOUNT GET NUMBER OF STUDENT WORDS
ZR X2,MATDONE EXIT -NO- IF NO WORDS THERE
*
SB2 X2 STUDENT WORD COUNT IN B2 FOR REMAINDER
LX5 XCODEL+18 GET RELATIVE STARTING LOC OF WORDS
MX0 42 18 BIT MASK
BX6 -X0*X5
SA1 ECSXSTO GET START OF ECS RESIDENT EXTRA STORAGE
IX6 X6+X1 NOW HAVE ABSOLUTE ECS ADDRESS
SA6 MAINPT STORE AWAY FOR LATER
LX5 12 GET NUMBER OF WORDS
MX0 48 12 BIT MASK
BX6 -X0*X5
SA6 MAINCNT STORE AWAY FOR LATER
SB1 B0 SET CURRENT STUDENT WORD TO ZERO
SA0 MWORK A0 SET FOR ENTIRE REST OF ROUTINE
*
MLOOP GE B1,B2,MATDONE EXIT IF RUN OUT OF STUDENT WORDS
SA1 JJSBUF+B1 GET FIRST PART OF STUDENT WORD
SA2 JJHBUF+B1 GET SECOND PART OF STUDENT WORD
SB1 B1+1 INCREMENT STUDENT WORD COUNT
*
MX6 0
SA6 MSPELL NO SPELLING ERROR YET FOR THIS WORD
*
SA3 MAINPT GET AUTHOR LIST
BX0 X3
SA4 MAINCNT AND AUTHOR WORD COUNT
SB3 X4
*
MALOOP GT B3,B0,MALREAD SEE IF AUTHOR LIST EXHAUSTED
SA3 MLIST SEE IF IN A SUB LIST
ZR X3,MALOOPS IF NO, SEE IF FOUND A MISSPELLING
SX6 1
IX0 X3+X6 INCREMENT MAIN LIST
SA4 MLISTCT GET BACK MAIN LIST COUNT
SB3 X4-1 DECREMENT COUNT OF AUTHOR WORDS
MX6 0
* /--- BLOCK ANSWER 00 000 76/06/02 13.15
SA6 A3 AND SET FLAG TO WORKING ON MAIN LIST
EQ MALOOP AND BACK TO LOOP ON AUTHORS WORDS
*
* /--- BLOCK MATCH 00 000 76/06/14 01.28
*
*
MALOOPS SA3 MSPELL SEE IF FOUND A MISSPELLING THIS RUN
ZR X3,MLOOP IF NOT, ON TO NEXT STUDENT WORD
*
MX7 1
SA2 TSPECS LOAD SPECS BITS
*
SX3 X3-3 JUDGER YIELDS FITNESS OF 1 OR 2 FOR CAP ERR
PL X3,MS1 ON TO GENERAL SPELLING TEST
SA7 MCEVER SET ENTIRE MATCH CAP ERROR
LX7 60-JFCAP SET BAD CAP BIT
SX3 X3+2 LIMIT OKCAP
NZ X3,MS1A
BX3 X2
LX3 OKCAP SEE IF SPECS OKCAP
NG X3,MS2 FOUND WORD IF OKCAP
EQ MS1A ELSE SEE IF OKSPELL
*
MS1 SA7 MSPEVER SET ENTIRE MATCH SPELL FLAG
LX7 60-JFSPELL SET BAD SPELL FLAG BIT
MS1A LX2 OKSPELL SEE IF SPECS OKSPELL
PL X2,MLOOP ON TO NEXT STUDENT WORD
MS2 SA7 TJFLAGS
SA4 MSPELLI GET AUTHOR INFO WORD
SA1 MSPELLS GET STUDENT WORD POINTER BACK
SA1 X1
MX0 0 FLAG FOR ONE WORD FOUND
EQ MGOT EXIT WITH THIS WORD
* /--- BLOCK MATCH 00 000 78/02/13 17.06
*
MALREAD RE 2 GET IN NEXT AUTHOR WORD IN THIS RUN
RJ ECSPRTY
*
SA3 A0 GET WORD
PL X3,MWD SEE IF A SUBLIST
*
BX6 X3 SAVE MAIN LIST INFO WORD
SA6 MMAIN
BX6 X0 SAVE MAIN LIST POINTER AS A FLAG
SA6 MLIST
SX7 B3
SA7 MLISTCT AND SAVE COUNT
LX3 1 NOW GET SUB-LIST
AX3 31 GET UNIT NUMBER
SA4 ECSULOC GET ECS ADDRESS OF -ULOC- TABLE
IX0 X3+X4
+ RE 1 READ IT IN
RJ ECSPRTY
SA4 A0 GET ENTRY
NG X4,MATDONE SOMETHING WRONG...SKIP OUT GRACEFULLY
*
BX0 X4
AX0 60-ULOC1 TOP BITS ARE BIAS TO LOCATION
SA3 ECSLES GET ECS ADDRESS OF LESSON
IX0 X0+X3 NOW HAVE ABSOLUTE ECS ADDRESS
LX4 ULOC1+ULOC2+ULOC3+ULOC4 GET LENGTH
MX5 60-ULOC4
BX7 -X5*X4
SB3 X7
EQ MALOOP NOW BACK TO LOOP
*
MWD SX6 2
SB3 B3-2 SUBTRACT 2 FROM AUTHOR COUNT
IX0 X0+X6 INCREMENT ECS POINTER
SA4 A0+1 BRING UP SECOND PART
*
RJ CKWORDX SEE IF NO MATCH, PERFECT MATCH, SPELL ERROR
NG X6,MALOOP NO MATCH
ZR X6,MG PERFECT MATCH
*
* /--- BLOCK MATCH 00 000 77/11/24 11.02
* SPELLING ERROR
SA3 MSPELL SEE IF PREVIOUS MISSPELLING
ZR X3,MFSP
IX3 X6-X3 SEE IF PREVIOUS A CLOSER MISSPELLING
PL X3,MALOOP IN WHICH CASE, ON TO NEXT WORD
*
MFSP BX5 X4 SEE IF DOING A PHRASE
LX5 PSTART
PL X5,MSP1 SEE IF START OF PHRASE
*
MX7 1 MARK IT AS A PHRASE MISSPELLING
SX6 X6-3 SEE IF CAP ERROR
NG X6,MSSCAP1
SA7 PSPELL THIS TIME
SA7 MSPEVER FOR ALL TIME
EQ MSS1
MSSCAP1 SA7 PSPELC SET PHRASE CAP ERROR
SA7 MCEVER FOR ALL TIME
SX6 X6+2 LIMIT OKCAP
NZ X6,MSS1
SA3 TSPECS SEE IF SPECS OKCAP
LX3 OKCAP
NG X3,MPHRASE TRY FOR A BAD PHRASE
MSS1 SA3 TSPECS SEE IF SPECS -OKSPELL-
LX3 OKSPELL
PL X3,MALOOP IF NOT, THEN GO ON TO NEXT AUTHOR WORD
EQ MPHRASE SEE IF CAN MATCH PHRASE
*
MSP1 MX7 3 EXIT IF MIDDLE OF PHRASE
BX7 X7*X5
NZ X7,MALOOP
SA6 A3 STORE THIS SPELLING FITNESS
SA3 MLIST SEE IF IN SUB-LIST
ZR X3,MSGOT
SA4 MMAIN SAVE MAIN INFO WORD
MSGOT BX6 X4
SA6 MSPELLI SAVE AUTHOR INFO
SX6 A1 SAVE POINTER TO STUDENT WORD
SA6 MSPELLS
EQ MALOOP SEE IF CAN FIND A PERFECT MATCH THIS RUN
*
*
* FOUND PERFECT WORD MATCH...NOW SEE IF AUTHOR WORD
* IS PART OF A PHRASE...
*
MG BX5 X4 CHECK IF THIS WORD STARTS A PHRASE
LX5 PSTART GET START PHRASE BIT
MX6 3 LOOK AT PHRASE BITS
BX6 X6*X5
MX7 0 SET TO NO SPELLING ERROR YET IN PHRASE
SA7 PSPELL
SA7 PSPELC NO CAP ERROR IN PHRASE YET
NZ X6,MPHRASE SOMETHING OF A PHRASE HERE
MX0 0 FLAG FOR ONE WORD FOUND
EQ MGO GOOD MATCH IF NOT PART OF PHRASE
*
* /--- BLOCK MATCH 00 000 77/11/24 11.08
* NOW SEE IF A COMPLETE, PERFECT PHRASE
MPHRASE PL X5,MALOOP MUST BE START OF A PHRASE
SX6 A1 SAVE CURRENT -A1-
SA6 MA1
SX6 A2 AND -A2-
SA6 MA2
SX6 B1 AND -B1-
SA6 MB1
*
MPLOOP GE B1,B2,MNOPH SEE IF CAN CONTINUE
SA1 JJSBUF+B1 GET NEXT STUDENT WORD
SA2 JJHBUF+B1
SB1 B1+1
LE B3,B0,MNOPH SEE IF CAN GET AUTHOR WORD
+ RE 2
RJ ECSPRTY
SA3 A0 GET AUTHOR WORDS
SA4 A0+1
SX6 2
IX0 X0+X6
SB3 B3-2
RJ CKWORDX SEE IF WORDS MATCH
*
ZR X6,MPLOOP1 MATCH
NG X6,MNOPH NO MATCH SO GET OUT OF PHRASE CHECKING
*
MX7 1 SO A MISSPELLING, SET MARKER
SX6 X6-3 SEE IF CAPITALIZATION ERROR
NG X6,MPLLSC1
SA7 PSPELL SPELLING ERROR THIS TIME
SA7 MSPEVER AND FOR ALL TIME
EQ MPLLS
MPLLSC1 SA7 PSPELC SET CAP ERROR THIS TIME
SA7 MCEVER SET CAP ERROR EVER
SX6 X6+2 GET SPECS OKCAP FORM OF CAP ERROR
NZ X6,MPLLS
SA3 TSPECS SEE IF SPECS OKCAP
LX3 OKCAP
NG X3,MPLOOP1
MPLLS SA3 TSPECS SEE IF -SPECS OKSPELL-
LX3 OKSPELL
NG X3,MPLOOP1 CONTINUE ONLY IF -OKSPELL-
*
MNOPH SA1 MB1 NO PHRASE SO RESTORE REGISTERS
SB1 X1 DO NOT NEED -B3- RESTORED SINCE
SA1 MA1 THOSE WORDS WERE MIDDLE/END OF PHRASES
SA2 MA2 SO COULD NOT START ANYTHING
SA1 X1
SA2 X2
MX7 1 SET BAD PHRASE FLAG
SA7 MBADPH
EQ MALOOP
*
MPLOOP1 BX5 X4 SEE IF MIDDLE OF PHRASE
LX5 PSTART+1
NG X5,MPLOOP LOOP UNTIL FIND END
SX6 A1 NOW CALCULATE NUMBER OF WORDS IN PHRASE
SA1 MA1
IX0 X6-X1 X0 THUS HOLDS THE NUMBER OF WORDS
SA1 X1 -A1- NOW AT FIRST WORD
*
SA3 PSPELL GET ANY SPELL ERROR FLAGS
BX7 X3
LX7 60-JFSPELL
SA3 PSPELC GET CAP ERRORS
LX3 60-JFCAP
BX7 X3+X7
SA7 TJFLAGS SET ERROR FLAGS
* /--- BLOCK MATCH 00 000 75/10/01 21.11
*
*
MGO SA3 MLIST SEE IF MAIN LIST OR SUB-LIST
ZR X3,MGOT
SA4 MMAIN GET MAIN LIST INFO WORD
*
MGOT MX6 60-SYNBITS GET BASE AUTHOR WORD NUMBER
BX5 -X6*X4 TO BE STORED AS RESULT
SX5 X5-1 -MATCH- CONDITIONALS START AT ZERO
SX7 -1 SET TO -OK-
SA7 TJUDGED STORE JUDGEMENT
*
* NOW MUST BUMP OUT WORD/CHARACTERS FROM CONTENT/JUDGE BUFFERS
MBLOOP SB3 B2+JJSBUF-1 LAST WORD USED IN CONTENT BUFFER
SB2 A1 CURRENT WORD IN BUFFER
SA1 B2+JJSENB X1 = COUNT INFO WORD FOR WORD MATCHED
MX6 15
BX3 X6*X1
LX3 15 X3 = INDEX TO FIRST CHAR OF WORD
SB1 X0 NUMBER OF WORDS TO BUMP MINUS 1
SA1 A1+B1 THIS IS LAST COUNT INFO WORD INVOLVED
LX1 15
BX4 X6*X1
LX4 15 X4 = INDEX TO LAST CHAR
SB3 B3-B1 REDUCE END COUNT BY NUMBER BUMPED (-1)
SX0 X0+1 GET TRUE NUMBER BUMPED
SB1 X0
*
MBUMP GE B2,B3,MPDONE CLOSE UP HOLE
SA1 B2+B1 LOAD NEXT WORD -JJSBUF-
SA2 A1+JJSENB AND COUNT CO-ORDINATES -JJXY-
BX6 X1
BX7 X2
SA6 B2 STORE BACK ONE
SA7 A6+JJSENB
SA2 A2+JJSENB LOAD HASH WORD
BX6 X2
SA6 A7+JJSENB
*
SB2 B2+1
EQ MBUMP
MPDONE SX6 1R X6 = SPACE CODE
SB2 X3 B2 = STARTING CHAR INDEX
SB3 X4 B3 = ENDING CHAR INDEX
MPUT SA6 JUDGE+B2
SB2 B2+1
LE B2,B3,MPUT
*
SA1 TWCOUNT DECREMENT STUDENT WORD COUNT
IX6 X1-X0
SA6 A1
*
MX6 -1
SA6 JJSTORE FLAG RECOMPILE STUDENT RESPONSE
*
BX6 X5 RESTORE X6
SA5 A5 GET COMMAND WORD BACK
NPUTVAR STORES X6 IN USER VARIABLE
EQ PROCESS CONTINUE TO NEXT TUTOR COMMAND
*
*
* /--- BLOCK MATCH 00 000 76/03/30 16.47
MATDONE SA3 MSPEVER COMBINE ANY SPELL, CAP, OR BAD PHRASE FLAG
LX3 60-JFSPELL
SA4 MCEVER
LX4 60-JFCAP
BX7 X3+X4
SA3 MBADPH
LX3 60-JFPHRAS
BX7 X3+X7
SA7 TJFLAGS SET BAD FLAGS
*
SX7 1 SET JUDGMENT = UNIVERSAL NO
SX6 -1 SET TO -NO- FOR MATCH
SA7 TJUDGED STORE JUDGEMENT
SA5 A5 GET COMMAND WORD BACK
NPUTVAR STORES X6 IN USER VARIABLE
EQ PROCESS
*
*
MAINPT BSS 1 STARTING ECS ADDRESS OF AUTHOR WORDS
MAINCNT BSS 1 NUMBER OF AUTHOR WORDS
MLIST BSS 1 ZERO IF IN MAIN LIST OR LAST WORD OF MAIN
MLISTCT BSS 1 REMAINING COUNT OF MAIN
MMAIN BSS 1 HOLDS MAIN LIST INFO WORD WHILE IN SUB-LIST
MSPELL BSS 1 0=NO MISSPELLING, +N SPELLING ERROR/FITNESS
MSPELLI BSS 1 HOLDS AUTHOR INFO WORD AT MISSPELLING
MSPELLS BSS 1 HOLDS -A1- AT MISSPELLING TIME
MA1 BSS 1 HOLDS FIRST -A1- WHILE LOOKING AT PHRASE
MA2 BSS 1 DITTO -A2-
MB1 BSS 1 DITTO -B1-
PSPELL BSS 1 MISSPELLING IN THIS PHRASE
PSPELC BSS 1 CAPITALIZATION ERROR IN PHRASE
MSPEVER BSS 1 EVER A MISSPELLING
MCEVER BSS 1 EVER A CAPITALIZATION ERROR
MBADPH BSS 1 EVER A BAD PHRASE ERROR
*
MWORK BSS 2 TWO WORD ECS READ-IN BUFFER
*
*
ENDOV
* /--- BLOCK MARKUP 00 000 80/03/26 00.13
TITLE ANSWER MARKUP ROUTINES
MARKUP OVRLAY
*
* TBERRMK = 0 FOR INITIALIZING THE MARKUP
* = +N FOR ERASING THE MARKUP
* = -N FOR DELAYED DISPLAY OF THE MARKUP
*
*
SA1 TBERRMK BRANCH TO OPTION
NZ X1,MARKNZ
*
* -ONMARK-
*
* THE JUDGE BUFFER SHOULD CONTAIN THE FOLLOWING CODES
* 0 FOR GOOD WORD
* 1 FOR UNFOUND WORD (XXX-OUT)
* 2 FOR NOT IN VOCABULARY (UUU-OUT)
* 3 FOR MISSPELLED WORD (===-OUT)
* 4 FOR OUT OF ORDER (MOVE LEFT)
* 5 FOR MISSPELLED, OUT OF ORDER
* 6 FOR OUT OF SEQUENCE (INSERT BEFORE)
* 7 FOR MISPELLED, OUT OF SEQUENCE
* 8 FOR CAPITALIZATION ERROR
* 9 FOR BROKEN PHRASE
* 10 FOR BAD CAPITALIZATION, OUT OF ORDER
* 11 FOR BAD CAPITALIZATION, OUT OF SEQUENCE
* 12 FOR WORDS MISSING AT THE END OF ANSWER (SPECIAL CASE)
* 12 IS EXTRA WORD AT END OF BUFFER
*
*
* CAN USE B4,5,AND 6 SINCE WILL COMPLETELY EXIT NEXT
*
*
SA1 INHIBS CHECK FOR LEFTWARD
LX1 BCKSHIF
PL X1,ANNORM
*
SA1 ANPL1 MUST PLANT CHANGES FOR LEFTWARDS
BX6 X1
SA6 ANTAB+4 MARK 4...OUT OF ORDER
SA1 ANPL2
BX6 X1
SA6 ANTAB+5 MARK 5...OUT OF ORDER, MISSPELLED
SA1 ANPL3
BX6 X1
SA6 ANTAB+10 MARK 10..OUT OF ORDER, BAD CAP
*
ANNORM RJ FIRSTXY GET X,Y OF 1ST CHAR IN STU ANS
SA6 NXSAV SAVE
SX7 X7-8 SET MARKUP UNDER WORDS
*
* SA1 TMARKUY GET PREFERRED Y MARKUP BIAS
* LX1 48
*
SA1 TBWHERE (X1)=12/MARKUP Y BIAS,48/OTHER
AX1 48 JUST BOTTOM 12 BITS
IX7 X7+X1
SA7 NYSAV
*
SA1 TBMARG GET CURRENT MARGIN
BX7 X1
SA7 MARGSV SAVE FOR LATER RESTORAL
SA6 A1 AND SET SOFTWARE MARGIN FOR SIMPLOT
*
SB4 B0 INITIALIZE TO FIRST WORD
SA3 JJSBUFA+2 GET TOTAL NUMBER OF WORDS
SB5 X3
SB6 JJSBUFA+JJINF GET WORD-INFO LOCATION
*
NG X3,ANWBMB
SX3 X3-JJSENB-1 SEE IF TOO MANY WORDS
NG X3,ANWORD1 SOMETHING WENT WRONG
ANWBMB SA1 -1 BOMB OFF HERE
*
* /--- BLOCK MARKUP 00 000 76/08/28 05.49
*
ANWORD1 SA1 B4+B6 BRING UP NEXT WORD
ZR X1,ANWORDN SKIP IF NO ERROR
*
SA1 NXSAV GET STARTING X AND Y
SA2 NYSAV
BX6 X1
BX7 X2
SA6 NX
SA7 NY
*
SA2 JJXY+B4 GET ORIGINAL SCREEN 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 ANSSEX SAVE ENDING CHAR NUMBER
*
SA1 TBINPUT GET ADDRESS OF STUDENT ANSWER STRING
SB1 X1
SB2 NCHAR SET TO NUMBER OF 6 BIT CODES
RJ SIMPLOT GET NX AND NY TO WHERE THE MARK-UP OCCURS
*
SA1 NX
SA2 NY
BX6 X1
BX7 X2
SA6 NXBEGIN SAVE BEGINNING X
SA7 NYBEGIN AND Y
*
SA1 B4+B6 NOW SEE IF ERROR WITHIN BOUNDS
NG X1,ANBOMB OR HAS SPECIAL CHARACTER LENGTH
SB1 X1
SX1 X1-ANTOT-1
PL X1,ANBOMB
JP B1+ANTAB NOW JUMP INTO TABLE
ANBOMB SA1 -1 BOMB OFF
*
ANTAB EQ ANWORDN 0
+ SX6 0
EQ ANWORD2 1
+ SX6 0
EQ ANWORD2 2
+ SX6 0
EQ ANWORD2 3
+ SX6 1
EQ ANWORD4 4...OUT OF ORDER
+ SX6 0
EQ ANWORD2 5...OUT OF ORDER AND MISSPELLED
+ SX6 3
EQ ANWORD4 6...OUT OF SEQUENCE
+ SX6 3
EQ ANWORD2 7
+ SX6 3
EQ ANWORD4 8...CAPITALIZATION ERROR
+ SX6 0
EQ ANWORD2 9
+ SX6 4
EQ ANWORD4 10...CAP ERROR AND OUT OF ORDER
+ SX6 6
EQ ANWORD4 11...CAP ERROR AND OUT OF SEQUENCE
+ SX6 2
EQ ANWORD4 12...SPECIAL INCOMPLETE AT END CASE
*
* /--- BLOCK MARKUP 00 000 76/08/27 17.32
ANWORD2 SA6 EXTRAL STORE COUNT OF ANY EXTRA CHARACTERS
*
SA1 NXSAV GET STARTING X AND Y
SA2 NYSAV
BX6 X1
BX7 X2
SA6 NX
SA7 NY
*
SA6 NXINIT SAVE INITIAL X
SA1 TBINPUT
SB1 X1
SB2 ANSSEX
RJ SIMPLOT GET TO WHERE MARK-UP ENDS
SA1 NX
SA2 NXBEGIN
IX6 X1-X2
SA3 INHIBS CHECK FOR LEFTWARD
LX3 BCKSHIF
PL X3,ANWD2A
BX6 -X6
ANWD2A AX6 3 DIVIDE BY 8 TO GET CHAR COUNT
SX3 X6-1
PL X3,ANWORD3
AX2 3 BEGINNING X CHAR
SX7 64
IX7 X7-X2 CHARS TO EDGE
SA2 NYBEGIN
SA3 NY
SX6 1 PRESET TO 1 FOR STRANGE CASES
IX3 X3-X2
PL X3,ANWORD4 STRANGE IF SAME LINE OR ABOVE
BX6 X7 X6 = CHARS TO EDGE
SA3 NXINIT
IX7 X1-X3
AX7 3 CHAR COUNT ON NEXT LINE
NG X7,ANWORD3 SHOULD BE IMPOSSIBLE
IX6 X6+X7
ANWORD3 SA1 EXTRAL ADD ANY EXTRA CHARACTERS
IX6 X6+X1
SX1 X6-21 20 CHAR LIMIT
NG X1,ANWORD4
SX6 20
*
* /--- BLOCK MARKUP 00 000 76/11/01 02.16
ANWORD4 SX6 X6 CHECK CHAR COUNT REASONABLE
+ PL X6,*+1
SX6 0
+ SA6 ANSSEX SAVE CHAR COUNT
SA1 TBERRMK SAVE ERRORS FOR LATER ERASURE
SX2 X1-8 ONLY SAVE 8 FOR NOW
PL X2,ANWORDN
SA2 NXBEGIN GET SCREEN COORDINATES
SA3 NYBEGIN
MX6 -9
BX2 -X6*X2
BX3 -X6*X3 CHOP TO 9 BITS
**NXNY FIX HERE
LX2 9
BX6 X2+X3
LX6 6
SA2 ANSSEX GET LENGTH OF MARK-UP
BX6 X6+X2
LX6 6
SA3 B4+B6 GET TYPE OF MARK-UP
LX3 1
SX3 X3-2
BX6 X6+X3
LX6 30
SA6 TBMKBUF+X1
SX6 X1+1
SA6 A1 INCREMENT NUMBER OF MARK-UPS
*
*
ANWORDN SB4 B4+1
GE B5,B4,ANWORD1 THIS INCLUDES ONE EXTRA WORD TO HANDLE
* THE -MISSING AT END OF ANSWER- CASE
* WHICH HAS BEEN PROVIDED FOR
*
*
SA1 MARGSV RESTORE MARGIN AS AT START
BX6 X1
SA6 TBMARG
*
SA1 NXSAV GET X,Y AT STARTING CHARACTER
SA2 NYSAV
SA3 TBERRMK AND GET COUNT OF MARKUPS
ZR X3,ANSOUT JUST EXIT IF NO REAL MARK-UPS
LX1 39
LX2 30 NOW HAVE 18 BITS X,Y IN TOP HALF
BX6 X1+X2
BX6 X3+X6 COMBINE WITH COUNT IN BOTTOM HALF
SA1 TSPECS SEE IF -SPECS HOLDMARK-
LX1 HOLDMK
PL X1,MARKEM
BX6 -X6 NEGATE AS FLAG FOR DELAYED DISPLAY
SA6 A3
EQ ANSOUT NOW FINISH UP BACK IN FILE ANSWER
*
*
MARKEM SB3 ANSOUT SET TO EXIT TO ANSOUT
SX5 20000B+WRTCODE SET UP HEADER WORD TO WRITE
SA6 A3 AND STORE FOR LATER
EQ MARK5
*
ANSSEX BSS 1
NXINIT BSS 1
NXBEGIN BSS 1
NYBEGIN BSS 1
EXTRAL BSS 1
NXSAV BSS 1
NYSAV BSS 1
MARGSV BSS 1
* PLANTS FOR LEFTWARD WRITING
ANPL1 SX6 3 MARK 4...OUT OF ORDER
EQ ANWORD4
ANPL2 SX6 2 MARK 5...OUT OF ORDER, MISSPELLED
EQ ANWORD2
ANPL3 SX6 6 MARK 10..OUT OF ORDER, BAD CAP
EQ ANWORD4
*
* /--- BLOCK MARKUP 00 000 80/01/16 22.49
TITLE OFFMARK,MARKUP
* TAKE OFF OR PUT ON JUDGING MARKUPS
*
* TBERRMK IS EXPECTED TO HOLD';
* BOTTOM 30 BITS = COUNT OF MARKUPS
* TOP 30 BITS = X,Y OF STARTING CHAR IN STU ANSWER
*
* TBMKBUF(8) HOLDS';
* 18 BITS...X-Y COORDINATE OF START OF MARKUP
* 6 BITS...LENGTH OF MARKUP
* 6 BITS...TYPE OF MARKUP
*
MARKNZ SA1 TBERRMK GET NUMBER OF MARKUPS
NG X1,MARK2 SEE IF -MARKUP- COMMAND
*
* OFFMARK
SB3 OFFITR EXIT TO OFFITR
MX7 0 CLEAR MARKUP OFF SCREEN
SA7 A1 CLEAR TO ZERO TO FLAG DONE
BX6 X1
SX5 20000B+WERCODE SET UP HEADER WORD TO ERASE
EQ MARK5
*
* MARKUP
MARK2 SB3 PROCESS EXIT TO PROCESS
BX6 -X1 COMPLEMENT TO GET CORRECT NUMBER OF MARKS
SA6 A1 AND STORE FOR OFFMARK
SX5 20000B+WRTCODE SET UP HEADER WORD TO WRITE
*
MARK5 SB2 X6 END COUNT IN REG
SB1 B0 INITIALIZE START REG
BX0 X6 SAVE STARTING X,Y INFO
*
SA4 MOUTLOC DO OVERFLOW TEST OF MOUT BUFFER ONCE
* LX1 2 NUMBER OF MARKS TIMES 4
LX6 2 NUMBER OF MARKS TIMES 4
SX6 X6+B2 TIMES 5...MAXIMUM IN
* MRKML LOOP
* IX6 X4+X1
IX6 X4+X6 ADD TO MOUTLOC
*PT...THE FOLLOWING OVERFLOW TEST IS WRONG IN THAT IT DOES
*NOT TAKE INTO ACCOUNT THE OUTPUTW AND OUTP AFTER MARKON
*NOR THE OUTP AT MRKML.
* SX7 X6-MOUTLTH SEE IF OVERFLOW OF MOUT BUFFER
SX7 X6+5-MOUTLTH +5 TAKES CARE OF THE OUTPUTS
* BEFORE AND AFTER MRKML LOOP
PL X7,=XERROROF PERHAPS SHOULD PUT A5 BACK ONE
* AND INTERRUPT INSTEAD SOMEDAY
* /--- BLOCK MARKUP 00 000 80/01/16 21.13
*
* SET RIGHTWARD OR LEFTWARD MARKUPS
*
SX3 7040B SET RIGHTWARD...SHIFT-5
SA1 INHIBS GET LEFTWARD FLAG
LX1 BCKSHIF
PL X1,MARKON
SX3 7034B SET LEFTWARD...SHIFT-1
SA1 CHGMRK NOW PLANT DIFFERENT MARKS
BX6 X1
SA6 MRKXXO+6 MARK 4...OUT OF ORDER
SA1 A1+1
BX6 X1
SA6 MRKXXO+8 MARK 5...OUT OF ORDER, MISSPELL
SA1 A1+1
BX6 X1
SA6 MRKXXO+18 MARK 10..OUT OR ORDER, BAD CAP
*
MARKON LX3 48 SHIFT 2 CHARACTERS UP
SX2 2 2 CHARACTERS
OUTPUTW
*
BX1 X0 GET STARTING X,Y FOR MARGIN SETTING
AX1 30
OUTP WFMCODE SET MARGIN FOR FRAMAT
*
SX1 3 SET TO OVERSTRIKE WRITE MODE
OUTP WEFCODE
* /--- BLOCK MARKUP 00 000 80/01/16 21.14
*
MRKML SA3 TBMKBUF+B1 GET NEXT PACKAGE
LX3 18 GET X-Y COORDINATE
MX4 42
BX1 -X4*X3
OUTP WFCODE
*
LX3 6 NOW GET LENGTH OF MARKUP
MX4 54
BX2 -X4*X3
*
LX3 6 AND TYPE OF MARKUP
BX3 -X4*X3
SA3 X3+MRKXXO GET THE PARTICUALAR MARKUP INVOLVED
*
SX7 X2-11 SEE IF OVER 10 CHARACTERS
NG X7,MRKM2
SX2 10 THEN SET TO 10 CHARACTERS
*
SA4 MOUTLOC OUTPUT THE CHARACTERS
SX6 X4+2 INCREMENT OUTPUT POINTER
SA6 A4 NO OVERFLOW TESTS MADE
LX2 24 SHIFT COUNT UP
BX6 X2+X5 COMBINE WITH HEADER WORD
SA6 MOUT+X4
BX6 X3
SA6 A6+1
*
SX2 X7+1
SA3 A3+1
*
MRKM2 SA4 MOUTLOC OUTPUT THE OVER-TEN CHARACTERS
SX6 X4+2 INCREMENT OUTPUT POINTER
SA6 A4 NO OVERFLOW TESTS MADE
LX2 24 SHIFT COUNT UP
BX6 X2+X5 COMBINE WITH HEADER
SA6 MOUT+X4
BX6 X3
SA6 A6+1
*
SB1 B1+1 INCREMENT
LT B1,B2,MRKML LOOP UNTIL DONE
*
*PT...ACTUALLY, THE BELOW SHOULD NOT BE NEEDED WHEN THE
* SYSTEM HANDLES THE SCREEN MODE AT AN ARROW PROPERLY
*THE BELOW DOES NOT NECESSARILY SET BACK TO THE ARROW MODE
*BUT TO THE LAST MODE THE USER SELECTED...PERHAPS IN
*THE ANSWER OR SPECS CONTINGENCY.
SA1 TBNARGS SET BACK TO USERS MODE
AX1 6 EXTRACT THE MODE BITS
MX0 -3
BX1 -X0*X1
OUTP WEFCODE
*
JP B3 EXIT
*
* /--- BLOCK MARKUP 00 000 76/08/28 08.08
*
*
ANTOT EQU 12 NUMBER OF MARKUPS POSSIBLE
*
*1
MRKXXO VFD 60/10LXXXXXXXXXX EXTRA WORD MARK-UP
VFD 60/10LXXXXXXXXXX
*2
VFD 60/10LUUUUUUUUUU UNRECOGNIZED WORD MARK-UP
VFD 60/10LUUUUUUUUUU
*3
VFD 60/10L========== MISSPELLED WORD MARK-UP
VFD 60/10L==========
*4
VFD 6/KASSIGN,54/0 OUT OF ORDER (LEFT ARROW)
DATA 0
*5
VFD 6/KASSIGN,54/9R========= OUT OF ORDER, MISSPELLED
VFD 60/10L==========
*6
VFD 6/KBKSP,6/KUP,6/1R-,42/0 OUT OF SEQUENCE (DELTA)
DATA 0
*7
VFD 6/KBKSP,6/KUP,6/1R-,42/7R======= OUT OF SEQUENCE, MI
VFD 60/10L==========
*8
VFD 6/ACCESS,6/KUP,6/1RW,42/0 CAPITALIZATION ERR (UP ERR)
DATA 0
*9
VFD 60/10L********** BROKEN PHRASE ERROR
VFD 60/10L**********
*10
VFD 6/ACCESS,6/KUP,6/1RW,6/KASSIGN,36/0 BAD CAP AND ORDER
DATA 0
*11
VFD 6/KBKSP,6/KUP,6/1R-,6/ACCESS,6/KUP,6/1RW,24/0
DATA 0 OUT OF SEQUENCE AND BAD CAPITALIZATION
*12
VFD 6/KUP,6/1R-,48/0 SPECIAL CASE FOR WORDS
DATA 0 MISSING AT END
*
* MARK-UPS TO BE PLANTED FOR -FORCE LEFT- ARROW
CHGMRK DATA 76700400000000000000B MARK 4...OUT OF ORDER
DATA 76700454545454545454B MARK 5...OUT OF ORDER, MISSPELL
DATA 76702776700400000000B MARK 10..OUT OF ORDER,BAD CAP
*
ENDOV
* /--- BLOCK COMPARE 00 000 78/12/19 17.10
*78/12/19...PT...SOON TO REPLACE THE PREVIOUS TWO BLOCKS
TITLE COMPARE
* COMPARE ONE WORD WITH ANOTHER
* ARG1= FIRST WORD
* ARG2= SECOND WORD
* ARG3= RETURN TO USER (-1=NO MATCH,0=PERFECT,
* +N=SPELLING CRITERION
*
* A WORD STOPS CONTENTING UPON REACHING FIRST PUNCTUATION CODE
*
COMPOV OVRLAY
SX6 3 ALWAYS THREE ARGS
RJ GETCODX GET GETVAR CODES
SA1 VARBUF
BX5 X1
NGETVAR GET FIRST WORD ADDRESS
SX6 A1
SA6 VARBUF
SA1 VARBUF+1
BX5 X1
NGETVAR
SX6 A1 GET SECOND WORD ADDRESS
SA6 VARBUF+1
*
SA1 TJSYM GET NAME OF USERS JUDGING SYMBOL SET
SA2 CONTAB GET NAME OF SET IN CM
BX2 X1-X2
ZR X2,COMPA IF SAME, THE GO ON
RJ GETJSYM ELSE, READ IN PROPER SET
*
COMPA SA1 PRECBUF POINTER TO START OF SPREAD WORD STRING -1
MX6 0 A1 USED IN CONTENT
SA6 A1
MX0 54
SB1 1
SB2 10
SB3 41
SA2 VARBUF GET FIRST WORD
SA2 X2 GET STARTING ADDRESS OF CHARACTERS
COMPL LX2 6 UNPACK
BX6 -X0*X2
ZR X6,COMPD SEE IF DONE
SB3 B3-B1
ZR B3,COMPERR DO NOT OVERFLOW CHARACTER BUFFER
SA6 A6+B1
SB2 B2-B1
NZ B2,COMPL
*
SX7 B3 SAVE END TEST
SA0 A2 DO BOUNDS TEST ON NEXT WORD
SX1 2
RJ BOUNDS
*
SB3 X7 RESTORE END TEST
SB1 1 BOUNDS DESTROYED B1
SB2 10
SA2 A2+B1
EQ COMPL LOOP THROUGH ALL WORDS
*
COMPD MX6 0 CLEAR ONE EXTRA WORD IN CHARACTER BUFFER
SA6 A6+B1
SA6 FONTFLG CLEAR CONTENT FONT
SA6 CSSPERM CLEAR CONTENT SUP/SUB
RJ CONTENT CONTENT THE WORD
ZR X7,COMPERR TEST FOR SOMETHING THERE
SA6 CWD1A SAVE
SA7 CWD1B
*
SA1 PRECBUF POINTER TO START OF SPREAD WORD STRING -1
MX6 0 A1 USED IN CONTENT
SA6 A1
MX0 54
SB1 1
SB2 10
SB3 41
SA2 VARBUF+1 GET SECOND WORD
SA2 X2 GET STARTING ADDRESS OF CHARACTERS
COMPL1 LX2 6 UNPACK
BX6 -X0*X2
ZR X6,COMPD1 SEE IF DONE
* /--- BLOCK COMPARE 00 000 78/12/19 17.10
SB3 B3-B1
* /--- BLOCK COMPARE 00 000 78/12/19 17.11
ZR B3,COMPERR DO NOT OVERFLOW CHARACTER BUFFER
SA6 A6+B1
SB2 B2-B1
NZ B2,COMPL1
*
SX7 B3 SAVE END TEST
SA0 A2 DO BOUNDS TEST ON NEXT WORD
SX1 2
RJ BOUNDS
*
SB3 X7 RESTORE END TEST
SB1 1 BOUNDS DESTROYED B1
SB2 10
SA2 A2+B1
EQ COMPL1 LOOP THROUGH ALL WORDS
*
COMPD1 MX6 0 CLEAR ONE EXTRA WORD IN CHARACTER BUFFER
SA6 A6+B1
SA6 FONTFLG CLEAR CONTENT FONT
SA6 CSSPERM CLEAR CONTENT SUP/SUB
RJ CONTENT CONTENT THE WORD
ZR X7,COMPERR TEST FOR SOMETHING THERE
SA6 CWD1C SAVE STUDENT WORD
SA7 CWD1D AND HASH
*
SA1 TSPECS MUST CLEAR (AND RESTORE) ALL
BX6 X1 SPECS FLAGS SINCE CKWORDX USES
SA6 COMPSS IT...BUT BITS ARE NOT APPROPRIATE FOR
MX6 0 NOW MAKE SURE ALL SPECS FLAGS = 0
SA6 A1
* FOR -COMPARE-
*
SA1 CWD1C GET INFO ON STUDENT WORD
SA2 CWD1D
* NEED -CWD1C,D- SINCE CONTENT MAY
* SAVE AND RESTORE -A-REGISTERS
SA3 CWD1A GET INFO ON AUTHOR WORD
SA4 CWD1B AND HASH
*
RJ CKWORDX NOW COMPARE THE TWO WORDS
*
SA1 COMPSS NOW RESTORE -SPECS- FLAGS
BX7 X1
SA7 TSPECS
*
COMPDN MX7 0 CLEAR ALL JUDGING FLAGS
NG X6,COMPDZ SEE IF NO MATCH
ZR X6,COMPDZ SEE IF PERFECT MATCH
*
MX7 1
SX1 X6-3 SEPARATE CAPITAL ERROR FROM SPELLING ERROR
NG X1,COMPDCP
LX7 60-JFSPELL SET SPELL BIT
EQ COMPDZ
*
COMPDCP LX7 60-JFCAP SET CAP BIT
*
COMPDZ SA7 TJFLAGS SET JUDGING FLAGS WORD
*
SA1 VARBUF+2
BX5 X1
NPUTVAR STORE X6 RESULT IN USER VAR
EQ PROCESS
*
COMPERR SX6 -1
EQ COMPDN
*
PRECBUF BSS 42 THE SPREAD CHARACTER STRINGS
CWD1A BSS 1 CONTENT PART OF STUDENT WORD
CWD1B BSS 1 HASH PART
CWD1C BSS 1 CONTENT PART OF STUDENT WORD
CWD1D BSS 1 HASH PART
COMPSS BSS 1 SAVE SPECS OVER CALL TO CKWORDX
*
ENDOV
* /--- BLOCK ENDOV 00 000 76/05/17 12.53
*
*
OVTABLE
*
*
END ANSW1$