U2PLOT1

Table Of Contents
  • [00004] PLOT1 SUBROUTINE
u2plot1.lst
ASM1130 CROSS ASSEMBLER V1.22 -- V2M12 -- Sun Nov  1 19:25:09 2020
 
Source File: \u2plot1.asm 
PLOT1 SUBROUTINE
 
                             2 | *************************************************** U2G00020
                             3 | *STATUS - VERSION 2, MODIFICATION 8               * U2G00022
                             4 | *                                                 * U2G00024
                             5 | *SUBROUTINE NAME -                                * U2G00026
                             6 | *   FULL NAME - N/A                               * U2G00028
                             7 | *   CODE NAME - PLOT1                             * U2G00030
                             8 | *                                                 * U2G00032
                             9 | *PURPOSE-                                         * U2G00034
                            10 | *   THIS SUBROUTINE OPERATES THE IBM 1627 PLOTTER.* U2G00036
                            11 | *   IT CAN DO A TEST OR A PLOT FUNCTION.          * U2G00038
                            12 | *                                                 * U2G00040
                            13 | *METHOD - N/A                                     * U2G00043
                            14 | *                                                 * U2G00046
                            15 | *CAPABILITIES AND LIMITATIONS -                   * U2G00050
                            16 | *   SEE IBM 1130 SUBROUTINE LIBRARY MANUAL        * U2G00053
                            17 | *                                                 * U2G00056
                            18 | *SPECIAL FEATURES -                               * U2G00060
                            19 | *   THIS SUBROUTINE IS CALLED WITH THE DATA IN A  * U2G00063
                            20 | *   USER BUFFER.  DATA MAY HAVE A REPETITION COUNT* U2G00066
                            21 | *   ISS SUBROUTINE PLOTX MAY ONLY BE CALLED WITH A* U2G00070
                            22 | *   SINGLE DATA ITEM, BUT IT ACCUMULATES THEM IN  * U2G00073
                            23 | *   ITS OWN SMALL BUFFER.                         * U2G00076
                            24 | *EXTERNAL REFERENCES -                            * U2G00080
                            25 | *   $IOCT                                         * U2G00081
                            26 | *   $PRET                                         * U2G00083
                            27 | *   $PST3                                         * U2G00084
                            28 | *                                                 * U2G00090
                            29 | *ADDITIONAL INFORMATION -                         * U2G00093
                            30 | *   ERROR PROCEDURES -                            * U2G00096
                            31 | *      PAUSE AT $PRET OR $PST3 IF PLOTTER NOT     * U2G00100
                            32 | *      READY.                                     * U2G00103
                            33 | *      THE ERROR SUBROUTINE PARAMETER IS NOT USED,* U2G00106
                            34 | *      BUT IS REQUIRED FOR COMPATABILITY WITH THE * U2G00110
                            35 | *      IBM 1800 VERSION OF THIS SUBROUTINE.       * U2G00113
                            36 | *                                                 * U2G00116
                            37 | *   CALLING SEQUENCE -                            * U2G00120
                            38 | *     LIBF    PLOT1     CALL PLOTTER BUSY TEST    * U2G00123
                            39 | *     DC      /0000     CONTROL PARAMETER         * U2G00126
                            40 | *     .                 RETURNS HERE IF BUSY      * U2G00130
                            41 | *     .                 RETURNS HERE IF NOT BUSY  * U2G00133
                            42 | *                                                 * U2G00136
                            43 | *     LIBF    PLOT1     CALL PLOTTER OUTPUT       * U2G00140
                            44 | *     DC      /X000     CONTROL PARAMETER         * U2G00143
                            45 | *     DC      IOAR      I/O AREA PARAMETER        * U2G00146
                            46 | *     DC      ERROR     ERROR PARAMETER (NOT USED)* U2G00150
                            47 | *     .                                           * U2G00160
                            48 | *     .                                           * U2G00170
                            49 | *IOAR DC      F         WORD COUNT                * U2G00180
                            50 | *     BSS     H         I/O AREA                  * U2G00181
                            51 | *                                                 * U2G00185
                            52 | *NOTES -                                          * U2G00186
                            53 | *                                                 * U2G00190
                            54 | *      THE MAINLINE FLOW MAY BE ALTERED BY THE    * U2G00192
                            55 | *   USER AT $PRET WITHOUT AFFECTING THE           * U2G00193
                            56 | *   POSSIBILITY OF AN ENTIRELY NEW LIBF PLOT1 AT  * U2G00194
                            57 | *   SOME LATER TIME.                              * U2G00195
                            58 | *************************************************** U2G00200
                            59 | *     EJCT        BLK REMOVED                       U2G00205
                            60 |       LIBR                                          U2G00210
