return to main page

1401 Card Deck Formats

from Bob Feretich, July 5th, 2005
comments in italic by Mike Cheponis
[comments in square brackets by Van Snyder - Sept 1, 2005]

Maybe the three above could issue a joint statement :-))

I have looked a bit closer at the 1401 object decks. [ in directory 1401CardDecks ] I noticed some commonality in their structures and decided to explore it. There seems to be three different styles of object deck format.

Style 3 seems to be the most efficient and easiest format to work with. I recommend that we standardize on "Style 3" for any new software that will be downloaded to the 1401. The drawback to Style 3 is that the space that the "Loader" occupies (Locations 201 to 325) can not be used while the "Loader" is running. Since this space resides in the 1403 printer buffer, this should not be a problem. Once the application program gains control those locations become available.

[Style 3] - It was also noticeably slower. In fact, it was just slow enough so that the card reader had to rachet down to a slower number of cards per minute - the additional processing time to decode the load format was such that it slowed down the reader.

The Load Mode decks would be a little bigger, but would load as fast as the card reader could read. THAT's impressive.

To facilitate study, I have reverse engineered and documented the segments of "Style 3". (In a previous life, I had a job which required me to reverse engineer IBM 1401 object decks and Autocoder source so that the programs could be converted to COBOL. Strange, I thought that those brain cells had died out decades ago. ;^) ) The reconstructed source is attached.

Regards,

Bob Feretich


Attached were three files labled:

BootLoader.txt
ClearMemory.txt
Loader.txt
--------------------------------------------------------------------------------

