Assembler for the Burroughs 220 BALGOL Compiler & Library -- 2019-12-21 15:07

Source File: UNPACK.card

START PASS 2

                                                       UNPACK WORDS ROUTINE FOR MRS-081 PROGRAM

                                                       UNPACKS THREE 3-DIGIT CODES PER WORD FROM A ROW OF THE
                                                       PROGRAM-S M(,) ARRAY TO ANOTHER ARRAY ROW.
                                                       PARAMETERS..
                                                         M()           1-DIMENSIONAL SOURCE ROW
                                                         (HIDDEN)      STRIDE OF M PASSED BY BALGOL
                                                         SHEET         SHEET TYPE (0=BROWN, 1=WHITE)
                                                         XRAY          XRAY DATA (0=EXCL, 1=INCL, NOT IMPL)
                                                         EQUATION      EQUATION NUMBER (9 OR 10)
                                                         ROW()         DESTINATION ROW FOR UNPACKED CODES
                                                         (HIDDEN)      STRIDE OF ROW PASSED IN A-REG

                                                       THIS IS THE ORIGINAL VERSION, DISASSEMBLED FROM THE
                                                       PUBLISHED CODE, WITH PARAMETERS IN ASCENDING LOCATIONS
                                                       WITH RESPECT TO THEIR ORDER IN THE BALGOL CALLING
                                                       SEQUENCE, WITH THE (44) FIELD OF THE ENTRY POINT WORD
                                                       SPECIFYING THE BEGINNING OF THE PARAMETER AREA, AS FOR
                                                       THE VERSION OF THE COMPILER DATED 1961-02-20.

            21      0000  7 0099 01 0000   UNPAK NOP 7 *-*,PARAM       ENTRY POINT
            22      0001  8 0002 40 0088         STB 8 SAVEB           SAVE B+R REGS
            23      0002  8 0001 40 0089         STR 8 SAVER
            24      0003  8 0000 46 0086         CLL 8 COUNT           ZERO THE WORD COUNT
            25      0004  8 0000 10 0104         CAD 8 ROW             LOAD ROW() BASE ADDR
            26      0005  8 0410 40 0090         STA 8 ROWA,04         SET ADDR IN ROWA
            27      0006  8 0401 26 0090         IFL 8 ROWA,04,1       INCR ROWA TO ROW(1)
            28      0007  8 0000 10 0091         CAD 8 K2              OFFSET TO M(2)
            29      0008  8 0000 41 0103         LDR 8 EQNR            R = EQUATION NR
            30      0009  8 0210 37 0012         BFR 8 A+,02,10        BRANCH IF EQNR=10

                                                                       UNPACK FOR EQUATION NR NEQ 10

            34      0010  8 0216 26 0086         IFL 8 COUNT,02,16     SET COUNT=16
            35      0011  8 0000 30 0053         BUN 8 F+              BRANCH TO FINISH UP

                                                                       UNPACK FOR EQUATION NR EQL 10

            39      0012  8 0204 26 0086   *A    IFL 8 COUNT,02,4      SET COUNT = 4
            40      0013  8 0000 44 0065         STP 8 UPW             CALL TO UPACK 5 WORDS
            41      0014  8 0000 30 0066         BUN 8 UPW+1
            42      0015  8 0205 26 0086         IFL 8 COUNT,02,5      SET COUNT = 5
            43      0016  8 0421 26 0090         IFL 8 ROWA,04,21      INCR ROWA TO ROW(22)
            44      0017  8 0000 10 0094         CAD 8 K9              OFFSET TO M(9)
            45      0018  8 0000 44 0065         STP 8 UPW             CALL TO UNPACK 6 WORDS
            46      0019  8 0000 30 0066         BUN 8 UPW+1
            47      0020  0 0000 01 0000         NOP   0               (NOT USED)
            48      0021  8 0427 26 0090         IFL 8 ROWA,04,27      INCR ROWA BY 27 TO ROW(49)
            49      0022  8 0000 10 0096         CAD 8 K18             OFFSET TO M(18)
            50      0023  8 0000 44 0065         STP 8 UPW             CALL TO UNPACK 1 WORD (COUNT=0)
            51      0024  8 0000 30 0066         BUN 8 UPW+1
            52      0025  8 0000 10 0101         CAD 8 SHEET           A = SHEET PARAM
            53      0026  8 0201 36 0040         BFA 8 B+,02,1         BRANCH IF SHEET=01

                                                                       PROCESS SHEET NEQ 1 CASE

            57      0027  8 0000 10 0090         CAD 8 ROWA            LOAD CURR ROW() ADDR
            58      0028  8 0410 40 0035         STA 8 C+,04           SET CLL ADDRESS BELOW
            59      0029  0 0000 01 0000         NOP   0               (NOT USED)
            60      0030  8 0201 26 0086         IFL 8 COUNT,02,1      SET COUNT = 1
            61      0031  8 0433 27 0090         DFL 8 ROWA,04,33      DECR ROWA BY 33 TO ROW(16)
            62      0032  8 0000 10 0092         CAD 8 K7              OFFSET TO M(7)
            63      0033  8 0000 44 0065         STP 8 UPW             CALL TO UNPACK 2 WORDS
            64      0034  8 0000 30 0066         BUN 8 UPW+1
            65      0035  0 0000 46 0000   *C    CLL   *-*             CLEAR ROW() CELL SET ABOVE
            66      0036  8 0000 30 0060         BUN 8 EXIT            ALL DONE
            67      0037  0 0000 01 0000         NOP   0               (NOT USED)
            68      0038  0 0000 01 0000         NOP   0               (NOT USED)
            69      0039  0 0000 01 0000         NOP   0               (NOT USED)

                                                                       PROCESS SHEET EQL 1 CASE

            73      0040  8 0000 10 0104   *B    CAD 8 ROW             LOAD ROW() BASE ADDRESS
            74      0041  8 0000 12 0097         ADD 8 K19             OFFSET TO ROW(19)
            75      0042  8 0410 40 0048         STA 8 D+,04           SET STA ADDRESS BELOW
            76      0043  8 0000 10 0099         CAD 8 M               LOAD BASE ADDRESS OF M()
            77      0044  8 0000 12 0093         ADD 8 K8              OFFSET TO M(8)
            78      0045  8 0410 40 0046         STA 8 *+1,04          SET CAD ADDRESS, NEXT
            79      0046  0 0000 10 0000         CAD   *-*             LOAD M(8) WORD AS SET ABOVE
            80      0047  0 0000 48 0006         SRA   6               SHIFT WORD TO 1ST CODE
            81      0048  0 0310 40 0000   *D    STA   *-*,03          STORE CODE IN ROW() AS SET ABOVE
            82      0049  0 0000 01 0000         NOP   0               (NOT USED)
            83      0050  8 0202 26 0086         IFL 8 COUNT,02,2      SET COUNT = 2
            84      0051  8 0409 27 0090         DFL 8 ROWA,04,9       DECR ROWA BY 9 TO ROW(10)
            85      0052  8 0000 10 0095         CAD 8 K15             OFFSET TO M(15)
            86      0053  8 0000 44 0065   *F    STP 8 UPW             CALL TO UNPACK 3 WORDS
            87      0054  8 0000 30 0066         BUN 8 UPW+1
            88      0055  8 0000 30 0060         BUN 8 EXIT            ALL DONE
            89      0056  0 0000 01 0000         NOP   0               (NOT USED)
            90      0057  0 0000 01 0000         NOP   0               (NOT USED)
            91      0058  0 0000 01 0000         NOP   0               (NOT USED)
            92      0059  0 0000 01 0000         NOP   0               (NOT USED)
            93      0060  8 0000 42 0088   EXIT  LDB 8 SAVEB           RESTORE B-REG
            94      0061  8 0000 41 0089         LDR 8 SAVER           RESTORE R-REG
            95      0062  8 0000 10 0000         CAD 8 UNPAK           EXTRACT RETURN ADDRESS
            96      0063  8 0410 40 0064         STA 8 *+1,04          SET RETURN ADDRESS, NEXT
            97      0064  0 0000 30 0000         BUN   *-*             RETURN TO CALLER

                                                       UPW.. SUBROUTINE TO UNPACK A RANGE OF WORDS
                                                         A-REG         OFFSET IN M() TO 1ST SOURCE WORD
                                                         COUNT         COUNT -1 OF WORDS TO UNPACK
                                                         ROWA          ADDR IN ROW() TO 1ST DESTINATION WORD
                                                       RETURNS WITH A, R, AND B OVERWRITTEN, COUNT SET TO 0

           105      0065  0 0000 30 0000   UPW   BUN   *-*             RETURN TO CALLER
           106      0066  8 0000 42 0090         LDB 8 ROWA            ENTRY POINT, B = CURR ROW() ADDR
           107      0067  8 0000 12 0099         ADD 8 M               ADD ADDRESS OF M() TO OFFSET
           108      0068  8 0410 40 0072         STA 8 MA+,04          SET CAD ADDRESS AT OFFSET
           109      0069  8 0410 40 0070         STA 8 *+1,04          SET LDR ADDRESS AT OFFSET
           110      0070  0 0000 41 0000         LDR   *-*             LOAD FIRST WORD OF RANGE
           111      0071  8 0401 26 0072   *NW   IFL 8 *+1,04,1        INCR CAD ADDRESS
           112      0072  0 0000 10 0000   *MA   CAD   *-*             LOAD NEXT WORD INTO A
           113      0073  0 0001 49 0004         SLT   4               ROTATE A+R LEFT TO 1ST CODE
           114      0074  1 0310 40 0000         STA - 0,03            STORE 1ST 3-DIGIT CODE TO ROW()
           115      0075  8 0001 20 0076         IBB 8 *+1,1           INCR ROW() ADDR
           116      0076  0 0001 49 0003         SLT   3               ROTATE A+R TO 2ND CODE
           117      0077  1 0310 40 0000         STA - 0,03            STORE 2ND 3-DIGIT CODE TO ROW()
           118      0078  8 0001 20 0079         IBB 8 *+1,1           INCR ROW() ADDR
           119      0079  0 0001 49 0003         SLT   3               ROTATE A+R TO 3RD CODE
           120      0080  1 0310 40 0000         STA - 0,03            STORE 3RD 3-DIGIT CODE TO ROW()
           121      0081  8 0001 20 0082         IBB 8 *+1,1           INCR ROW() ADDR
           122      0082  8 0201 27 0086         DFL 8 COUNT,02,1      DECREMENT WORD COUNT
           123      0083  8 0000 32 0071         BRP 8 NW-             LOOP IF COUNT NOT EXHAUSTED
           124      0084  8 0000 46 0086         CLL 8 COUNT           OTHERWISE, CLEAR COUNT AND
           125      0085  8 0000 30 0065         BUN 8 UPW             EXIT SUBROUTINE

                                                       STORAGE, CONSTANTS, AND PARAMETERS

           129      0086  0 0000 00 0001   COUNT CNST  1               WORD COUNT FOR UNPACKING
           130      0087  0 0000 01 0000         NOP   0               (NOT USED)
           131      0088  0 0000 01 0000   SAVEB NOP   0               SAVED B-REG
           132      0089  0 0000 01 0000   SAVER NOP   0               SAVED R-REG
           133      0090  0 0000 01 0000   ROWA  NOP   0               CURRENT ROW() ADDR
           134      0091  0 0000 00 0002   K2    HLT   2               CONSTANT 2
           135      0092  0 0000 00 0007   K7    HLT   7               CONSTANT 7
           136      0093  0 0000 00 0008   K8    HLT   8               CONSTANT 8
           137      0094  0 0000 00 0009   K9    HLT   9               CONSTANT 9
           138      0095  0 0000 00 0015   K15   HLT   15              CONSTANT 15
           139      0096  0 0000 00 0018   K18   HLT   18              CONSTANT 18
           140      0097  0 0000 00 0019   K19   HLT   19              CONSTANT 19
           141      0098  0 0000 00 0001         HLT   1               (NOT USED)
           142      0099  4 0000 00 0007   PARAM CNST  40000000007     ALLOCATE STORAGE FOR PARAMETERS
           143      0100                   M     DEFN  PARAM+0         ADDR OF ARRAY M()
           144      0100                   M1STR DEFN  PARAM+1         STRIDE FOR M() (NOT USED, =1)
           145      0100                   SHEET DEFN  PARAM+2         SHEET TYPE
           146      0100                   XRAY  DEFN  PARAM+3         XRAY PARAM (NOT USED)
           147      0100                   EQNR  DEFN  PARAM+4         EQUATION NUMBER
           148      0100                   ROW   DEFN  PARAM+5         ADDR OF OUTPUT ROW() ARRAY
           149      0100  4 0000 99 0000         CNST  40000990000
           150      0101                         FINI


SYMBOL TABLE

   12 *A..1            40 *B..1            35 *C..1            48 *D..1            53 *F..1
   72 *MA.1            71 *NW.1             8 BMOD             86 COUNT           103 EQNR
   60 EXIT             95 K15              96 K18              97 K19              91 K2
   92 K7               93 K8               94 K9               99 M               100 M1STR
   99 PARAM             1 RLO             104 ROW              90 ROWA             88 SAVEB
   89 SAVER           101 SHEET             0 UNPAK            65 UPW             102 XRAY

END PASS 2, ERRORS = 0