0000                        61 | 1130  ISS  07 PLOT1     3                           U2G00220
0000 6912                   62 | PLOT1 STX   1 XR1+1     CALL ENTRANCE          (+0) U2G00250
0001 6580 0000              63 |       LDX  I1 *-*       LIBF+1 INTO XR1             U2G00260
0003 7002                   64 |       MDX     STAR      BR TO PROCESS LIBF          U2G00270
0004 0000                   65 | INT1  DC      0         INTERRUPT ENTRANCE     (+4) U2G00280
0005 7040                   66 |       MDX     IPRG      BR TO SERVICE INTERRUPT     U2G00290
0006 280D                   67 | STAR  STS     STAT      SAVE STATUS                 U2G00320
0007 D838                   68 |       STD     SAVAQ     SAVE A AND Q REGS           U2G00330
0008 C100                   69 |       LD    1 0         GET THE CONTROL WORD        U2G00340
0009 180C                   70 |       SRA     12        IS FUNCTION TEST            U2G00350
000A 4C20 0017R             71 |       BSC  L  LEGAL,Z   NO, CONTINUE AT LEGAL       U2G00360
000C C02B                   72 |       LD      BUSY      YES, IS ROUTINE BUSY        U2G00370
000D 4818                   73 |       BSC     +-                                    U2G00380
000E 7101                   74 | RETRN MDX   1 1         NO, RETURN TO LIBF+3        U2G00390
000F 7101                   75 |       MDX   1 1         YES, RETURN TO LIBF+2       U2G00400
0010 C82F                   76 | RESET LDD     SAVAQ     RESTORE ACC AND EXT         U2G00410
0011 6904                   77 |       STX   1 RET+1     SET UP RETURN               U2G00420
0012 6500 0000              78 | XR1   LDX  L1 *-*       RESTORE XR1                 U2G00430
0014 2000                   79 | STAT  LDS     *-*       RESTORE STATUS              U2G00440
0015 4C00 0000              80 | RET   BSC  L  *-*       RETURN                      U2G00450
0017 1801                   81 | LEGAL SRA     1         IS FUNCTION = WRITE         U2G00460
0018 4C18 0020R             82 |       BSC  L  WRT,+-    YES                         U2G00470
001A C01C                   83 | ILLGL LD      C7001     NO, LD ILLEGAL CALL CODE    U2G00480
001B 71FF                   84 | ERRET MDX   1 -1                                    U2G00490
001C 6D00 0028              85 |       STX  L1 $PRET     LIBF ADDR INTO CORE LOC 40  U2G00500
001E 6129                   86 |       LDX   1 $PRET+1   SET TO EXIT TO CORE LOC 41  U2G00510
001F 70F1                   87 |       MDX     RESET+1   GO EXIT                     U2G00520
                            88 | *                                                   U2G00530
                            89 | *THIS SECTION SETS UP THE ROUTINE TO PLOT THE       U2G00540
                            90 | *FIRST CHARACTER.                                   U2G00550