file BootLoader.txt


     *   1         2         3         4        5          6         7
     *789012345678901234567890123456789012345678901234567890123456789012
     *LABEL    OP---OPERAND---------------------------------------------
     * 
     * BOOTLOADER RESIDES ON 4 CARDS, WHICH USUALLY ARE SANDWICHED
     * BETWEEN THE CLEAR MEMORY PROGRAM AND THE APPLICATION PROGRAM.
     * ITS JOB IS TO LOAD AND THE ASSEMBLE MAIN LOADER AND BRANCH TO IT.
     * SOURCE INTERPRETATION BY: BOB FERETICH
     *
     * THE MAIN LOADER OBJECT CODE IS IN SEGMENTS LOCATED IN COLUMNS
     * 40-72 OF THE BOOTLOADER CARDS. THE SOURCE FOR THE
     * MAIN LOADER HAS BEEN DOCUMENTED IN A SEPARATE FILE.
     * FOR THIS FILE, THE MAIN LOADER OBJECT CODE IS DISPLAYED AS 
     * DATA FIELDS.
     *
     * THE BOOTLOADER OPERATES BY USING INSTRUCTION IN COLUMNS 1-39
     * OF EACH CARD TO PIECE THE MAIN LOADER TOGETHER FROM SEGMENTS IN 
     * COLUMNS 40-72 OF THE CARDS. THE SEGMENTS ARE ASSEMBLED 
     * STARTING AT LOCATION 201. 
     * *****************************************************************
     * THE 1401 CARD READER AND PUNCH HARDWARE DOES NOT RECOGNIZE
     * WORD MARKS, SO THE BOOTLOADER NEEDS TO SET ITS OWN.
     * EACH CARD STARTS OUT BY SETTING WORD MARKS THEN LOADING DATA.
     * NOTE THAT THE WORD MARKS ARE NOT EFFECTED WHEN A NEW CARD IS 
     * READ. HOWEVER, THE CLEAR STORAGE INSTRUCT WILL CLEAR WORD MARKS 
     * THAT ARE WITHIN THE REGION IT CLEARS. 
     * *****************************************************************
     * 
               ORG  001    BEGINNING OF PROGRAM - CARD 1 OF 4
     START     SW   INST08,INST15
     *                                                   001 , 008 015
     INST08    SW   INST22,INST29
     *                                                   008 , 022 029
     INST15    SW   INST36,INST40
     *                                                   015 , 036 040
     * MOVE 1ST LOADER SEGMENT TO ASSEMBLY REGION
     INST22    L    071,232  MOVE 40-71 TO 201-232
     *                                                   022 L 071 232
     INST29    SW   205,209  
     *                                                   029 , 205 209
     INST36    R    001      READ NEXT BOOTLOADER CARD
     *                                                   036 1 001
     * FIRST MAIN LOADER OBJECT SEGMENT.
     DATA1     DC   @/080,001V00600611M318260,004275M@
     *                                                   040 ....
     * *****************************************************************
     * BEGIN SECOND CARD 
     * *****************************************************************
               ORG  001    BEGINNING OF PROGRAM - CARD 2 OF 4
     * MOVE 2ND LOADER SEGMENT TO ASSEMBLY REGION
               L    070,263  MOVE 40-70 TO 233-263
     *                                                   001 L 070 263
               SW   217,218
     *                                                   008 , 217 218
               SW   225,232
     *                                                   015 , 225 232
               SW   237,241
     *                                                   022 , 237 241
               SW   248,249
     *                                                   029 , 248 249
               R    001      READ NEXT BOOTLOADER CARD
     *                                                   036 1 001
     * SECOND MAIN LOADER OBJECT SEGMENT.
     DATA2     DC   @M319M003S325005#V209005KM007321@
     *                                                   040 ....
     * *****************************************************************
     * BEGIN THIRD CARD 
     * *****************************************************************
               ORG  001    BEGINNING OF PROGRAM - CARD 3 OF 4
     * MOVE 3RD LOADER SEGMENT TO ASSEMBLY REGION
               L    069,293  MOVE 40-69 TO 264-293
     *                                                   001 L 069 293
               SW   257,271
     *                                                   008 , 257 271
               SW   275,282
     *                                                   015 , 275 282
               SW   290,001
     *                                                   022 , 290 001
               SW   001,001
     *                                                   029 , 001 001
               R    001      READ NEXT BOOTLOADER CARD
     *                                                   036 1 001
     * SECOND MAIN LOADER OBJECT SEGMENT.
     DATA3     DC   @M320000<000A324260B294320_B225@
     *                                                   040 ....
     * *****************************************************************
     * BEGIN FORTH CARD 
     * *****************************************************************
               ORG  001    BEGINNING OF PROGRAM - CARD 4 OF 4
     * MOVE 4TH LOADER SEGMENT TO ASSEMBLY REGION
               L    071,325  MOVE 40-71 TO 294-325
     *                                                   001 L 071 325
               SW   298,306
     *                                                   008 , 298 306
               SW   313,317
     *                                                   015 , 313 317
               SW   319,320
     *                                                   022 , 319 320
               SW   322,325
     *                                                   029 , 322 325
               B    201      BRANCH TO MAIN LOADER
     *                                                   036 B 201
     * SECOND MAIN LOADER OBJECT SEGMENT.
     DATA3     DC   @S320B275321_M225271B25707  0011@
     *                                                   040 ....
               END


--------------------------------------------------------------------------------

file ClearMemory.txt


     *   1         2         3         4        5          6         7
     *789012345678901234567890123456789012345678901234567890123456789012
     *LABEL    OP---OPERAND---------------------------------------------
     * 
     * THE CLEAR MEMORY PROGRAM OFTEN APPEARS AS THE FIRST TWO CARDS OF
     * AN OBJECT DECK. ITS PURPOSE IS SIMPLY TO CLEAR ALL OF MEMORY AND
     * READ THE NEXT CARD. THE NEXT CARD IS TYPICALLY THE START OF THE
     * BOOTSTRAP LOADER.
     * SOURCE INTERPRETATION BY: BOB FERETICH
     *
     * PROGRAM SEQUENCE
     * 1. THE PROGRAM LOADS SOME CODE AND MOVES IT TO LOCATION 81-100.
     * 2. IT THEN READS IN ITS SECOND CARD. 
     * 3. THE PROGRAM LOOPS CLEARING FROM THE TOP OF STORAGE (I9R) TO 
     *      LOCATION 100.
     * 4. MOST OF THAT CODE SEGMENT THAT WAS MOVED IN ITEM 1 IS AGAIN 
     *    MOVED. THIS TIME TO 101-116 AND CONTROL IS PASSED TO IT.
     * 5. LOCATIONS 000-099 ARE CLEARED.
     * 6. THE FIRST BOOTLOADER CARD IS READ.
     * 7. THE LAST REMINANTS OF THE CLEAR MEMORY PROGRAM IS ERASED AS
     *      EXECUTION IS PASSED TO THE BOOTLOADER.
     * 
               ORG  001    BEGINNING OF PROGRAM - CARD 1 OF 2
     * *****************************************************************
     * EACH CARD STARTS OUT BY SETTING WORD MARKS THEN LOADING DATA.
     * NOTE THAT THE WORD MARKS ARE NOT EFFECTED WHEN A NEW CARD IS 
     * READ. HOWEVER, THE CLEAR STORAGE INSTRUCT WILL CLEAR WORD MARKS 
     * THAT ARE WITHIN THE REGION IT CLEARS. 
     * *****************************************************************
     * 
     START     SW   INST08,INST15
     *                                                   001 , 008 015
     INST08    SW   INST22,INST26
     *                                                   008 , 022 026
     INST15    SW   INST30,INST34
     *                                                   015 , 030 034
     INST22    SW   INST41
     *                                                   022 , 041
     INST26    SW   INST45
     *                                                   026 , 045
     INST30    SW   INST53
     *                                                   030 , 053
     * *****************************************************************
     * LOAD (MOVING WORD MARKS TOO) THE DATA FROM COLUMNS 53-72 TO
     * STORAGE LOCATIONS 81-100, READ THE SECOND CARD, AND BRABCH TO IT.
     * *****************************************************************
     INST34    L    072,100
     *                                                   034 L 072 100
     INST41    R    026    READ CARD AND BRANCH TO 026 
     *                                                   041 R 006
     INST45    EQU  045
     * *****************************************************************
     * THESE INSTRUCTIONS ARE MOVED TO LOCATIONS 81-100 AND THEN MOVED
     * TO 101-116. IT IS EXECUTED LATER, AFTER THE SECOND CARD IS READ.
     * *****************************************************************
               ORG  053
     INST53    CS   099        CLEAR STORAGE 000-099
     *                                                   053 / 099
               R               READ 1ST BOOT LOADER CARD
     *                                                   057 1 
               SW   001        SET A WM AT LOCATION 1
     *                                                   058 , 001
     * *****************************************************************
     * THIS CLEARS THE REMAINING SEGMENT OF THE PROGRAM. THE BOOT LOADER
     * CARD DATA, WHICH WAS READ JUST ABOVE, IS NOT EFFECTED BY THIS
     * FINAL CLEAR.
     * *****************************************************************
     * THE INSTRUCTION CLEARS ITSELF TOO, BUT SINCE THE CPU HAS ALREADY
     * FETCHED IT, IT COMPLETES ITS EXECUTION SUCCESSFULLY.
     * *****************************************************************
               CS   001,116     CLEAR 100-116 AND BRANCH TO BOOT LOADER
     *                                                   062 / 001 116
     * *****************************************************************
     * THE BELOW IS USED BY C2L034 TO SUBTRACT 100 FROM THE TARGET 
     * ADDRESS.
     * *****************************************************************
               DC   @I0?@       -100 IN ADDRESS COMPLIMENT FORM
     *                                                   069 IO?
     * *****************************************************************
     * THE BELOW IS USED BY C2L045 TO DETECT THE CLEAR LOOP END
     * CONDITION.
     * *****************************************************************
               DC   @1@
     *                                                   072 1
     *
     * *****************************************************************
     * *****************************************************************
     * *****************************************************************
     * *****   BEGIN THE SECOND CARD                             *******
     * *****************************************************************
     * *****************************************************************
     * *****************************************************************
               ORG  001
     * *****************************************************************
     * EXECUTION ON THIS CARD STARTS AT C2L026 AND LATER BRANCHES 
     * TO 001. THE CARD EXITS BY BRANCHING TO 101 WHERE THE NOMADIC
     * SEGMENT OF CODE WILL RESIDE.
     * *****************************************************************
     * LOAD (MOVING WORD MARKS TOO) THE DATA WHICH STARTED COLUMNS 53-68
     * OF CARD 1 AND IS NOW AT 81-96 TO STORAGE LOCATIONS 101-116.
     * LOCATIONS 97-100 ARE NOT MOVED. LOCS 97-99 CONTAIN THE -100 
     * CONSTANT IN ADDRESS COMPLIMENT FORM. THE CHARACTER AT 100 IS USED
     * TO DETECT THE END CONDITION OF THE CLEAR STORAGE LOOP.
     * *****************************************************************
     C2L001    L    096,116    MOVE INST53 CODE SEGMENT AGAIN
     *                                                   001 L 096 116
               SW   105,106    FINISH PLACING WORD MARKS
     *                                                   008 , 105 106
               SW   110,110    HAD TO MAKE THIS INSTRUCTION 7 CHARS LONG
     *                                                   015 , 110 110
               B    101        GO TO THE CODE THAT WAS MOVED
     *                                                   022 B 101
     C2L026    CS   11999      CLEAR FROM THE TOP OF MEMORY
     *                                                   026 / I9R
               SW   C2L026+1   SET A TEMPORARY WM FOR ADDRESS MOD
     *                                                   030 , 027
     C2L034    MA   099,C2L06+3  ADD -100 TO A-ADDR OF CS INSTRUCTION
     *                                                   034 # 099 029
               CW   C2L026+1   UN-SET THE TEMPORARY WM
     *                                                   041 < 027
     C2L045    BCE  C2L001,100,  EXIT LOOP WHEN CLEARING REACHES 100
     *                                                   045 B 001 100 
               B    C2L026     LOOP TO CLEAR ANOTHER 100 CHARACTERS 
     *                                                   053 B 026
               END