0020 C017                   91 | WRT   LD      BUSY      IS ROUTINE BUSY             U2G00560
0021 4C20 0020R             92 |       BSC  L  WRT,Z     LOOP IF BUSY                U2G00570
0023 6814                   93 |       STX   0 BUSY      SET BUSY INDR               U2G00580
0024 6864                   94 |       STX   0 FIRST     SET FIRST CHAR INDR         U2G00590
0025 C01E                   95 |       LD      C0005     SET HEX DIGIT COUNTER       U2G00740
0026 D017                   96 |       STO     DIGIT     TO 5 FOR FIRST TIME         U2G00750
0027 C580 0001              97 |       LD   I1 1         SET UP WORD COUNT           U2G00760
0029 4C08 001AR             98 |       BSC  L  ILLGL,+   BR IF WORD COUNT BAD        U2G00770
002B D010                   99 |       STO     WDCNT                                 U2G00780
002C C101                  100 |       LD    1 1         AND I/O AREA                U2G00790
002D 8015                  101 |       A       C0001                                 U2G00800
002E D013                  102 |       STO     IOAR                                  U2G00810
002F C480 0042R            103 |       LD   I  IOAR      PUT FIRST WORD IN BUF       U2G00820
0031 D007                  104 |       STO     BUF                                   U2G00830
0032 7401 0032             105 |       MDX  L  $IOCT,1   INCR MONITOR I/O COUNTER    U2G00880
0034 1000                  106 |       NOP                                           U2G00890
0035 7101                  107 |       MDX   1 1         XR1 PTS TO ERROR RTN ADDR   U2G00900
0036 7013                  108 |       MDX     ALPHA     BR TO SERVICE FIRST CHAR    U2G00950
                           109 | *                                                   U2G00990
                           110 | *CONSTANTS AND BUFFER AREA                          U2G01000
                           111 | *                                                   U2G01010
0037 7001                  112 | C7001 DC      /7001     ILLEGAL CALL ERROR CODE     U2G01020
0038 0000                  113 | BUSY  DC      *-*       DEVICE BUSY INDR            U2G01060
0039 0000                  114 | BUF   DC      *-*       O/P BUFFER                  U2G01080
003A                       115 |       BSS  E  0                                     U2G01090
003A 0000                  116 | IOCC  DC      *-*       WRITE 1627 PLOTTER IOCC     U2G01100
003B 2900                  117 |       DC      /2900                                 U2G01110
003C 0000                  118 | SENSE DC      *-*                                   U2G01120
003CR                      119 | WDCNT EQU     *-1       I/O AREA WORD COUNT         U2G01130
003D 2F00                  120 |       DC      /2F00     SENSE PLOTTER IOCC          U2G01140
003E 0000                  121 | SENSR DC      *-*                                   U2G01142
003ER                      122 | DIGIT EQU     *-1       HEX DIGIT COUNTER           U2G01144
003F 2F01                  123 |       DC      /2F01     SENSE PLOTTER RESET IOCC    U2G01146
0040 0000                  124 | SAVAQ DC      *-*       SAVE ACC AND EXT            U2G01150
0041 0000                  125 |       DC      *-*       *                           U2G01160
0042 0000                  126 | IOAR  DC      *-*       I/O ADDR STG                U2G01170
0043 0001                  127 | C0001 DC      /0001     PARITY ERROR CODE           U2G01180
0044 0005                  128 | C0005 DC      /0005     CON FOR SETTING HEX CTR     U2G01190
0045 7000                  129 | C7000 DC      /7000     DVC NOT RDY ERROR CODE      U2G01200
0028                       130 | $PRET EQU     40        PRE-OPERATIVE ERROR TRAP    U2G01210
0032                       131 | $IOCT EQU     50        ISS COUNTER                 U2G01220
0089                       132 | $PST3 EQU     /89       POST-OPERATIVE ERROR TRAP   U2G01230
                           133 | *                                                   U2G01240
                           134 | *THIS PORTION THE PROGRAM SERVICES THE OP COMPLETE  U2G01250
                           135 | *INTERRUPTS FROM THE PLOTTER ON LEVEL 03.           U2G01260
                           136 | *                                                   U2G01270
0046 08F7                  137 | IPRG  XIO     SENSR     SENSE WITH RESET DSW        U2G01290
0047 74FF 00ACR            138 |       MDX  L  DUPCT,-1  ANY MORE DUPLICATES         U2G01360
0049 7022                  139 |       MDX     PLOTC     YES,GO PLOT AGAIN           U2G01370
004A 1010                  140 | ALPHA SLA     16        NO,ZERO DUPLICATE COUNT     U2G01380
004B D060                  141 |       STO     DUPCT                                 U2G01390
004C 403D                  142 | ALPH2 BSI     GET       SUBROUTINE TO GET DIGIT     U2G01400
004D 905F                  143 |       S       C000D     IS DIGIT D, E, OR F         U2G01410
004E 4C10 004CR            144 |       BSC  L  ALPH2,-   YES.NOT USED.GET NEXT DIGIT U2G01420
0050 805D                  145 |       A       C0003     NO, IS DIGIT A,B,C          U2G01430
0051 4C28 0069R            146 |       BSC  L  LOOK,+Z   NO, IS 0-9.SINGLE INST      U2G01440
0053 4C20 005AR            147 |       BSC  L  BC,Z      YES, MEANS DUPLICATE        U2G01450
                           148 | *                       CHAR IS B OR C ,BR          U2G01460
0055 4034                  149 |       BSI     GET       CHAR IS A --GET COUNT       U2G01470
0056 D055                  150 | BCM5  STO     DUPCT                                 U2G01480
0057 4C20 006CR            151 |       BSC  L  PLOTC,Z   BR IF DUPLICATE TO PLOT     U2G01510
0059 70F0                  152 |       MDX     ALPHA     DO NOT PLOT IF COUNT = 0    U2G01520
                           153 | *                                                   U2G01530
                           154 | *THIS SECTION DUPLICATES UP TO 255 TIMES  (B)       U2G01540
                           155 | *                                                   U2G01550
005A 90E8                  156 | BC    S       C0001     IS CHAR C                   U2G01560
005B 4C20 0063R            157 |       BSC  L  C,Z       YES,BR                      U2G01570
005D 402C                  158 |       BSI     GET       NO, CHAR IS B               U2G01580
005E 1004                  159 | CM5   SLA     4         GET A DIGIT                 U2G01590
005F D04C                  160 |       STO     DUPCT     SHIFT TO ALLOW FOR NEXT     U2G01600
0060 4029                  161 |       BSI     GET       GET LAST DIGIT              U2G01610
0061 E84A                  162 |       OR      DUPCT                                 U2G01620
0062 70F3                  163 |       MDX     BCM5      PUT COUNT IN DUPCT          U2G01630
                           164 | *                                                   U2G01640
                           165 | *THIS SECTION DUPLICATES UP TO 4095 TIMES  (C)      U2G01650
                           166 | *                                                   U2G01660
0063 4026                  167 | C     BSI     GET       GET FIRST DIGIT             U2G01670
0064 1004                  168 |       SLA     4                                     U2G01680
0065 D046                  169 |       STO     DUPCT                                 U2G01690
0066 4023                  170 |       BSI     GET       AND SECOND DIGIT.           U2G01700
0067 E844                  171 |       OR      DUPCT                                 U2G01710
0068 70F5                  172 |       MDX     CM5       GO TO OTHER AREA TO GET 3RD U2G01720
0069 C045                  173 | LOOK  LD      CTRL      DIGIT IS FROM 0-9           U2G01730
006A 8040                  174 |       A       WORK                                  U2G01740
006B D0CE                  175 |       STO     IOCC      ADDR FOR CONTROL            U2G01750
                           176 | *                                                   U2G01760
                           177 | *THIS SECTION ACTIVATES THE PLOTTER                 U2G01770
                           178 | *                                                   U2G01780
006C 08CF                  179 | PLOTC XIO     SENSE     SENSE DSW WITHOUT RESET     U2G01790
006D 100E                  180 |       SLA     14                                    U2G01800
006E 4C20 0076R            181 |       BSC  L  NR,Z      NOT RDY BUSY-TO ERROR TRAP  U2G01810
0070 C018                  182 |       LD      FIRST     IS THE CHAR THE FIRST       U2G01820
0071 4C20 0085R            183 |       BSC  L  FST,Z     YES, GO TO RET TO CALL      U2G01830
                           184 | *                       *      ENTRANCE PORTION     U2G01840
0073 08C6                  185 |       XIO     IOCC      **** PLOT ****              U2G01850
0074 4C80 0004R            186 | EXIT  BSC  I  INT1      RET TO ILS 03               U2G01860
                           187 | *                                                   U2G01870
                           188 | *EXIT TO POST-OPERATIVE ERROR TRAP WITH NOT READY   U2G01880
                           189 | *ERROR CODE IN THE ACCUMULATOR.                     U2G01890
                           190 | *                                                   U2G01900