--------------------------------------------------------------------------------

file Loader.txt

     *   1         2         3         4        5          6         7
     *789012345678901234567890123456789012345678901234567890123456789012
     *LABEL    OP---OPERAND---------------------------------------------
     * 
     * THIS IS A LOADER THAT IS LOADED BY THE BOOTLOADER.
     * SOURCE INTERPRETATION BY: BOB FERETICH
     * INPUT IS FROM THE CARD PUNCH. CARD FORMAT IS...
     * COLS 1-3 DESTINATION ADDRESS WHERE THE DATA FROM THE CARD WILL 
     *            START TO LOAD.
     *      4-5 COUNT OF CHARACTER LOCATIONS THAT ARE TO BE LOADED FROM 
     *            THIS CARD.
     *      6   DATA STARTS HERE 
     *
     *      IF A WORD SEPERATOR (WS) CHARACTER APPEARS IN THE DATA AREA 
     *      FOLLOWED BY A NON-WS CHARACTER, THEN THE WS IS TO BE 
     *      DROPPED AND THE WORD MARK BIT IS TO BE TURNED ON FOR THAT 
     *      NEXT CHARACTER. 
     * 
     *      IF A WORD SEPERATOR (WS) CHARACTER APPEARS IN THE DATA AREA 
     *      FOLLOWED BY ANOTHER WS CHARACTER, THEN ONE WS IS TO BE 
     *      DROPPED AND THE OTHER IS TO BE LOADED IN MEMORY. THE WORD
     *      MARK BIT IS NOT TURNED ON. 
     *
     *      THE LAST CARD OF THE DECK BEING LOADED TYPICALLY SPECIFIES 
     *      THE LOAD OF A SINGLE UNCONDITIONAL BRANCH OR CLEAR STORAGE 
     *      AND BRANCH INSTRUCTION (CLEARING THE CARD INPUT AREA 1-80).
     *      THE LOADER DETECTS THE WORD MARK ON LOCATION 006 AND 
     *      BRANCHES TO LOCATION 006. THE CHARACTER COUNT IS ONE MORE
     *      THAN THE NUMBER OF STORAGE LOCATIONS THAT NEED LOADED FROM 
     *      THE CARD. I DO NOT KNOW WHY. 
     *      TYPICAL LAST CARDS...
     *               11111  
     *      12345678901234  <- CARD COLUMN NUMBER
     *      00608_/XXX080   <- CLEAR 000-080 AND BRANCH TO ADDRESS XXX
     *      00605_BXXX     <- UNCONDITIONAL BRANCH TO XXX
     * 
     * LAYOUT OF CARD INPUT AREA
     CARDB     EQU 1      LEFT MOST CHARACTER IN CARD INPUT AREA 
     CDDEST    EQU 1      THREE DIGIT DESTINATION FIELD
     COUNT     EQU 4      TWO DIGIT COUNT FIELD
     GOLOC     EQU 6      GO HERE TO START LOADED PROGRAM
     DATABG    EQU 6      DATA TO BE LOADED BEGINS IN COLUMN 6
     CARDE     EQU 80     RIGHT MOST CHARACTER IN CARD INPUT AREA 
     *
               ORG  201    BEGINNING OF PROGRAM
     * *****************************************************************
     * THIS LOADER INITIALIZES BY CLEARING OUT THE CARD INPUT AREA AND  
     * REESTABLISHING THE TAPE MARK AT LOCATION 001.
     * *****************************************************************
     * 
     START     CS   CARDE  CLEAR THE CARD INPUT AREA
     *                                                   201 / 080
               SW   CARDB  PUT BACK THE STARTING WORD MARK WE CLEARED
     * *****************************************************************
     * IF WE SET A WORD MARK (WM) IN COLUMN 6, START THE PROGRAM BY 
     * BRANCHING TO THE INSTRUCTION AT THIS LOCATION. THIS EXITS THE
     * LOADER PROGRAM.
     * *****************************************************************
     MAINLP    BW   GOLOC,GOLOC  IF WORD MARK APPEARS GOTO IT
     *                                                   209 V 006 006 1
               R                 READ THE NEXT CARD
     *                                                   217 1
               MLC  STRTAD+1,MV1+3  THE 1ST CHAR PAIR IS AT COLUMN 6 & 7
     *                                                   218 L 318 260
     * *****************************************************************
     * THIS IS THE BEGINNING OF A LOOP THAT PROCESSES EACH CHARACTER
     * ON THE CARD. THE LOOP STARTS BY SETTING A WM AT 004 TO MARK THE 
     * COUNT FIELD IN THE CARD AREA. IT ALSO POSITIONS THE A-REG TO THE 
     * CARDS DESTINATION ADDRESS FIELD AND THE B-REG TO THE  
     * DESTINATION FIELD OF THE MV2 INSTRUCTION. 
     * *****************************************************************
     CLOOP     SW   COUNT,MV2NSI   SET WM FOR CNT SRC & SETUP B-REG
     *                                                   225 , 004 275
     * *****************************************************************
     * THE INSTRUCTION LABELED UCW HAS BOTH ITS OPCODE AND A-ADDR 
     * MODIFIED. IT SWITCHES BETWEEN A SW AND CW INSTRUCTION. THE
     * INSTRUCTION SHOULD SET A WM IF A WORD SEPERATOR (WS) CHARACTER IS
     * THE FIRST CHARACTER IN THE CHARACTER PAIR. THE WS CHARACTER IS
     * THEN REPLACED BY THE REAL CHARACTER THAT IS SUPPOSED TO RESIDE 
     * AT THE LOCATION. IF THE THE FIRST CHARACTER OF THE PAIR IS NOT 
     * A WS THEN THE WM IS CLEARED AT THE STORAGE DESTINATION LOCATION.
     * *****************************************************************
               MLC               MOVE DEST ADDR TO UCW+3
     *                                                   232 M
     * *****************************************************************
     * THE NEXT INSTRUCTION MODIFIES THE OPCODE OF UCW TO MAKE IT A
     * CLEAR WORD MARK (CW) INSTRUCTION. IT ALSO SETS UP THE B-REG TO 
     * POINT TO THE DESTINATION ADDRESS OF MV2.
     * *****************************************************************
               MLC  CWOP  REESTABLISH CW OPCODE, ASSUME NOT WS
     *                                                   233 M 319
     * *****************************************************************
     * MOVE THE ADDRESS OF THE NEXT STORAGE LOCATION TO BE LOADED 
     * INTO THE DESTINATION ADDRESS FIELD OF MV2.
     * *****************************************************************
               MLC  CDDEST+3     MOVE DEST ADDR TO MV2 DEST
     *                                                   237 M 003
     * *****************************************************************
     * DECRIMENT THE CARDS COUNT FIELD.
     * *****************************************************************
               S    ONE,COUNT+1  DECRIMENT COUNT
     *                                                   241 S 325 005
     * *****************************************************************
     * INCREMENT THE CARDS DESTINATION ADDRESS FIELD. 
     * *****************************************************************
               MA                ADD ONE TO CARDS DEST PTR
     *                                                   248 #
     * *****************************************************************
     * IF THE CARDS COUNT FIELD<0 THEN READ A NEW CARD 
     * *****************************************************************
               BM   MAINLP,COUNT+1  LOOP IF COUNT<0
     *                                                   249 V 209 005 K
     * *****************************************************************
     * MOVES A CHARACTER PAIR TO THE CHARS BUFFER. THE INSTRUCTIONS 
     * SOURCE ADDRESS IS MODIFIED TO TRACK THE ACTIVE CARD READER
     * AREA SOURCE COLUMN. 
     * *****************************************************************
     MV1       M    SRCCOL,CHARS+1  MOVE NEXT PAIR OF CHARACTERS
     *                                                   257 M 007 321
     * *****************************************************************
     * MOVES LEFT CHARACTER OF THE CHARS PAIR TO THE STORAGE DESTINATION
     * LOCATION TO BE LOADED. ITS DESTINATION FIELD IS INCREMENTED 
     * TO MOVE DATA THE NEXT STORAGE LOCATION TO BE LOADED.
     * *****************************************************************
     MV2       M    CHARS,000    MOVE LEFT CHAR TO UPDATED ADDR
     *                                                   264 M 320 000
     MV2NSI    EQU  *
     * *****************************************************************
     * THE NEXT INSTRUCTION IS ALTERED TO EITHER SET OR CLEAR A WORD
     * MARK DEPENDING ON WHETHER THE FIRST CHARACTER OF THE CHARACTER
     * PAIR IS A WORD SEPARATOR. IF ITS A WORD SEPARATOR, THEN WE SET
     * A WORD MARK.
     * *****************************************************************
     UCW       CW   000          CLEAR WM AT DEST ADDR
     *                                                   271 < 000
     * *****************************************************************
     * INCREMENT COL PTR BY 1
     * *****************************************************************
     INCCOL    A    ONEADR,MV1+3  INCREMENT COL PTR BY 1
     *                                                   275 A 324 260
     * *****************************************************************
     * BRANCH IF THE CHAR MOVED WAS WS TO DO MORE WORK BEFORE MOVING TO 
     * NEXT CHARACTER. OUR WORK IS NOT DONE YET.
     * *****************************************************************
               BCE  SKIP1,CHARS,_  BRANCH IF THE CHAR MOVED WAS WS
     *                                                   282 B 294 320 _
     * *****************************************************************
     * IF  WE ARE HERE THEN WE MOVED A NON WS CHARACTER, SO OUR WORK
     * IS COMPLETE AND WE CAN PROCEED TO LOAD THE NEXT CHARACTER.
     * *****************************************************************
               B    CLOOP   JUST MOVED A NON-WS CHARACTER 
     *                                                   290 B 225
     * *****************************************************************
     * IF WE ARE HERE WE JUST MOVED A WORD SEPARATOR (WS) CHARACTER.
     * WE NEED TO MOVE THE NEXT CHARACTER TO THAT SPOT AND SET THE
     * WORD MARK BIT IN THAT CHARACTER. CHARS CONTAINS A WS FOLLOWED 
     * BY THE REAL CHARACTER.
     * NOTE THAT IF BOTH CHARACTERS IN A PAIR ARE WS THEN THE LOADER
     * IS TO LOAD ONE WS.
     * *****************************************************************
     * WE MAY BE GOING BACK A FEW STEPS, SO ZERO OUT THE FIRST CHAR
     * WS SO THAT IT DOESN'T SEND US BACK THIS WAY.
     * *****************************************************************
     SKIP1     S    CHARS        ZERO THE FIRST CHAR IN PAIR 
     *                                                   294 S 320
     * *****************************************************************
     * IF THE SECOND CHARACTER OF THE PAIR IS ALSO A WORD SEPARATOR(WS),
     * THEN BRANCH TO SKIP OVER THE WS IN THE CARD, SO THAT ONE OF
     * THE PAIR OF WORD SEPARATORS IS COMPRESSED OUT.
     * *****************************************************************
               BCE  INCCOL,CHARS+1,_  BRANCH IS 2ND CHAR IS WS TOO
     *                                                   298 B 275 321 _
     * *****************************************************************
     * IF WE ARE HERE THEN WE HAVE A WS FOLLOWED BY A REGULAR CHARACTER
     * AND WE NEED TO...
     * 1. MOVE SET A WORD MARK AT THE CURRENT DEST LOCATION.
     * 2. MOVE THE REGULAR CHARACTER TO THE DESTINATION STORAGE LOCATION
     *    OVERLAYING THE WS THAT WE PUT THERE A MOMENT AGO.
     * *****************************************************************
     * ALTER THE OPCODE OF THE UCW INSTRUCTION TO MAKE IT A SM.
     * *****************************************************************
               MLC  CLOOP,UCW  ALTER UCW OPCODE TO BE A SET WORD MARK
     *                                                   306 M 225 271
     * *****************************************************************
     * LOOP BACK TO MOVE THE REGULAR CHARACTER AND SET THE WORD MARK.
     * *****************************************************************
               B    MV1      MOVE THE NEXT PAIR OF CHARS
     *                                                   313 B 257
     * *****************************************************************
     * *****************************************************************
     * *****   BEGIN CONSTANTS AND DATA VARIABLE AREA          *********
     * *****************************************************************
     * *****************************************************************
     * USED TO START CARD COLUMN PROCESSING AT COLUMN 6-7 TO FETCH THE
     * FIRST CHARACTER PAIR. ITS MOVED EVERY TIME A NEW CARD IS READ.
     * *****************************************************************
     STRTAD    DCW  @07@         1ST CHAR PAIR IS IN CARD COLUMN 6 & 7
     *                                                   317 07
     * *****************************************************************
     * USED TO REINITIALIZE THE OPCODE OF THE UCW INSTRUCTION TO CW.
     * *****************************************************************
     CWOP      CW                A CLEAR WORD MARK OPCODE
     *                                                   319 <
     * *****************************************************************
     * BEWARE. ADDRESS CHAINING IS USED BETWEEN THE BELOW FIELDS.
     * DO NOT CHANGE THEIR ORDER OR INSERT NEW FIELDS.  
     * *****************************************************************
     * A TWO CHARACTER BUFFER. A PAIR OF CHARACTERS IS MOVED HERE BY THE
     * MV1 INSTRUCTION. THE PROGRAM USES THIS A AN INTERMEDIATE BUFFER.
     * THE MV2 INSTRUCTION MOVES THE 1ST CHARACTER IN THE CHARS BUFFER
     * TWO ITS LOAD DESTINATION LOCATION. A PAIR OF CHARACTERS IS USED
     * BECAUSE WORD SEPARATOR CHARACTERS NOT SUPPOSED TO BE LOADED AS 
     * DATA, BUT RATHER THEY INDICATE THAT THE NEXT SEQUENTIAL
     * CHARACTER IS TO BE LOADED WITH ITS WORD MARK BIT TURNED ON.
     * IF BOTH CHARACTER IN THE PAIR ARE WS CHARACTERS, THEN THE LOADER
     * IS SUPPOSED TO DROP ONE WS AND LOAD THE OTHER.
     * THE PAIR BUFFER GIVE THE LOADER A CONVIENENT SPOT TO EXAMINE 
     * BOTH CHARACTERS OF THE PAIR.
     * *****************************************************************
     CHARS     DCW  #2           CURRENT CHARACTER LEFT MAY BE WS
     *                                                   320 
     * *****************************************************************
     * A CONSTANT 1 USED TO INCREMENT ADDRESSES. 
     * *****************************************************************
     ONEADR    DCW  @001@        INITIAL TO 1, THEN DOUBLES
     *                                                   322 001
     * *****************************************************************
     * A CONSTANT 1. USED TO DECRIMENT COUNTERS.
     * *****************************************************************
     ONE       DCW  @1@          SINGLE DIGIT CONSTANT 1 AND READ OP
     *                                                   325 1 
     * *****************************************************************
     * THE BELOW LABEL IS JUST USED TO MAKE SOME OF THE CODE MORE 
     * READABLE. THE OPERANDS THAT REFERENCE IT ARE INITIALIZE TO 7,
     * BUT THEY ARE ALTERED BY OTHER INSTRUCTIONS.
     * *****************************************************************
     SRCCOL    EQU  7     ADDR FIELD STARTS AS 7 GETS INCREMENTED
               END



return to
main page