0076 C0CE                  191 | NR    LD      C7000     ERROR CODE INTO ACC         U2G01910
0077 7400 0089R            192 |       MDX  L0 FIRST,0   IS THIS THE FIRST DIGIT     U2G01914
0079 7003                  193 |       MDX     NRPRT     YES, BR MAINLINE            U2G01916
007A 4400 0089             194 |       BSI  L  $PST3     BR TO LEVEL 3 TRAP          U2G01920
007C 70EF                  195 |       MDX     PLOTC     TRY AGAIN                   U2G01930
                           196 | *                                                   U2G01931
                           197 | *SET UP TO START LIBF PLOT1 AGAIN AFTER $PRET TRAP  U2G01932
                           198 | *                                                   U2G01933
007D 74FF 0032             199 | NRPRT MDX  L0 $IOCT,-1  CANCEL MONITOR I/O          U2G01934
007F 1000                  200 |       NOP               *COUNTER INCREMENT          U2G01935
0080 1810                  201 |       SRA     16        CANCEL THIS SUBROUTINE      U2G01936
0081 D0B6                  202 |       STO     BUSY      *BUSY INDICATOR             U2G01937
0082 71FF                  203 |       MDX   1 -1        DECR POINTER TO LIBF        U2G01938
0083 C0C1                  204 |       LD      C7000     ERROR CODE INTO ACC         U2G01939
0084 7096                  205 |       MDX     ERRET     BR $PRET, THEN LIBF PLOT1   U2G01940
                           206 | *                                                   U2G01941
                           207 | *CHAR IS THE FIRST TO BE O/P.DONT RET TO ILS 03,    U2G01950
                           208 | *BUT TO MAINLINE.                                   U2G01960
                           209 | *                                                   U2G01970
0085 1010                  210 | FST   SLA     16        ZERO THE FIRST INDR         U2G01980
0086 D002                  211 |       STO     FIRST                                 U2G01990
0087 08B2                  212 |       XIO     IOCC      PLOT                        U2G02000
0088 7085                  213 |       MDX     RETRN     RETURN TO MAINLINE          U2G02010
0089 0000                  214 | FIRST DC      *-*       FIRST CHAR INDR             U2G02020
008A 0000                  215 | GET   DC      0         SAVE RET ADDR               U2G02030
                           216 | *                                                   U2G02040
                           217 | *THIS SUBROUTINE  GETS A HEXADECIMAL DIGIT          U2G02050
                           218 | *                                                   U2G02060
008B 74FF 003ER            219 |       MDX  L  DIGIT,-1  DECR DIGIT COUNT            U2G02070
008D 7013                  220 |       MDX     SHIFT     IF NOT ZERO,GO GET DIGIT    U2G02080
008E 7404 003ER            221 |       MDX  L  DIGIT,4   IF ZERO,RESET TO 4          U2G02090
0090 74FF 003CR            222 |       MDX  L  WDCNT,-1  DECRE WORD COUNT            U2G02100
0092 7009                  223 |       MDX     IOBUF     IF WD CNT NOT ZERO,GET WD   U2G02110
0093 74FF 0032             224 |       MDX  L  $IOCT,-1  IF ZERO, DECRE ISS CTR      U2G02120
0095 1000                  225 |       NOP                                           U2G02130
0096 1010                  226 |       SLA     16        ZERO ROUTINE BUSY INDR      U2G02140
0097 D0A0                  227 |       STO     BUSY                                  U2G02150
0098 C0F0                  228 |       LD      FIRST                                 U2G02160
0099 4C20 000ER            229 |       BSC  L  RETRN,Z   RETURN TO MAINLINE IF FIRST U2G02170
009B 70D8                  230 |       MDX     EXIT      RET TO ILS03 IF NOT FIRST   U2G02180
                           231 | *                                                   U2G02190
                           232 | *THIS SECTION GETS THE NEXT WORD, AND DOES A SHIFT  U2G02200
                           233 | *TO ISOLATE THE NEXT HEX DIGIT.                     U2G02210
                           234 | *                                                   U2G02220
009C 7401 0042R            235 | IOBUF MDX  L  IOAR,1    NEXT WORD IN I/O AREA       U2G02230
009E C480 0042R            236 |       LD   I  IOAR                                  U2G02240
00A0 D098                  237 |       STO     BUF       PUT NEXT WD IN O/P BUFFER   U2G02250
00A1 C097                  238 | SHIFT LD      BUF       GET BUFFER WD               U2G02260
00A2 1890                  239 |       SRT     16        PUT IN EXT.                 U2G02270
00A3 1010                  240 |       SLA     16        CLEAR ACC.                  U2G02280
00A4 1084                  241 |       SLT     4         4 BITS FOR HEX DIGIT        U2G02290
00A5 D005                  242 |       STO     WORK      SAVE THE DIGIT              U2G02300
00A6 1090                  243 |       SLT     16        SET UP BUFFER FOR NEXT LOOP U2G02310
00A7 D091                  244 |       STO     BUF                                   U2G02320
00A8 C002                  245 |       LD      WORK      PUT DIGIT IN ACC            U2G02330
00A9 4C80 008AR            246 |       BSC  I  GET       RET TO CALL                 U2G02340
                           247 | *                                                   U2G02350
                           248 | *CONSTANTS AND BUFFER AREA                          U2G02360
                           249 | *                                                   U2G02370
00AB 0000                  250 | WORK  DC      *-*       BUFFER TO SAVE DIGIT        U2G02380
00AC 0000                  251 | DUPCT DC      *-*       DUPLICATE COUNT BUFFER      U2G02390
00AD 000D                  252 | C000D DC      /000D     TEST FOR CHAR D,E, OR F     U2G02400
00AE 0003                  253 | C0003 DC      /0003     CON OF 3                    U2G02410
                           254 | *TABLE OF CONTROL WORDS                             U2G02420
00AF 00B0R                 255 | CTRL  DC      CONTL     CONTROL TABLE ADDR          U2G02430
00B0 8000                  256 | CONTL DC      /8000     PEN DOWN                    U2G02440
00B1 0800                  257 |       DC      /0800     +Y                          U2G02450
00B2 4800                  258 |       DC      /4800     +Y+Y                        U2G02460
00B3 4000                  259 |       DC      /4000     +X                          U2G02470
00B4 5000                  260 |       DC      /5000     +X-Y                        U2G02480
00B5 1000                  261 |       DC      /1000     -Y                          U2G02490
00B6 3000                  262 |       DC      /3000     -X-Y                        U2G02500
00B7 2000                  263 |       DC      /2000     -X                          U2G02510
00B8 2800                  264 |       DC      /2800     -X+Y                        U2G02520
00B9 0400                  265 |       DC      /0400     PEN UP                      U2G02530
00BA                       266 |       END                                           U2G02540
 
There were no errors in this assembly
 
=== CROSS REFERENCES ==========================================================
Name  Val   Defd  Referenced
$IOCT 0032   131  105  199  224
$PRET 0028   130   85   86
$PST3 0089   132  194
ALPH2 004CR  142  144
ALPHA 004AR  140  108  152
BC    005AR  156  147
BCM5  0056R  150  163
BUF   0039R  114  104  237  238  244
BUSY  0038R  113   72   91   93  202  227
C     0063R  167  157
C0001 0043R  127  101  156
C0003 00AER  253  145
C0005 0044R  128   95
C000D 00ADR  252  143
C7000 0045R  129  191  204
C7001 0037R  112   83
CM5   005ER  159  172
CONTL 00B0R  256  255
CTRL  00AFR  255  173
DIGIT 003ER  122   96  219  221
DUPCT 00ACR  251  138  141  150  160  162  169  171
ERRET 001BR   84  205
EXIT  0074R  186  230
FIRST 0089R  214   94  182  192  211  228
FST   0085R  210  183
GET   008AR  215  142  149  158  161  167  170  246
ILLGL 001AR   83   98
INT1  0004R   65  186
IOAR  0042R  126  102  103  235  236
IOBUF 009CR  235  223
IOCC  003AR  116  175  185  212
IPRG  0046R  137   66
LEGAL 0017R   81   71
LOOK  0069R  173  146
NR    0076R  191  181
NRPRT 007DR  199  193
PLOT1 0000R   62
PLOTC 006CR  179  139  151  195
RESET 0010R   76   87
RET   0015R   80   77
RETRN 000ER   74  213  229
SAVAQ 0040R  124   68   76
SENSE 003CR  118  179
SENSR 003ER  121  137
SHIFT 00A1R  238  220
STAR  0006R   67   64
STAT  0014R   79   67
WDCNT 003CR  119   99  222
WORK  00ABR  250  174  242  245
WRT   0020R   91   82   92
XR1   0012R   78   62