1 * ***********************************************************
   2 * *                                                         *
   3 * * Copyright, (C) Honeywell Information Systems Inc., 1982 *
   4 * *                                                         *
   5 * * Copyright (c) 1972 by Massachusetts Institute of        *
   6 * * Technology and Honeywell Information Systems, Inc.      *
   7 * *                                                         *
   8 * ***********************************************************
   9 
  10 
  11 *HISTORY COMMENTS:
  12 *  1) change(85-10-25,Coren), approve(85-10-25,MCR7274),
  13 *     audit(85-11-17,Beattie):
  14 *     Add a second hardware status queue to the sfcm macro (sf.ast).
  15 *  2) change(85-10-28,Coren), approve(85-10-28,MCR7275),
  16 *     audit(85-11-17,Beattie):
  17 *     Remove definitions of flags no longer used because of change in
  18 *      suspend/resume strategy: sffssb, tfsoip, tforp.
  19 *                                                      END HISTORY COMMENTS
  20 
  21           lbl       macros,macro file for multics communications system
  22           ttl       multics/mcs system macros
  23           pcc       on
  24           rem
  25           rem       this macro file should be entered on the system
  26           rem       library with the catalog name '.gmac'
  27           rem
  28           ttls      datanet configuration description macro
  29           rem       this macro should be called at the start of every
  30           rem       assembly through the use of the op-code "systm" in order
  31           rem       to define the fnp memory map for the processor, memory,
  32           rem       iom, and general utility package.  by using the
  33           rem       location symbols defined below, adaption to a new system
  34           rem       configuration will require only a reassembly with a
  35           rem       different macro package.
  36           rem
  37 *++symget  h1mb,h3mb
  38 *++symget  l1mb,l6mb
  39 *++symlen  h1mb,512,h2mb,512,h3mb,512
  40 *++symlen  l1mb,16,l2mb,16,l3mb,16,l4mb,16,l5mb,16,l6mb,16
  41 *++symget  h1ch,h3ch
  42 *++symget  l1ch,l6ch
  43 *++symget  itmb,etmb
  44 *++symget  cptp,yelcnt
  45 *++symlen  yelcnt,2
  46           rem
  47 systm     macro     c,m
  48           ttls      datanet configuration description
  49           rem
  50 intv      set       0         iom interrupt vector base address
  51           rem
  52 intc      set       256       program interrupt cell base address
  53           rem
  54 fltst     set       272       iom fault status base address
  55           rem
  56 fltv      set       288       processor fault vector base address
  57           rem
  58 iomm      set       296       iom mailbox base address
  59           rem
  60           rem                 ***************************
  61           rem                 * iom channel assignments *
  62           rem                 ***************************
  63           rem
  64           rem
  65 tych      set       0         typewriter channel
  66           rem
  67 lpch      set       2         line printer channel
  68           rem
  69 h1ch      set       6         high speed line adapter number one
  70           rem
  71 h2ch      set       7         high speed line adapter number two
  72           rem
  73 h3ch      set       8         high speed line adapter number three
  74           rem
  75 l1ch      set       9         low speed line adapter number one
  76           rem
  77 l2ch      set       10        low speed line adapter number two
  78           rem
  79 l3ch      set       11        low speed line adapter number three
  80           rem
  81 l4ch      set       12        low speed line adapter number four
  82           rem
  83 l5ch      set       13        low speed line adapter number five
  84           rem
  85 l6ch      set       14        low speed line adapter number six
  86           rem
  87 tmch      set       63        interval timer channel
  88           rem
  89 swch      set       63        data switch channel
  90           eject
  91           rem                 *************************
  92           rem                 * iom interrupt vectors *
  93           rem                 *************************
  94           rem
  95 tyft      set       0         typewriter fault
  96           rem
  97 tyrq      set       1         typewriter request
  98           rem
  99 tytm      set       2         typewriter terminate
 100           rem
 101 lpft      set       32        line printer fault
 102           rem
 103 lpat      set       33        line printer attention
 104           rem
 105 lptm      set       34        line printer terminate
 106           rem
 107 dis0      set       3         dia special - 0
 108           rem
 109 dis1      set       19        dia special - 1
 110           rem
 111 dis2      set       35        dia special - 2
 112           rem
 113 dis3      set       51        dia special - 3
 114           rem
 115 dis4      set       67        dia special - 4
 116           rem
 117 dis5      set       83        dia special - 5
 118           rem
 119 dis6      set       99        dia special - 6
 120           rem
 121 dis7      set       115       dia special - 7
 122           rem
 123 dis8      set       131       dia special - 8
 124           rem
 125 dis9      set       147       dia special - 9
 126           rem
 127 dis10     set       163       dia special - 10
 128           rem
 129 dis11     set       179       dia special - 11
 130           rem
 131 dis12     set       195       dia special - 12
 132           rem
 133 dis13     set       211       dia special - 13
 134           rem
 135 dis14     set       227       dia special - 14
 136           rem
 137 dis15     set       243       dia special - 15
 138           rem
 139 h1ft      set       96        hsla 1 fault
 140           rem
 141 h1a0      set       4         hsla 1 subch  0 active terminate vector
 142           rem
 143 h1a16     set       5         hsla 1 subch 16 active terminate vector
 144           rem
 145 h1c0      set       6         hsla 1 subch  0 config terminate vector
 146           rem
 147 h1c16     set       7         hsla 1 subch 16 config terminate vector
 148           rem
 149 h1a1      set       20        hsla 1 subch  1 active terminate vector
 150           rem
 151 h1a17     set       21        hsla 1 subch 17 active terminate vector
 152           rem
 153 h1c1      set       22        hsla 1 subch  1 config terminate vector
 154           rem
 155 h1c17     set       23        hsla 1 subch 17 config terminate vector
 156           rem
 157 h1a2      set       36        hsla 1 subch  2 active terminate vector
 158           rem
 159 h1a18     set       37        hsla 1 subch 18 active terminate vector
 160           rem
 161 h1c2      set       38        hsla 1 subch  2 config terminate vector
 162           rem
 163 h1c18     set       39        hsla 1 subch 18 config terminate vector
 164           rem
 165 h1a3      set       52        hsla 1 subch  3 active terminate vector
 166           rem
 167 h1a19     set       53        hsla 1 subch 19 active terminate vector
 168           rem
 169 h1c3      set       54        hsla 1 subch  3 config terminate vector
 170           rem
 171 h1c19     set       55        hsla 1 subch 19 config terminate vector
 172           rem
 173 h1a4      set       68        hsla 1 subch  4 active terminate vector
 174           rem
 175 h1a20     set       69        hsla 1 subch 20 active terminate vector
 176           rem
 177 h1c4      set       70        hsla 1 subch  4 config terminate vector
 178           rem
 179 h1c20     set       71        hsla 1 subch 20 config terminate vector
 180           rem
 181 h1a5      set       84        hsla 1 subch  5 active terminate vector
 182           rem
 183 h1a21     set       85        hsla 1 subch 21 active terminate vector
 184           rem
 185 h1c5      set       86        hsla 1 subch  5 config terminate vector
 186           rem
 187 h1c21     set       87        hsla 1 subch 21 config terminate vector
 188           rem
 189 h1a6      set       100       hsla 1 subch  6 active terminate vector
 190           rem
 191 h1a22     set       101       hsla 1 subch 22 active terminate vector
 192           rem
 193 h1c6      set       102       hsla 1 subch  6 config terminate vector
 194           rem
 195 h1c22     set       103       hsla 1 subch 22 config terminate vector
 196           rem
 197 h1a7      set       116       hsla 1 subch  7 active terminate vector
 198           rem
 199 h1a23     set       117       hsla 1 subch 23 active terminate vector
 200           rem
 201 h1c7      set       118       hsla 1 subch  7 config terminate vector
 202           rem
 203 h1c23     set       119       hsla 1 subch 23 config terminate vector
 204           rem
 205 h1a8      set       132       hsla 1 subch  8 active terminate vector
 206           rem
 207 h1a24     set       133       hsla 1 subch 24 active terminate vector
 208           rem
 209 h1c8      set       134       hsla 1 subch  8 config terminate vector
 210           rem
 211 h1c24     set       135       hsla 1 subch 24 config terminate vector
 212           rem
 213 h1a9      set       148       hsla 1 subch  9 active terminate vector
 214           rem
 215 h1a25     set       149       hsla 1 subch 25 active terminate vector
 216           rem
 217 h1c9      set       150       hsla 1 subch  9 config terminate vector
 218           rem
 219 h1c25     set       151       hsla 1 subch 25 config terminate vector
 220           rem
 221 h1a10     set       164       hsla 1 subch 10 active terminate vector
 222           rem
 223 h1a26     set       165       hsla 1 subch 26 active terminate vector
 224           rem
 225 h1c10     set       166       hsla 1 subch 10 config terminate vector
 226           rem
 227 h1c26     set       167       hsla 1 subch 26 config terminate vector
 228           rem
 229 h1a11     set       180       hsla 1 subch 11 active terminate vector
 230           rem
 231 h1a27     set       181       hsla 1 subch 27 active terminate vector
 232           rem
 233 h1c11     set       182       hsla 1 subch 11 config terminate vector
 234           rem
 235 h1c27     set       183       hsla 1 subch 27 config terminate vector
 236           rem
 237 h1a12     set       196       hsla 1 subch 12 active terminate vector
 238           rem
 239 h1a28     set       197       hsla 1 subch 28 active terminate vector
 240           rem
 241 h1c12     set       198       hsla 1 subch 12 config terminate vector
 242           rem
 243 h1c28     set       199       hsla 1 subch 28 config terminate vector
 244           rem
 245 h1a13     set       212       hsla 1 subch 13 active terminate vector
 246           rem
 247 h1a29     set       213       hsla 1 subch 29 active terminate vector
 248           rem
 249 h1c13     set       214       hsla 1 subch 13 config terminate vector
 250           rem
 251 h1c29     set       215       hsla 1 subch 29 config terminate vector
 252           rem
 253 h1a14     set       228       hsla 1 subch 14 active terminate vector
 254           rem
 255 h1a30     set       229       hsla 1 subch 30 active terminate vector
 256           rem
 257 h1c14     set       230       hsla 1 subch 14 config terminate vector
 258           rem
 259 h1c30     set       231       hsla 1 subch 30 config terminate vector
 260           rem
 261 h1a15     set       244       hsla 1 subch 15 active terminate vector
 262           rem
 263 h1a31     set       245       hsla 1 subch 31 active terminate vector
 264           rem
 265 h1c15     set       246       hsla 1 subch 15 config terminate vector
 266           rem
 267 h1c31     set       247       hsla 1 subch 31 config terminate vector
 268           rem
 269 l1ft      set       144       lsla 1 fault
 270           rem
 271 l1a       set       145       lsla 1 active terminate vector
 272           rem
 273 l1c       set       146       lsla 1 configuration terminate vector
 274           rem
 275 l2ft      set       160       lsla 2 fault
 276           rem
 277 l2a       set       161       lsla 2 active terminate vector
 278           rem
 279 l2c       set       162       lsla 2 configuration terminate vector
 280           rem
 281 l3ft      set       176       lsla 3 fault
 282           rem
 283 l3a       set       177       lsla 3 active terminate vector
 284           rem
 285 l3c       set       178       lsla 3 configuration terminate vector
 286           rem
 287 l4ft      set       192       lsla 4 fault
 288           rem
 289 l4a       set       193       lsla 4 active terminate vector
 290           rem
 291 l4c       set       194       lsla 4 configuration terminate vector
 292           rem
 293 l5ft      set       208       lsla 5 fault
 294           rem
 295 l5a       set       209       lsla 5 active terminate vector
 296           rem
 297 l5c       set       210       lsla 5 configuration terminate vector
 298           rem
 299 l6ft      set       224       lsla 6 fault
 300           rem
 301 l6a       set       225       lsla 6 active terminate vector
 302           rem
 303 l6c       set       226       lsla 6 configuration terminate vector
 304           rem
 305 tmft      set       240       timer channel fault
 306           rem
 307 tmro      set       241       interval timer runout
 308           rem
 309 etr       set       242       elapsed timer roll-over
 310           eject               1
 311           rem                 ***************************
 312           rem                 * program interrupt cells *
 313           rem                 ***************************
 314           rem
 315 ilev0     set       256       level 0  (common peripheral fault)
 316           rem
 317 ilev1     set       257       level 1  (common peripheral req/attn)
 318           rem
 319 ilev2     set       258       level 2  (common peripheral terminate)
 320           rem
 321 ilev3     set       259       level 3  (dia special)
 322           rem
 323 ilev4     set       260       level 4  (hsla 1 subch  0-15 active)
 324           rem
 325 ilev5     set       261       level 5  (hsla 1 subch 16-31 active)
 326           rem
 327 ilev6     set       262       level 6  (hsla 1 subch  0-15 config)
 328           rem
 329 ilev7     set       263       level 7  (hsla 1 subch 16-31 config)
 330           rem
 331 ilev8     set       264       level 8  (hsla 2 subch  0-15 active)
 332           rem
 333 ilev9     set       265       level 9  (hsla 2 subch 16-31 active)
 334           rem
 335 ilev10    set       266       level 10 (hsla 2 subch  0-15 config)
 336           rem
 337 ilev11    set       267       level 11 (hsla 2 subch 16-31 config)
 338           rem
 339 ilev12    set       268       level 12 (hsla 3 subch  0-15 active)
 340           rem
 341 ilev13    set       269       level 13 (hsla 3 subch 16-31 active)
 342           rem
 343 ilev14    set       270       level 14 (hsla 3 subch  0-15 config)
 344           rem
 345 ilev15    set       271       level 15 (hsla 3 subch 16-31 config)
 346           rem
 347           rem                 ********************
 348           rem                 * iom fault status *
 349           rem                 ********************
 350           rem
 351           rem
 352 tyfts     set       272       typewriter fault status word
 353           rem
 354 lpfts     set       274       line printer fault status word
 355           rem
 356 difts     set       276       dia fault status word
 357           rem
 358 h1fts     set       278       hsla 1 fault status word
 359           rem
 360 h2fts     set       279       hsla 2 fault status word
 361           rem
 362 h3fts     set       280       hsla 3 fault status word
 363           rem
 364 l1fts     set       281       lsla 1 fault status word
 365           rem
 366 l2fts     set       282       lsla 2 fault status word
 367           rem
 368 l3fts     set       283       lsla 3 fault status word
 369           rem
 370 l4fts     set       284       lsla 4 fault status word
 371           rem
 372 l5fts     set       285       lsla 5 fault status word
 373           rem
 374 l6fts     set       286       lsla 6 fault status word
 375           rem
 376 tmfts     set       287       timer fault status word
 377           rem
 378           rem                 ***************************
 379           rem                 * processor fault vectors *
 380           rem                 ***************************
 381           rem
 382           rem
 383 suflt     set       288       startup fault
 384           rem
 385 sdflt     set       289       shutdown fault
 386           rem
 387 parflt    set       290       memory parity fault
 388           rem
 389 iopflt    set       291       illegal operation fault
 390           rem
 391 ovflt     set       292       overflow fault
 392           rem
 393 memflt    set       293       illegal memory operation fault
 394           rem
 395 dvflt     set       294       divide check fault
 396           rem
 397 ipiflt    set       295       illegal program interrupt fault
 398           eject
 399           rem                 ************************************
 400           rem                 * iom mailbox communication region *
 401           rem                 ************************************
 402           rem
 403 itmb      set       296       interval timer mailbox
 404           rem
 405 etmb      set       297       elapsed timer mailbox
 406           rem
 407 dimb      set       300       dia pcw mailbox
 408           rem
 409 dist      set       302       dia status icw mailbox
 410           rem
 411 tyst      set       304       typewriter status icw mailbox
 412           rem
 413 tyicw     set       306       typewriter data icw mailbox
 414           rem
 415 lpst      set       312       line printer status icw mailbox
 416           rem
 417 lpicw     set       314       line printer data icw mailbox
 418           rem
 419 cptp      set       317       cpu page table pointer
 420           rem
 421 yelcnt    set       318       memory yellow counter (edac corected errors)
 422           rem
 423 l1mb      set       320       lsla 1 mailbox base address
 424           rem
 425 l2mb      set       336       lsla 2 mailbox base address
 426           rem
 427 l3mb      set       352       lsla 3 mailbox base address
 428           rem
 429 l4mb      set       368       lsla 4 mailbox base address
 430           rem
 431 l5mb      set       384       lsla 5 mailbox base address
 432           rem
 433 l6mb      set       400       lsla 6 mailbox base address
 434           rem
 435 h1mb      set       512       hsla 1 mailbox base address
 436           rem
 437 h2mb      set       1024      hsla 2 mailbox base address
 438           rem
 439 h3mb      set       1536      hsla 3 mailbox base address
 440           rem
 441 .end.     set       1024      end of iom mailbox communication region
 442           endm      systm
 443           ttls      system communication region macro
 444           rem
 445           rem       this macro defines the locations of the system
 446           rem       communication region. this region contains
 447           rem       addresses of various tables and contains
 448           rem       certain pieces of configuration information.
 449           rem
 450 *++symget  .crldt,.crcpr
 451 *++symtype .crldt,clock,.crbdt,clock,.crver,character,.crbrk,addr
 452 *++symtype .crskd,addr,.crbtm,addr,.crcpr,character
 453 *++symlen  .crldt,4,.crbdt,4,.crver,2,.crcpr,14
 454           rem
 455 comreg    macro     c,m
 456           ttls      system communications region
 457           rem                 **********************************
 458           rem                 *  system communication region   *
 459           rem                 **********************************
 460           rem
 461 .crldt    set       416       date and time of binding
 462           rem
 463 .crbdt    set       420       date and time of bootloading
 464           rem
 465 .crbuf    set       424       starting address of buffer area
 466           rem
 467 .crmem    set       425       last location of memory
 468           rem
 469 .crnbf    set       426       number of buffers available
 470           rem
 471 .criom    set       427       start of iom table
 472           rem
 473 .crnhs    set       428       number of hsla's configured
 474           rem
 475 .crnls    set       429       number of lsla's configured
 476           rem
 477 .crcon    set       430       console enabled flag
 478           rem
 479 .crmod    set       431       starting address of module chain
 480           rem
 481 .crnxa    set       432       ptr to next avaliable buffer
 482           rem
 483 .crtra    set       433       trace entry enable mask
 484           rem
 485 .crtrb    set       434       base address of trace table
 486           rem
 487 .crtrc    set       435       next available location in trace table
 488           rem
 489 .crreg    set       436       disaster fault register storage location
 490           rem
 491 .crttb    set       437       location of tib table
 492           rem
 493 .crtte    set       438       location of end of tib table
 494           rem
 495 .crdly    set       439       head of delay table chain
 496           rem
 497 .crver    set       440       mcs version number, 4 chars
 498           rem
 499 .crbrk    set       442       addr of breakpoint control table
 500           rem
 501 .crtsw    set       443       if non-zero, tracing will cease
 502           rem
 503 .crnxs    set       444       next free small block
 504           rem
 505 .crnbs    set       445       number of buffers devoted to small space
 506           rem
 507 .crcct    set       446       address of first cct descriptor
 508           rem
 509 .crskd    set       447       address of scheduler data block
 510           rem
 511 .cretb    set       448       list of echo-negotiation bit tables
 512           rem
 513 .crcpt    set       449       address of cpu page table
 514           rem
 515 .crpte    set       450       address of variable cpu page table entry
 516           rem
 517 .crtsz    set       451       size of trace data buffer
 518           rem
 519 .crmet    set       452       non-zero if metering enabled
 520           rem
 521 .crtdt    set       453       address of tib for t&d executive channel
 522           rem
 523 .crbtm    set       454       address of time meters for getbuf/frebuf
 524           rem
 525 .crnxe    set       455       next available space in extended memory
 526           rem
 527 .crbpe    set       456       buffer paging window table entry
 528           rem
 529 .crcpr    set       496       copyright notice
 530           endm      comreg
 531           ttls      macro to define dia mailbox opcode values
 532           rem
 533 *++symget  termac,linsta,,diaop
 534           rem
 535 diaop     macro     c,m       rem
 536           rem       mailbox i/o commands
 537           rem
 538 rcd       equ       1
 539 rtx       equ       2
 540 wcd       equ       3
 541 wtx       equ       4
 542           rem
 543           rem
 544           rem       mailbox opcodes
 545           rem
 546           rem       <6180 -> 355>
 547           rem
 548 termac    bool      000       terminal accepted
 549 dislin    bool      001       disconnect this line
 550 disall    bool      002       disconnect all lines
 551 noacc     bool      003       don't accept calls
 552 accall    bool      004       accept calls
 553 inacc     bool      005       input accepted
 554 setcls    bool      006       set device class
 555 entrcv    bool      007       enter receive mode
 556 frmchr    bool      010       set framing characters
 557 blast     bool      011       send output to all lines
 558 accout    bool      012       accept output
 559 aclout    bool      013       accept last output
 560 dodial    bool      014       do dial out
 561 rejreq    bool      016       reject request
 562 trmrej    bool      020       terminal rejected
 563 disacc    bool      021       disconnect accepted
 564 incomp    bool      022       init complete
 565 dmpmem    bool      023       dump 355 memory
 566 pchmem    bool      024       patch 355 memory
 567 brkpnt    bool      025       fnp_break order
 568 linctl    bool      026       line_control order
 569 msgsiz    bool      027       set input message size
 570 engstb    bool      030       set echnego break table
 571 engogo    bool      031       start negotiated echo
 572 engoff    bool      032       stop negotiated echo
 573 engini    bool      033       init negotiated echo
 574 brack     bool      035       break acknowledged
 575 infcc     bool      036       set input flow control characters
 576 outfcc    bool      037       set output flow control characters
 577 alter     bool      042       alter parameters
 578 cserr     bool      043       checksum error
 579 rmeter    bool      044       report meters
 580 setdly    bool      045       set delay values
 581           rem
 582           rem       <355 -> 6180>
 583           rem
 584 acctrm    bool      100       accept new terminal
 585 lindis    bool      101       line disconnected
 586 inmbx     bool      102       input in mailbox
 587 linmsk    bool      103       line masked
 588 sparms    bool      104       send 6180 parameters
 589 sndout    bool      105       send output
 590 engain    bool      106       ack_echnego_init
 591 engaof    bool      107       ack_echnego_stop
 592 conslv    bool      111       connect to slave
 593 accin     bool      112       accept input
 594 brkcon    bool      113       line break condition
 595 wrutim    bool      114       "wru" timeout
 596 errmsg    bool      115       error message
 597 acupwi    bool      120       no power to acu
 598 acudlo    bool      121       data line occupied
 599 acuacr    bool      122       dial out failed
 600 acung     bool      123       unable to dial out
 601 linsta    bool      124       line_status signal from control tables
 602           rem
 603           endm
 604           ttls      macro to define alter paramaters dia mailbox codes
 605           rem
 606 *++symget  alfdpx,al8out,,alterp
 607 alterp    macro     c,m
 608           rem
 609           rem       defines alter-parameters subcodes
 610           rem
 611           rem
 612 alfdpx    bool      03        full duplex mode
 613 albrk     bool      04        send line break
 614 alcrec    bool      10        crecho mode
 615 allfec    bool      11        lfecho mode
 616 allock    bool      12        lock and unlock keyboard
 617 aldump    bool      15        dump output
 618 altbec    bool      16        tab-echo mode
 619 allisn    bool      20        listen
 620 alquit    bool      21        handle quit
 621 alchng    bool      22        change control string index
 622 alwru     bool      23        read answerback
 623 alecpx    bool      24        echoplex mode
 624 alxhld    bool      25        transmit hold
 625 aldpin    bool      26        dump input
 626 alrply    bool      27        replay mode
 627 alplit    bool      30        polite mode
 628 alfrmi    bool      31        framei mode
 629 alsetb    bool      32        set buffer size
 630 albral    bool      33        breakall mode
 631 alpfnl    bool      34        prefixnl mode
 632 alifc     bool      35        iflow mode
 633 alofc     bool      36        oflow mode
 634 aloddp    bool      37        odd parity
 635 al8in     bool      40        don't strip input parity
 636 al8out    bool      41        don't generate output parity
 637           rem
 638           endm
 639           ttls      die macro
 640           rem
 641           rem       this macro is to be used to crash the fnp. it
 642           rem       will cause an illegal opcode fault and will contain
 643           rem       some coded information so that one may quickly determine
 644           rem       the module that caused the crash as well as the
 645           rem       reason for the crash.  the caller of this macro
 646           rem       is responsible for having defined a symbol 'modnum'
 647           rem       which is the module number of the module
 648           rem       executing the die. the macro takes one argument
 649           rem       which is a number which will uniquely identify
 650           rem       the cause for the crash within that module.
 651           rem
 652           rem       note that since 11 and 51 are both illegal opcodes,
 653           rem       the module number can occupy 4 bits; it doesn't
 654           rem       matter if the high-order bit of the opcode
 655           rem       is on or off.
 656           rem
 657 die       macro     c,m
 658           vfd       4/modnum,o5/11,9/#1 *die*die*die*die*die*die*die*die*die*
 659           endm      die
 660           rem
 661           rem
 662 *         macro to mark beginning of coded transferred to from master
 663 *         dispatcher. This is used to flag the start of the code for
 664 *         call_trace feature of debug_fnp
 665           rem
 666 mdent     macro     c,m
 667           oct       1
 668           tra       2
 669           tra       -2,*
 670           endm      mdent
 671           rem
 672 *         likewise for secondary dispatcher
 673           rem
 674 sdent     macro     c,m
 675           oct       2
 676           tra       2
 677           tra       -2,*
 678           endm      sdent
 679           ttls      subroutine macro
 680           rem
 681           rem       the subr macro should be the first statement in a
 682           rem       subroutine. it creates a zero word to store the
 683           rem       address into, some register save instructions
 684           rem       and it contains the register restore instructions.
 685           rem       the first argument to the macro should be a unique
 686           rem       3 character (or less) string. this character string
 687           rem       will be used in building the names of places to store
 688           rem       specified registers so that the stored registers may
 689           rem       be referenced by the subroutine. names are of the form
 690           rem       xxxsn where xxx is the 3 character string, the letter
 691           rem       s, and n where n is the register name, x1, x2, x3, a
 692           rem       q, or i (indicators). the registers to be saved
 693           rem       are specified in parens as the second argument. if
 694           rem       the character string 'inh' is one of the names, a
 695           rem       sti followed by an inh will be the first two instr-
 696           rem       uctions generated and the last will be an ldi before
 697           rem       returning to the caller.
 698           rem
 699 subr      macro     c,m
 700           ind       0         return location
 701           pmc       save,off
 702           pcc       save,off
 703 macwk1    set       0
 704 macwk2    set       0
 705           idrp      #2
 706           crsm      save,off
 707           ine       'a','a#2',%endm1
 708           ife       '#2','inh',6
 709           pmc       restore
 710           sti       #1si-*    save indicators
 711           inh                 <-<-<-<-<-<-<-<-<-<-<-<-<-<-<-<-<-
 712           pmc       save,off
 713 macwk1    set       macwk1+2
 714 macwk2    set       macwk2+2
 715           idrp
 716           idrp      #2
 717           ine       '#2','inh',5
 718           pmc       restore
 719           st#2      #1s#2-*   save #2
 720           pmc       save,off
 721 macwk1    set       macwk1+1
 722 macwk2    set       macwk2+2
 723           idrp
 724 endm1     mark
 725           pmc       restore
 726           tra       macwk2+2  go to main body now
 727           pmc       save,off
 728 macwk2    set       macwk1+1
 729           idrp      #2
 730           ine       'a','a#2',%endm1
 731           ine       '#2','inh',4
 732           pmc       restore
 733           ld#2      #1s#2-*   restore #2
 734           pmc       save,off
 735 macwk2    set       macwk2+1
 736           idrp
 737           idrp      #2
 738           ife       '#2','inh',4
 739           pmc       restore
 740           ldi       #1si-*    reload indicators
 741           pmc       save,off
 742 macwk2    set       macwk2+1
 743           idrp
 744 endm1     mark
 745           pmc       restore
 746           tra       -macwk2-1,*         return to caller
 747           pmc       save,off
 748           idrp      #2
 749           ine       'a','a#2',%endm1
 750           ine       '#2','inh',3
 751           pmc       restore
 752 #1s#2     bss       1
 753           pmc       save,off
 754           ife       '#2','inh',3
 755           pmc       restore
 756 #1si      bss       1
 757           pmc       save,off
 758           idrp
 759 endm1     mark
 760           crsm      restore
 761           pcc       restore
 762           pmc       restore
 763           endm      subr
 764           ttls      return macro
 765           rem
 766           rem       this macro is to be executed when returning
 767           rem       from a subroutine. it takes one argument which
 768           rem       is the label on the subr macro. it will transfer
 769           rem       into the code generated by the subr macro
 770           rem       which will restore the saved registers and
 771           rem       then return to the caller.
 772           rem
 773 return    macro     c,m
 774           tra       1,*       go restore registers
 775           ind       #1+macwk1+2
 776           endm      return
 777           ttls      start macro
 778           rem       this macro is used immediately before the start
 779           rem       of executable code in a module. It reserves space
 780           rem       for the module chain pointer.
 781           rem
 782           rem       usage:
 783           rem       start           name, {mod number}, {sti}
 784           rem       where name is the 4-character primary symdef
 785           rem       name for the module
 786           rem
 787           rem       mod number is an optional field to indicate the
 788           rem       module number
 789           rem
 790           rem       sti is an optional field to indicate the software
 791           rem       technical identifier
 792           rem
 793 start     macro     c,m
 794           symdef    -.chain
 795           crsm      save,off
 796           even
 797           ine       '#2','',2
 798 modnum    equ       #2
 799 .chain    dec       #2
 800           ife       '#2','',1
 801 .chain    dec       0
 802           crsm      restore
 803           bci       2,#1
 804           ind       #1
 805           date
 806           ine       '#3','',1
 807           bci       4,#3
 808           endm      start
 809           ttls      trace -- calling memory/printer tracing
 810           rem
 811           rem       trace macro is used to pass information to system
 812           rem       trace routine
 813           rem
 814           rem       usage:
 815           rem
 816           rem                 trace type,switches,(args)
 817           rem
 818           rem       type            specifies type of tracing
 819           rem
 820           rem       switches        specify which processor switches
 821           rem                 must be on for printer tracing to occur
 822           rem
 823           rem       args            specify the addresses of data to be passed
 824           rem                 in one of the following forms:
 825           rem
 826           rem                 xn -- data to be passed is in xn (n = 1,2,3)
 827           rem
 828           rem                 symbol -- word to be passed is at specified addr
 829           rem
 830           rem                 symbol(n) -- address of word to be passed
 831           rem                 is specified symbol modified by xn (n = 1,2 or 3)
 832           rem
 833           rem       use of this macro destroys the
 834           rem       contents of the a register
 835           rem
 836 trace     macro     c,m
 837           pmc       save,off
 838           pcc       save,off
 839           crsm      save,on
 840           symdef    -x#4
 841 x#4       tra       #4-*
 842           crsm      off
 843 macwk3    set       0
 844 macwk4    set       4
 845           idrp      #3
 846           trcnt     #3
 847           idrp
 848           idrp      #3
 849           ine       'a','a#3',%endm1
 850           argt      #3
 851           idrp
 852 endm1     mark
 853           pmc       restore
 854           tsy       3,*
 855           vfd       6/macwk3,12/#1
 856           vfd       6/modnum,12/#2
 857           ind       trace
 858           bss       macwk3
 859           crsm      on
 860 #4        null
 861           crsm      restore
 862           pmc       save,off
 863           pcc       restore
 864           pmc       restore
 865           endm      trace
 866           ttls      trcnt macro -- counts arguments for trace
 867           rem
 868           rem
 869 trcnt     macro     c,m
 870 macwk3    set       macwk3+1
 871           ine       #1,'x1',4
 872           ine       #1,'x2',3
 873           ine       #1,'x3',2
 874 macwk4    set       macwk4+2
 875           ife       1,2,1
 876 macwk4    set       macwk4+1
 877           endm      trcnt
 878           ttls      argt macro -- used for trace args
 879           rem
 880           rem       argt is used internally by trace macro to generate loads and
 881           rem       stores for trace arguments
 882           rem
 883           rem
 884 argt      macro     c,m
 885           ine       #1,'x1',%stx
 886           ine       #1,'x2',%stx
 887           ine       #1,'x3',%stx
 888 macwk4    set       macwk4-1
 889           pmc       restore
 890           ife       '#2a','a',3
 891           lda       #1-*
 892           sta       macwk4
 893           ife       1,2,2
 894           lda       #1,#2
 895           sta       macwk4
 896           pmc       save,off
 897           ife       1,2,%endl
 898 stx       mark
 899           pmc       restore
 900           st#1      macwk4
 901           pmc       save,off
 902 endl      mark
 903           endm      argt
 904           ttls      traceb -- buffer tracing macro
 905           rem
 906           rem       traceb macro is used to invoke buffer
 907           rem       tracing routine
 908           rem
 909           rem       usage:
 910           rem
 911           rem                 btrace bufadr,size
 912           rem
 913           rem       bufadr          is the address of a word containing the
 914           rem                 address of the buffer. if it is xn (n = 1,2,3)
 915           rem                 the specified index register contains the
 916           rem                 address of the buffer.
 917           rem
 918           rem       size            is the size of the buffer in words
 919           rem
 920           rem       the buffer address is passed to the tracin routine
 921           rem       in x3, so that if the bufadr field is not specified as
 922           rem       as x3, x3 will be modified. if x1 or x2 is specified,
 923           rem       the a register will be modified as well.
 924           rem
 925           rem
 926 traceb    macro     c,m
 927           pmc       save,off
 928           pcc       save,off
 929           crsm      save,on
 930           pmc       restore
 931           ine       #1,'x3',%x3
 932           ine       #1,'x1',1
 933           ife       #1,'x2',3
 934           c#1a
 935           cax3
 936           ife       1,2,1
 937           ldx3      #1-*
 938           pmc       save,off
 939 x3        mark
 940           pmc       restore
 941           tsy       #3-*,*
 942           vfd       6/modnum,12/#2
 943 #3        ind       traceb
 944           pmc       save,off
 945           crsm      restore
 946           pcc       restore
 947           pmc       restore
 948           endm      traceb
 949           ttls      metering macros
 950           rem
 951           rem       these macros are used for metering various fnp
 952           rem       events. they generate code to call the subroutines
 953           rem       in the meters module. There are 3 macros used in
 954           rem       system code:
 955           rem          cmeter -- per-channel meters
 956           rem          smeter -- system-wide meters
 957           rem          mmsg -- special for metering synchronous data
 958           rem                  messages
 959           rem
 960           rem       all of them generate a tra around the generated code
 961           rem       which is replaced by a nop by bind_fnp if the
 962           rem       bindfile specifies metering enabled
 963           rem
 964           rem
 965           rem       cmeter macro
 966           rem
 967           rem       this macro does increment and update meters for
 968           rem       per-channel meters
 969           rem
 970           rem       Usage:
 971           rem       cmeter  meter_type,meter_name,address
 972           rem
 973           rem       where meter_type is the name of the metering subroutine
 974           rem             meter_name is the symbol to be incremented
 975           rem             address is the address of the increment
 976           rem
 977           rem
 978 cmeter    macro     c,m
 979           pmc       save,off
 980           pcc       save,off
 981           crsm      save,on
 982           symdef    -m#4
 983 m#4       tra       #4-*
 984           pmc       restore
 985           lda       t.metr,1  get address of metering area
 986           iaa       #2
 987           idrp      #3
 988           mload     #3        get increment
 989           idrp
 990           tsy       #5-*,*
 991           tra       #4-*      skip data
 992 #5        ind       #1
 993 #4        null
 994           crsm      restore
 995           pmc       save,off
 996           pcc       restore
 997           pmc       restore
 998           endm      cmeter
 999           rem
1000           rem
1001           rem
1002           rem       smeter macro
1003           rem
1004           rem       this macro does increment and update meters for
1005           rem       system-wide meters
1006           rem
1007           rem       Usage:
1008           rem       smeter    meter_type,meter_name,address
1009           rem
1010           rem       where arguments are the same as for cmeter,above
1011           rem
1012           rem
1013 smeter    macro     c,m
1014           pmc       save,off
1015           pcc       save,off
1016           crsm      save,on
1017           symdef    -m#4
1018 m#4       tra       #4-*
1019           pmc       restore
1020           lda       #6-*      get address of system meter
1021           idrp      #3
1022           mload     #3        get increment
1023           idrp
1024           tsy       #5-*,*
1025           tra       #4-*
1026 #5        ind       #1
1027 #6        ind       #2
1028 #4        null
1029           crsm      restore
1030           pmc       save,off
1031           pcc       restore
1032           pmc       restore
1033           endm      smeter
1034           rem
1035           rem
1036           rem       mmsg macro
1037           rem
1038           rem       this macro generates a call to mmsg, the subroutine that
1039           rem       keeps track of synchronous message lengths
1040           rem
1041           rem       usage:
1042           rem       mmsg meter_name
1043           rem
1044           rem       where meter_name is m.inm or m.outm for an input or
1045           rem       output message respectively
1046           rem
1047           rem
1048 mmsg      macro     c,m
1049           pmc       save,off
1050           pcc       save,off
1051           crsm      save,on
1052           symdef    -m#4
1053 m#4       tra       #4-*
1054           pmc       restore
1055           lda       t.metr,1
1056           iaa       #1
1057           tsy       #3-*,*
1058           tra       #4-*
1059 #3        ind       mmsg
1060 #4        null
1061           crsm      restore
1062           pmc       save,off
1063           pcc       restore
1064           pmc       restore
1065           endm      mmsg
1066           rem
1067           rem
1068           rem       mload macro allows modification in address field
1069           rem
1070 mload     macro     c,m
1071           crsm      save,off
1072           ife       '#2a','a',2
1073           ldq       #1
1074           ife       1,2,1
1075           ldq       #1,#2
1076           crsm      restore
1077           endm      mload
1078           ttls      hwcm macro
1079           rem
1080           rem       this macro defines the fields in the hardware
1081           rem       comm region
1082           rem
1083 *++symget  h.ric0,h.cnfg,hwcm
1084 *++symlen  h.ric0,2,h.ric1,2,h.sic0,2,h.sic1,2,h.mask,2
1085 *++symlen  h.mask,2,h.aicw,2,h.cnfg,2
1086 *++symdef  hwcm,0
1087 *++symrel  hwcm,hwcm
1088 *++symlen  hwcm,16
1089           rem
1090 hwcm      macro     c,m
1091           ttls      hardware comm. region (hwcm)
1092           rem
1093 h.ric0    equ       0         primary receive icw
1094           rem
1095 h.ric1    equ       2         alternate receive icw
1096           rem
1097 h.sic0    equ       4         primary send icw
1098           rem
1099 h.sic1    equ       6         alternate send icw
1100           rem
1101 h.baw     equ       8         base address word
1102           rem
1103 h.sfcm    equ       9         software comm. region address
1104           rem
1105 h.mask    equ       10        mask register
1106           rem
1107 h.aicw    equ       12        active status icw
1108           rem
1109 h.cnfg    equ       14        configuration status
1110           endm      hwcm
1111           ttls      hslast macro - define hsla hardware status
1112           rem
1113 *++symget  hs.rcs,hs.pwi,,hs.1
1114 *++symget  hs.dsr,hs.rto,,hs.2
1115           rem
1116 hslast    macro     c,m
1117           ttls      hsla status bits
1118           rem
1119           rem       first status word
1120           rem
1121 hs.rcs    bool      400000    send/rcv status indicator(1=rcv)
1122 hs.nms    bool      200000    normal marker status
1123 hs.dms    bool      100000    delayed marker status
1124 hs.trm    bool      040000    terminate character
1125 hs.aiw    bool      020000    alternate icw active
1126 hs.siw    bool      010000    switching icw's after status store
1127 hs.tro    bool      004000    tally runout
1128 hs.ptr    bool      002000    pre-tally runout
1129 hs.per    bool      001000    parity error, rcv
1130 hs.crj    bool      000400    command reject
1131 hs.dss    bool      000200    data set status change
1132 hs.isd    bool      000100    idle state detect (hdlc)
1133 hs.xte    bool      000040    transfer timing error
1134 hs.fce    bool      000020    frame check sequence error (hdlc)
1135 hs.sqo    bool      000010    status queue overflow (set by software)
1136 hs.nsb    bool      000004    no stop bit rcvd
1137 hs.rab    bool      000004    receive abort (hdlc)
1138 hs.dlo    bool      000002    data line occupied(acu)
1139 hs.pwi    bool      000001    power indicator(acu)
1140           rem
1141           rem       second status word
1142           rem
1143 hs.dsr    bool      400000    data set ready
1144 hs.cts    bool      200000    clear to send
1145 hs.cd     bool      100000    carrier detect
1146 hs.src    bool      040000    supervisory receive
1147 hs.acr    bool      020000    abandon call and retry(acu)
1148 hs.ads    bool      010000    data set status(acu)
1149 hs.ri     bool      004000    ring indicator
1150 hs.brk    bool      002000    line break received
1151 hs.byt    bool      002000    partial byte (hdlc)
1152 hs.rbt    bool      001000    receive block terminate (bsc & hdlc)
1153 hs.rcv    bool      000400    receive mode
1154 hs.xmt    bool      000200    transmit mode
1155 hs.wam    bool      000100    wrap around mode
1156 hs.dtr    bool      000040    data terminal ready
1157 hs.rts    bool      000020    request to send
1158 hs.mby    bool      000010    make busy
1159 hs.sxt    bool      000004    supervisory transmit
1160 hs.crc    bool      000004    crc error (bsc)
1161 hs.tre    bool      000004    tally runout enable (hdlc)
1162 hs.crq    bool      000002    call request(acu)
1163 hs.rto    bool      000002    receive time out (bsc)
1164           bool      000001
1165           rem
1166           endm      hslast
1167           ttls      sfcm macro
1168           rem
1169           rem       this macro defines software comm region for either
1170           rem       hsla or lsla
1171           rem       if both used in one module hsla must be first
1172           rem
1173 *++symget  sf.hcm,sf.lln,sfcm
1174 *++symlen  sf.cfg,2,sf.waq,80,sf.sta,24
1175 *++symdef  sfcm,0
1176 *++symrel  sfcm,sfcm
1177 *++symlen  sfcm,sf.lln
1178 *++symdel  sf.hln,sf.sln,sf.lln,sf.est
1179 *++symgetr sffskd,sffhdl,,sf.flg
1180           rem
1181 sfcm      macro     c,m
1182           pcc       save,off
1183           pmc       save,off
1184           ife       sfcm.0,1,%first
1185           ine       #1,'lsla',%second
1186           pmc       save,on
1187           seterr    #1        2nd invocation of sfcm must say lsla
1188           pmc       restore
1189           org       *-1
1190           ine       1,1,%exit
1191 second    mark
1192           pmc       restore
1193           rem
1194           rem
1195           rem       sfcm fields defined for lsla only
1196           rem
1197           pmc       save,off
1198           ine       1,1,%part
1199 first     mark
1200           ttls      sfcm for #1
1201           ife       #1,'hsla',%lsla
1202           pmc       restore
1203 sf.hcm    equ       0         addr of hwcm
1204           rem
1205 sf.nxa    equ       sf.hcm+1  addr of next available queue entry
1206           rem
1207 sf.nxp    equ       sf.nxa+1  addr of next queue entry to process
1208           rem
1209 sf.tly    equ       sf.nxp+1  tally of status queue
1210           rem
1211 sf.tib    equ       sf.tly+1  addr of tib for this line
1212           rem
1213 sf.flg    equ       sf.tib+1  flag word
1214           rem
1215 sf.ib0    equ       sf.flg+1  pointer to input buffer 1
1216           rem
1217 sf.ib1    equ       sf.ib0+1  pointer to input buffer 2
1218           rem
1219 sf.ob0    equ       sf.ib1+1  pointer to output buffer 1
1220           rem
1221 sf.ob1    equ       sf.ob0+1  pointer to output buffer 2
1222           rem
1223 sf.pcw    equ       sf.ob1+1  current pcw 2nd word
1224           rem
1225 sf.cct    equ       sf.pcw+1  cct addr for this line, if non-zero
1226           rem
1227 sf.rct    equ       sf.cct+1  repeat count for status queue overflows
1228           rem
1229 sf.hsl    equ       sf.rct+1  address of hsla table entry for this line
1230           rem
1231 sf.bsz    equ       sf.hsl+1  max buffer size
1232           rem
1233 sf.fbs    equ       sf.bsz+1  buffer size to be used during frame input
1234           rem
1235 sf.mms    equ       sf.fbs+1  maximum synchronous message size
1236           rem
1237 sf.csz    equ       sf.mms    current asynchronous buffer size
1238           rem
1239 sf.rms    equ       sf.mms+1  remaining unallocated message length
1240           rem
1241 sf.nic    equ       sf.rms    char. address of next asynchronous input char
1242           rem
1243 sf.noc    equ       sf.nic+1  **not used** char address of next asynchronous output char
1244           rem
1245 sf.ssl    equ       sf.noc+1  number of entries in software status queue
1246           rem
1247 sf.cfg    equ       sf.ssl+1  2 words for config pcw
1248           rem
1249 sf.sta    equ       sf.cfg+2  hardware status q, sicw here (primary)
1250           rem
1251 sfhsiz    equ       5         number of entries in hardware status buf
1252           rem
1253           rem                 room for 6 status words
1254 sf.est    equ       sf.sta+sfhsiz*2+2
1255           rem
1256 sf.shq    equ       sf.est    hardware status q, sicw here (secondary)
1257           rem
1258           rem                 room for 6 more status word
1259 sf.ast    equ       sf.shq+sfhsiz*2+2
1260           rem
1261 sf.hln    equ       sf.ast
1262           rem
1263 sf.waq    equ       sf.ast    wrap around queue, software status q
1264           rem
1265 sfssq     equ       10        length of "short" software status queue
1266 sflsq     equ       20        length of "long" software status queue
1267           rem                 (used for hdlc and bisync lines)
1268           rem
1269 sf.sln    equ       sf.hln+sfssq
1270 sf.lln    equ       sf.hln+sflsq
1271           rem
1272           rem
1273           rem       sfcm flag definitions
1274           rem
1275 sffskd    bool      000001    status processor is scheduled
1276           rem
1277 sffcii    bool      000002    on if alternate input icw is active
1278           rem
1279 sffcoi    bool      000004    on if alternate output icw is active
1280           rem
1281 sffisc    bool      000010    inactive subchannel flag
1282           rem
1283 sffsct    bool      000020    short cct flag
1284           rem
1285 sffebd    bool      000040    ebcdic data code on this line
1286           rem
1287 sffech    bool      000100    tab, cr, lf echo going on now
1288           rem
1289 sffdct    bool      000200    dynamic (sharable) cct in use for channel
1290           rem
1291 sffstp    bool      000400    stop channel, rxmit done
1292           rem
1293 sffcai    bool      001000    on if altermate status queue is active
1294           rem
1295 sffbsc    bool      002000    binary synchronous device
1296           rem
1297 sffsqo    bool      004000    status queue overflow pending
1298           rem
1299 sffsyn    bool      010000    any synchronous line type
1300           rem
1301 sffmsp    bool      020000    marker status pending
1302           rem
1303 sffofr    bool      040000    old setting of tffrmi (lines up on tffrmi)
1304           rem
1305 sffnib    bool      100000    need to allocate new input buffer(s)
1306           rem
1307 *unused   bool      200000
1308           rem
1309 sffhdl    bool      400000    uses hdlc channel board
1310           rem
1311           rem
1312 sfhmk     equ       2         x-or mask to switch icw addrs
1313 sfbfmk    equ       1         x-or mask to switch i-or-ob1/2 addrs
1314           pmc       save,off
1315           ine       1,1,%exit
1316 lsla      mark
1317           ife       sfcm.0,0,%part
1318           pmc       restore
1319 sf.hcm    equ       0         hardware comm. region address
1320           rem
1321 sf.nxa    equ       sf.hcm+1  current input status pointer
1322           rem
1323 sf.nxp    equ       sf.nxa+1  status save buffer ptr
1324           rem
1325 sf.ioc    equ       sf.nxp+1  i/o chain pointer
1326           rem
1327 sf.bfc    equ       sf.ioc+1  current input buffer ptr
1328           rem
1329 sf.flg    equ       sf.bfc+1  flag word
1330           pmc       save,off
1331           ine       1,1,%rest
1332 part      mark
1333           pmc       restore
1334 sf.ioc    equ       sf.nxp+1  i/o chain pointer
1335           rem
1336 sf.bfc    equ       sf.ioc+1  current input buffer pointer
1337           pmc       save,off
1338 rest      mark
1339           pmc       restore
1340           rem
1341 sf.bfa    equ       sf.flg+1  alternate input buffer ptr
1342           rem
1343 sf.bfl    equ       sf.bfa+1  output buffer length
1344           rem
1345 sf.icw    equ       sf.bfl+1  ptr to current input icw
1346           rem
1347 sf.ocw    equ       sf.icw+1  ptr to current output icw
1348           rem
1349 sf.ltb    equ       sf.ocw+1  ptr to lsla table
1350           rem
1351 sf.otb    equ       sf.ltb+1  ptr to output buffer
1352           rem
1353 sf.ity    equ       sf.otb+1  tally for input icw
1354           rem
1355 sf.oty    equ       sf.ity+1  tally for output icw
1356           rem
1357 sf.sic    equ       sf.oty+1  standard status icw
1358           rem
1359 sf.ssb    equ       sf.sic+2  status save buffer (10 words)
1360           rem
1361 sf.sbf    equ       sf.ssb+10 status buffer (8 words)
1362           rem
1363           rem       bit definitions for sf.flg
1364           rem
1365 sffrlm    bool      200       already sent error message about resync attempts
1366           rem
1367 sffopt    bool      100       dsr and cts reported
1368           rem
1369 sffrsy    bool      40        resync required
1370           rem
1371 sffptr    bool      20        expecting input ptro
1372           rem
1373 sffrun    bool      10        lsla running ok
1374           rem
1375 sffnsx    bool      4         no stx on last input frame
1376           rem
1377 sffsnd    bool      2         second output buffer current
1378           rem
1379 sffslo    bool      1         short frame lsla (22 time slots)
1380           pmc       save,off
1381 exit      mark
1382 sfcm.0    set       1
1383           pmc       restore
1384           pcc       restore
1385           endm      sfcm
1386           ttls      tib macro
1387           rem
1388           rem       this macro defines the tib fields, the tib flags,
1389           rem       and the values in t.stat
1390           rem
1391 *++symget  t.stat,t.leng,tib
1392 *++symlen  t.time,2
1393 *++symlen  t.itim,2
1394 *++symtype t.cur,addr,t.reta,addr,t.dcwa,addr
1395 *++symdef  tib,0
1396 *++symrel  tib,tib
1397 *++symlen  tib,t.leng
1398 *++symdel  t.leng
1399 *++symgetr tsfcd,tsfcrq,,t.stat
1400 *++symgetr tfwrit,tfosus,,t.flg
1401 *++symget  tfdlup,tfdlup,,t.flg
1402 *++symgetr tfxhld,tfpfnl,,t.flg2
1403 *++symgetr tfbkpt,tfinq,,t.flg3
1404           rem
1405 tib       macro     c,m
1406           ttls      terminal information block (tib)
1407           rem
1408 t.stat    equ       0         holds current line status
1409           rem
1410 t.flg     equ       t.stat+1  flag word
1411           rem
1412 t.flg2    equ       t.flg+1   second word of flags
1413           rem
1414 t.cur     equ       t.flg2+1  current address in control table
1415           rem
1416 t.line    equ       t.cur+1   10 bit line number
1417           rem
1418 t.icp     equ       t.line+1  first buffer in input chain
1419           rem
1420 t.ilst    equ       t.icp+1   last buffer in input chain
1421           rem
1422 t.icpl    equ       t.ilst+1  count of buffers in icp chain
1423           rem
1424 t.icch    equ       t.icpl+1  address of next input character
1425           rem
1426 t.elnk    equ       t.icch+1  link to tib extension
1427           rem
1428 t.rcp     equ       t.elnk    replay chain pointer (share t.elnk)
1429           rem
1430 t.ocp     equ       t.elnk+1  addr of output chain from cs
1431           rem
1432 t.ocur    equ       t.ocp+1   addr of current output buffer
1433           rem
1434 t.olst    equ       t.ocur+1  addr of last buffer in output chain
1435           rem
1436 t.occh    equ       t.olst+1  addr of next output character
1437           rem
1438 t.ocnt    equ       t.occh+1  count of buffers in t.ocur
1439           rem
1440 t.type    equ       t.ocnt+1  line type
1441           rem
1442 t.time    equ       t.type+1  time at which next timeout will occur
1443           rem
1444 t.reta    equ       t.time+2  return address from calsub
1445           rem
1446 t.dcwa    equ       t.reta+1  addr of dcw list to 'execute'
1447           rem
1448 t.dcwl    equ       t.dcwa+1  length of dcw list
1449           rem
1450 t.echo    equ       t.dcwl+1  echo buffer address
1451           rem
1452 t.dcp     equ       t.echo+1  addr of message chain for cs
1453           rem
1454 t.dlst    equ       t.dcp+1   last buffer in messge chain for cs
1455           rem
1456 t.ftse    equ       t.dlst+1  first time slot entry in lsla table
1457           rem
1458 t.sfcm    equ       t.ftse    pointer to sfcm for hsla lines
1459           rem
1460 t.bcnt    equ       t.ftse+1  counting temporary
1461           rem
1462 t.brkp    equ       t.bcnt+1  pointer to current break list
1463           rem
1464 t.pos     equ       t.brkp+1  current carriage position
1465           rem
1466 t.char    equ       t.pos+1   pending line control char (lsla only)
1467           rem
1468 t.ecch    equ       t.char    address of current echo char (hsla only)
1469           rem
1470 t.cntr    equ       t.char+1  counter for control tables
1471           rem
1472 t.flg3    equ       t.cntr+1  third word of flags
1473           rem
1474 t.dtp     equ       t.flg3+1  pointer to delay table for this line
1475           rem
1476 t.frmc    equ       t.dtp+1   framing chars (2 chars)
1477           rem
1478 t.dcpl    equ       t.frmc+1  number of buffers in dcp chain
1479           rem
1480 t.scll    equ       t.dcpl+1  screenline length left, for echo neg.
1481           rem
1482 t.sncc    equ       t.scll+1  Echo negotiation sync ctr.
1483           rem
1484 t.entp    equ       t.sncc+1  Echo negotiation break table ptr
1485           rem
1486 t.ifch    equ       t.entp+1  input flow control characters
1487           rem
1488 t.ofch    equ       t.ifch+1  output flow control characters
1489           rem
1490 t.omct    equ       t.ofch+1  output message count (for flow control)
1491           rem
1492 t.itim    equ       t.omct+1  time of last call to inproc (2 words)
1493           rem
1494 t.metr    equ       t.itim+2  address of metering area
1495           rem
1496 t.abf0    equ       t.metr+1  absolute address of first permanent buffer
1497           rem
1498 t.abf1    equ       t.abf0+1  absolute address of first permanent buffer
1499           rem
1500 t.leng    equ       t.abf1+1  length of a tib
1501           rem
1502           rem                 ********************************
1503           rem                 * t.stat bits
1504           rem                 ********************************
1505           rem
1506           rem
1507 tsfcd     bool      000001    carrier detect
1508           rem
1509 tsfcts    bool      000002    clear to send
1510           rem
1511 tsfdsr    bool      000004    data set ready
1512           rem
1513 tsfsrc    bool      000010    supervisory receive
1514           rem
1515 tsfst     bool      000020    store status
1516           rem
1517 tsfmrk    bool      000040    send marker status
1518           rem
1519 tsftrm    bool      000100    send terminate status
1520           rem
1521 tsfrcv    bool      000200    receive mode
1522           rem
1523 tsfxmt    bool      000400    transmit mode
1524           rem
1525 tsfbrk    bool      001000    send line break
1526           rem
1527 tsfdtr    bool      002000    data terminal ready
1528           rem
1529 tsfsxt    bool      004000    supervisory transmit
1530           rem
1531 tsftre    bool      004000    tally runout enable (hdlc)
1532           rem
1533 tsfrts    bool      010000    request to send
1534           rem
1535 tsfcrq    bool      020000    acu call request
1536           rem
1537           rem
1538           rem                 ********************************
1539           rem                 * tib flags -- t.flg
1540           rem                 ********************************
1541           rem
1542           rem
1543 tfwrit    bool      000001    output chain present
1544           rem
1545 tfbel     bool      000002    send bell as next echoed character
1546           rem
1547 tffdpx    bool      000004    full duplex mode
1548           rem
1549 tfkybd    bool      000010    keyboard addressed
1550           rem
1551 tfprtr    bool      000020    printer addressed
1552           rem
1553 tfhang    bool      000040    hangup this line
1554           rem
1555 tflisn    bool      000100    answer the phone
1556           rem
1557 tfquit    bool      000200    send nl on line break
1558           rem
1559 tfctrl    bool      000400    do kybd/printer addressing
1560           rem
1561 tflfec    bool      001000    do lf echo on cr
1562           rem
1563 tfcrec    bool      002000    do cr echo on lf
1564           rem
1565 tftbec    bool      004000    do space echo on tab
1566           rem
1567 tfwabt    bool      010000    do write abort
1568           rem
1569 tfauto    bool      020000    this is hsla autobaud line
1570           rem
1571 tfeotx    bool      040000    eot expected from 2741
1572           rem
1573 tfisus    bool      100000    input suspended
1574           rem
1575 tfecpx    bool      200000    echoplex mode
1576           rem
1577 tfosus    bool      400000    output suspended
1578           rem
1579           rem                 ********************************
1580           rem                 * second word of tib flags
1581           rem                 ********************************
1582           rem
1583           rem
1584 tfxhld    bool      000001    hold transmit on
1585           rem
1586 tfdild    bool      000002    terminal is dialed up
1587           rem
1588 tfercv    bool      000004    enter receive mode
1589           rem
1590 tfrabt    bool      000010    do read abort
1591           rem
1592 tfacu     bool      000020    do dial out
1593           rem
1594 tfifc     bool      000040    input flow control mode
1595           rem
1596 tfofc     bool      000100    output flow control mode
1597           rem
1598 tfupsf    bool      000200    terminal is upshifted now
1599           rem
1600 tfrply    bool      000400    replay mode
1601           rem
1602 tfrpon    bool      001000    replay is occurring now
1603           rem
1604 tfplit    bool      002000    polite mode
1605           rem
1606 tfblak    bool      004000    asynchronous block acknowledgement
1607           rem
1608 tfcrcv    bool      010000    'control' receive mode
1609           rem
1610 tfmrcv    bool      020000    'message' receive mode
1611           rem
1612 tffrmi    bool      040000    frame mode
1613           rem
1614 tffip     bool      100000    frame in progress
1615           rem
1616 tfsftr    bool      200000    terminal is shifting device
1617           rem
1618 tfpfnl    bool      400000    line is in prefixnl mode
1619           rem
1620           rem
1621           rem                 *********************************
1622           rem                 * third word of tib flags
1623           rem                 *********************************
1624           rem
1625           rem
1626 tfbkpt    bool      000001    line is stopped at breakpoint
1627           rem
1628 tfitim    bool      000002    timeout if input stops
1629           rem
1630 tfkpar    bool      000004    keep parity bits
1631           rem
1632 tfecho    bool      000010    echoing has priority over output (lsla)
1633           rem
1634 tfbral    bool      000020    break on all characters
1635           rem
1636 tfsked    bool      000040    input timeout routine scheduled
1637           rem
1638 tf8in     bool      000100    don't strip input parity
1639           rem
1640 tf8out    bool      000200    don't strip output parity
1641           rem
1642 tfoddp    bool      000400    odd parity
1643           rem
1644 tfabf0    bool      001000    t.afb0 available
1645           rem
1646 *unused   bool      002000
1647           rem
1648 *unused   bool      004000
1649           rem
1650 tfabf1    bool      010000    t.abf1 available
1651           rem
1652 tfmask    bool      020000    channel has been masked for excessive interrupts
1653           rem
1654 tfinq     bool      040000    input is queued for the channel
1655           rem
1656           rem
1657           rem                 *********************************
1658           rem                 * redefined tib flags in t.flg
1659           rem                 *********************************
1660           rem
1661           rem
1662 tfdlup    equ       tfprtr    line is on dialup modem
1663           endm      tib
1664           ttls      tsttib - macro which decides which word of tib flags contains a bit
1665           rem
1666 tsttib    macro     c,m
1667           ine       '#1','tfwrit',%tfwrd1
1668           ine       '#1','tffdpx',%tfwrd1
1669           ine       '#1','tfkybd',%tfwrd1
1670           ine       '#1','tfprtr',%tfwrd1
1671           ine       '#1','tfhang',%tfwrd1
1672           ine       '#1','tflisn',%tfwrd1
1673           ine       '#1','tfquit',%tfwrd1
1674           ine       '#1','tfctrl',%tfwrd1
1675           ine       '#1','tflfec',%tfwrd1
1676           ine       '#1','tfcrec',%tfwrd1
1677           ine       '#1','tftbec',%tfwrd1
1678           ine       '#1','tfwabt',%tfwrd1
1679           ine       '#1','tfauto',%tfwrd1
1680           ine       '#1','tfeotx',%tfwrd1
1681           ine       '#1','tfbel',%tfwrd1
1682           ine       '#1','tfisus',%tfwrd1
1683           ine       '#1','tfecpx',%tfwrd1
1684           ine       '#1','tfosus',%tfwrd1
1685           ine       '#1','tfdlup',%tfwrd1
1686           ine       '#1','tfxhld',%tfwrd2
1687           ine       '#1','tfdild',%tfwrd2
1688           ine       '#1','tfercv',%tfwrd2
1689           ine       '#1','tfrabt',%tfwrd2
1690           ine       '#1','tfacu',%tfwrd2
1691           ine       '#1','tfifc',%tfwrd2
1692           ine       '#1','tfofc',%tfwrd2
1693           ine       '#1','tfupsf',%tfwrd2
1694           ine       '#1','tfrply',%tfwrd2
1695           ine       '#1','tfrpon',%tfwrd2
1696           ine       '#1','tfplit',%tfwrd2
1697           ine       '#1','tfblak',%tfwrd2
1698           ine       '#1','tfcrcv',%tfwrd2
1699           ine       '#1','tfmrcv',%tfwrd2
1700           ine       '#1','tffrmi',%tfwrd2
1701           ine       '#1','tffip',%tfwrd2
1702           ine       '#1','tfsftr',%tfwrd2
1703           ine       '#1','tfpfnl',%tfwrd2
1704           seterr    #1        not valid tib flag
1705           org       *-1
1706           ine       1,1,%done
1707 tfwrd1    mark
1708 tfwrd1    set       tfwrd1+#1
1709           ine       1,1,%done
1710 tfwrd2    mark
1711 tfwrd2    set       tfwrd2+#1
1712 done      mark
1713           endm      tsttib
1714           ttls      meters macro - define system & channel meters
1715           rem
1716 *++symget .mdilc,.mleng
1717 *++symlen .mdilc,2,.mdilu,2,.mspav,2,.mspau,2,.mimbx,2,.mimbu,2,.mbufa,2
1718 *++symlen .mbfpa,2,.mupab,2,.mpanf,2
1719 *++symget m.dql,m.synl,meters
1720 *++symlen m.dql,2,m.dqu,2,m.nst,2,m.nsu,2
1721 *++symlen m.prex,2,m.exh,2,m.ebof,2
1722 *++symlen m.nim,2,m.iml,2,m.nom,2,m.oml,2,m.cnt1,2,m.cnt2,2
1723 *++symlen m.cnt3,2,m.cnt4,2,m.cnt5,2,m.cnt6,2,m.cnt7,2,m.cnt8,2
1724           rem
1725           rem       this macro defines system-wide meters kept
1726           rem       in low memory and per-channel meters pointed
1727           rem       to by t.metr
1728           rem
1729 meters    macro     c,m
1730           ttls      system-wide meters
1731           rem
1732 .mdilc    set       464       cumulative no. of channels dialed
1733           rem
1734 .mdilu    set       466       updates of .mdilc
1735           rem
1736 .mspav    set       468       cumulative space available
1737           rem
1738 .mspau    set       470       updates of .mspav
1739           rem
1740 .mimbx    set       472       cumulative number of mbxes in use
1741           rem
1742 .mimbu    set       474       updates of .mimbx
1743           rem
1744 .mndil    set       476       current no. of channels dialed
1745           rem
1746 .malof    set       477       number of space allocation failures
1747           rem
1748 .mdias    set       478       abnormal dia status
1749           rem
1750 .mpool    set       479       total size of buffer pool (in words)
1751           rem
1752 .mbufa    set       480       number of buffer allocations
1753           rem
1754 .mbfpa    set       482       number of buffers pre-allocated
1755           rem
1756 .mupab    set       484       used a pre-allocated buffer
1757           rem
1758 .mpanf    set       486       no pre-allocated buffer available
1759           rem
1760 .mblow    set       488       buffer allocated in low memory
1761           rem
1762 .mleng    equ       .mpanf+2-.mdilc     length of system-wide meters
1763           ttls      per-channel meters
1764           rem
1765           rem       meters for all channels
1766           rem
1767 m.dql     equ       0         cumulative length of dia request queue
1768           rem
1769 m.dqu     equ       m.dql+2   updates of m.dql
1770           rem
1771 m.nst     equ       m.dqu+2   cumulative no. of pending status
1772           rem
1773 m.nsu     equ       m.nst+2   updates of m.nst
1774           rem
1775 m.over    equ       m.nsu+2   output overlaps
1776           rem
1777 m.par     equ       m.over+1  parity errors
1778           rem
1779 m.ssqo    equ       m.par+1   software status queue overflows
1780           rem
1781 m.hsqo    equ       m.ssqo+1  hardware status queue overflows
1782           rem
1783 m.inaf    equ       m.hsqo+1  input allocation failures
1784           rem
1785 m.cql     equ       m.inaf+1  current length of dia request queue
1786           rem
1787 m.exh     equ       m.cql+1   exhaust status
1788           rem
1789 m.xte     equ       m.exh+2   software xte status
1790           rem
1791 m.leng    equ       m.xte+2   length of common meters (must be even)
1792           rem
1793           rem
1794           rem       additional meters for asynchronous channels
1795           rem
1796 m.prex    equ       m.leng    pre-exhaust status
1797           rem
1798 m.ebof    equ       m.prex+2  echo buffer overflows
1799           rem
1800 m.quit    equ       m.ebof+2  bell-quits
1801           rem
1802 m.asyl    equ       m.quit+2  total length of asynchronous meters
1803           rem                 (must be even)
1804           rem
1805           rem
1806           rem       additional meters for synchronous channels
1807           rem
1808 m.nim     equ       m.leng    number of input messages
1809           rem
1810 m.iml     equ       m.nim+2   cumulative length of input
1811           rem
1812 m.mini    equ       m.iml+2   minimum length of input message
1813           rem
1814 m.maxi    equ       m.mini+1  maximum length of input message
1815           rem
1816 m.nom     equ       m.maxi+1  number of output messages
1817           rem
1818 m.oml     equ       m.nom+2   cumulative length of output
1819           rem
1820 m.mino    equ       m.oml+2   minimum length of output message
1821           rem
1822 m.maxo    equ       m.mino+1  maximum length of output message
1823           rem
1824 m.cnt1    equ       m.maxo+1  first type of counter
1825           rem
1826 m.cnt2    equ       m.cnt1+2  second type of counter
1827           rem
1828 m.cnt3    equ       m.cnt2+2  third type of counter
1829           rem
1830 m.cnt4    equ       m.cnt3+2  fourth type of counter
1831           rem
1832 m.cnt5    equ       m.cnt4+2  fifth type of counter
1833           rem
1834 m.cnt6    equ       m.cnt5+2  sixth type of counter
1835           rem
1836 m.cnt7    equ       m.cnt6+2  seventh type of counter
1837           rem
1838 m.cnt8    equ       m.cnt7+2  eighth type of counter
1839           rem
1840 m.synl    equ       m.cnt8+2  total length of synchronous meters
1841           endm      meters
1842           ttls      intm - interrupt time meters structure
1843           rem
1844           rem
1845 intm      macro     c,m
1846           rem
1847           rem       **********************************************
1848           rem       * structure describing meters of time spent in
1849           rem       * inhibited routines
1850           rem       **********************************************
1851           rem
1852 it.tot    equ       0         running total of time spent
1853           rem
1854 it.inc    equ       2         number of updates to it.tot
1855           rem
1856 it.gt1    equ       4         number of times time spent was > 1 msec
1857           rem
1858 it.max    equ       7         maximum time spent in one invocation
1859           rem                 (right half of doubleword)
1860           endm      intm
1861           ttls      hslatb - define hsla table
1862           rem
1863           rem
1864 hslatb    macro     c,m
1865           rem
1866           rem       ********************************************
1867           rem       * hsla table symbol definitions
1868           rem       ********************************************
1869           rem
1870 ht.flg    equ       0         hsla tables flag bits
1871 ht.tib    equ       1         tib ptr in hsla table
1872           rem
1873 htfcc     bool      400000    concentrator channel
1874 htfpl     bool      200000    private line modem or hardwire
1875 htfasy    bool      100000    async channel
1876 htfop1    bool      040000    option 1
1877 htfop2    bool      020000    option 2
1878 htfmdm    bool      017000    modem type, 4 bits
1879 htflnt    bool      000760    line type, 5 bits
1880 htfspd    bool      000017    line speed, 4 bits
1881           rem
1882           rem
1883           endm      hslatb
1884           ttls      cctdef - define symbols for cct creation
1885           rem
1886           rem       this macro setups bit for cct creation
1887           rem
1888 cctdef    macro     c,m
1889           rem
1890           rem       cct control bit definitions
1891           rem
1892 ct.ncs    bool      000       normal char store
1893 ct.t1s    bool      001       store and terminate on next
1894 ct.t2s    bool      002       store and terminate after 2 chars
1895 ct.t0s    bool      003       store and terminate
1896 ct.dmk    bool      004       store and marker delayed
1897 ct.mk1    bool      005       store and marker on next
1898 ct.ign    bool      006       ignore, no store
1899 ct.mrk    bool      007       store and marker
1900 ct.sw     bool      020       switch icws
1901 ct.syn    bool      040       resync channel
1902 ct.tb1    bool      100       switch to table 1
1903 ct.tb2    bool      200       switch to table 2
1904 ct.tb3    bool      300       switch to table 3
1905 ct.tb4    bool      400       switch to table 4
1906           rem
1907 ct.eol    equ       ct.sw+ct.t0s        eol for regular tty
1908 ct.grt    equ       ct.sw+ct.syn+ct.t1s for etx plus bcc char
1909 ct.etx    equ       ct.t1s+ct.sw+ct.tb4
1910 ct.nak    equ       ct.t0s+ct.sw+ct.tb4
1911 ct.itb    equ       ct.mk1
1912 ct.stx    equ       ct.tb2+ct.dmk
1913 ct.mtb    equ       ct.mrk+ct.tb2
1914           rem
1915           rem       ** following codes are for setcct opblock
1916           rem
1917 scc.dl    equ       0         delete current cct
1918 scc.df    equ       1         set to default cct based on modes
1919 scc.bs    equ       2         reset to base of current cct
1920           rem
1921           endm      cctdef
1922           ttls      csbits macro
1923           rem       this macro defines "control" bits and standard
1924           rem       stats bits
1925           rem
1926 *++symgetr s.cd,s.ads,,istat
1927 *++symget  s.rto,s.pbyt,,istat
1928 *++symgetr c.srec,c.scmd,,cmd
1929 *++symgetr c.scrq,c.rcrq,,cmd
1930           rem
1931 csbits    macro     c,m
1932           ttls      control and status bits
1933           rem       control bits
1934           rem
1935           rem
1936 c.srec    bool      000001    set receive mode
1937           rem
1938 c.rrec    bool      000002    reset receive mode
1939           rem
1940 c.sxmt    bool      000004    set transmit mode
1941           rem
1942 c.rxmt    bool      000010    reset transmit mode
1943           rem
1944 c.sdtr    bool      000020    set data terminal ready
1945           rem
1946 c.rdtr    bool      000040    reset data terminal ready
1947           rem
1948 c.ssup    bool      000100    set supervisory transmit mode
1949           rem
1950 c.stre    bool      000100    set tally runout enable (hdlc)
1951           rem
1952 c.rsup    bool      000200    reset supervisory transmit mode
1953           rem
1954 c.rtre    bool      000200    reset tally runout enable (hdlc)
1955           rem
1956 c.stat    bool      000400    store status
1957           rem
1958 c.sbrk    bool      001000    send line break
1959           rem
1960 c.smrk    bool      002000    store marker status
1961           rem
1962 c.strm    bool      004000    store terminate status
1963           rem
1964 c.srqs    bool      010000    set request to send
1965           rem
1966 c.rrqs    bool      020000    reset request to send
1967           rem
1968 c.pad     bool      040000    unused
1969           rem
1970 c.cmd     bool      100000    indicates cmd subop
1971           rem
1972 c.scmd    bool      400000    indicates supplementary cmd subop
1973           rem
1974           rem                 the following must be used in the
1975           rem                 optional fields to the cmd (or
1976           rem                 contrl) macros in the
1977           rem                 control_tables
1978           rem
1979           rem
1980 c.scrq    bool      000001    set call request
1981           rem
1982 c.rcrq    bool      000002    reset call request
1983           rem
1984           rem
1985           rem       status bits
1986           rem
1987           rem
1988 s.cd      bool      000001    carrier detect
1989           rem
1990 s.cts     bool      000002    clear to send
1991           rem
1992 s.dsr     bool      000004    data set ready
1993           rem
1994 s.sprc    bool      000010    supervisory receive mode
1995           rem
1996 s.st      bool      000020    status requested
1997           rem
1998 s.mark    bool      000040    marker status
1999           rem
2000 s.term    bool      000100    terminate status
2001           rem
2002 s.prex    bool      000200    pre-exhaust
2003           rem
2004 s.brk     bool      000400    line break received
2005           rem
2006 s.brch    bool      001000    break character received
2007           rem
2008 s.ring    bool      002000    ring
2009           rem
2010 s.exh     bool      004000    exhaust status
2011           rem
2012 s.prty    bool      010000    parity error
2013           rem
2014 s.fcse    bool      010000    frame check sequence error (hdlc)
2015           rem
2016 s.xte     bool      020000    transfer timing error
2017           rem
2018 s.pwi     bool      040000    acu power indicator
2019           rem
2020 s.dlo     bool      100000    acu data line occupied
2021           rem
2022 s.acr     bool      200000    acu abandon call and retry
2023           rem
2024 s.ads     bool      400000    acu raised data set status
2025           rem
2026           rem       the following four bits share
2027           rem       the values of acu status but can never
2028           rem       be misinterpreted.
2029           rem
2030 s.rto     bool      040000    receive time out (bsc)
2031           rem
2032 s.isd     bool      040000    idle state detect (hdlc)
2033           rem
2034 s.rbt     bool      100000    receive block termination (bsc & hdlc)
2035           rem
2036 s.bmk     bool      200000    marker status (bsc)
2037           rem
2038 s.rabt    bool      200000    receive abort (hdlc)
2039           rem
2040 s.bdmk    bool      400000    delayed marker status (bsc)
2041           rem
2042 s.pbyt    bool      400000    partial byte (hdlc)
2043           rem
2044           rem
2045           rem                 bits in common between standard status
2046 s.tib     bool      000177    and tib status
2047           rem
2048           rem                 dataset status bits in standard status
2049 s.dss     bool      000017    and tib status
2050           rem
2051           rem
2052           rem       asynchronous configuration bits
2053           rem
2054           rem
2055           rem
2056 fg.icw    bool      000001    icw (two send ICW's)
2057           rem
2058 fg.lpr    bool      000002    lateral parity receive
2059           rem
2060 fg.lps    bool      000004    lateral parity send
2061           rem
2062 fg.lpo    bool      000010    lateral parity odd
2063           rem
2064 fg.5bt    bool      000020    5-bit character mode
2065           rem
2066 fg.6bt    bool      000040    6-bit character mode
2067           rem
2068 fg.7bt    bool      000100    7-bit character mode
2069           rem
2070 fg.8bt    bool      000200    8-bit character mode
2071           rem
2072           rem
2073 fg.beb    bool      000400    ebcdic mode (bsc)
2074           rem
2075 fg.itf    bool      000400    interfame time fill (hdlc)
2076           rem
2077 fg.btr    bool      001000    transparent mode (bsc)
2078           rem
2079 fg.cct    bool      002000    enable cct
2080           rem
2081           endm      csbits
2082           ttls      devtab macro
2083           rem
2084           rem       this macro defines the fields in the device table
2085           rem
2086 devtab    macro     c,m
2087           ttls      device table entry (devtab)
2088           rem                 two characters used alternately for
2089           rem
2090 dt.seq    equ       0         sequencing
2091           rem
2092 dt.cct    equ       dt.seq+1  address of default cct (hsla only)
2093           rem                 address of array of keyboard addressing
2094           rem
2095 dt.key    equ       dt.cct+1  sequences
2096           rem                 address of array of printer addressing
2097           rem
2098 dt.prt    equ       dt.key+1  sequences
2099           rem
2100 dt.flg    equ       dt.prt+1  flags(one word)
2101           rem
2102 dt.cmt    equ       dt.flg+1  carriage movement table (6 chars)
2103           rem
2104 dt.brk    equ       dt.cmt+3  default break list (4 words) (lsla only)
2105           rem
2106           rem                 flags
2107           rem
2108 dtfctl    bool      000001    default setting of tfctrl (in tib)
2109           rem
2110 dtfsct    bool      000002    default setting of short cct flag
2111           rem
2112 dtfsft    bool      000004    default setting of tfsftr
2113           endm      devtab
2114           ttls      dlytbl macro
2115           rem
2116           rem       this macro defines the fields in the delay table
2117           rem
2118 dlytbl    macro     c,m
2119           ttls      delay table entry (dlytbl)
2120           rem
2121           rem
2122 dl.fwd    equ       0         forward pointer
2123           rem
2124 dl.bck    equ       1         back pointer
2125           rem
2126 dl.rfc    equ       2         reference count
2127           rem
2128 dl.hsz    equ       3         header size - also for echnego tables.
2129           rem
2130 dl.lf     equ       3         delays for line feed
2131           rem
2132 dl.cr     equ       4         per-column delay factor for carriage return
2133           rem
2134 dl.tba    equ       5         initial delay for tab
2135           rem
2136 dl.tbb    equ       6         per-column delay factor for tab
2137           rem
2138 dl.bs     equ       7         delays for backspace
2139           rem
2140 dl.ff     equ       8         delays for form feed
2141           rem
2142           rem
2143 dl.siz    equ       9         size of table entry
2144           endm      dlytbl
2145           ttls      global macro
2146           rem
2147           rem       this macro defines the bits in the "global switches"
2148           rem
2149 global    macro     c,m
2150           ttls      global switches
2151           rem
2152 gbfup     bool      000001    cs is up
2153           rem
2154 gbfhng    bool      000002    we've received "blast hangup"
2155           rem
2156 gbfbla    bool      000004    doing "blast" output
2157           endm      global
2158           ttls      buffer macro
2159           rem
2160           rem       this macro defines the fields in a standard buffer
2161           rem
2162 *++symget  bufsmk,bufsmk,,bf.flg
2163 *++symget  bfflst,bffhld,,bf.flg
2164 *++symget  buftmk,buftmk,,bf.flg
2165 *++symtype bufsmk,octal,buftmk,octal
2166           rem
2167 buffer    macro     c,m
2168           ttls      buffer format
2169           rem
2170 bf.nxt    equ       0         address of next buffer in chain
2171           rem
2172 bf.siz    equ       bf.nxt+1  size of buffer (bits0-2)
2173           rem
2174 bf.flg    equ       bf.nxt+1  flags (bits3-8)
2175           rem
2176 bf.tly    equ       bf.nxt+1  tally of buffer (bits9-17)
2177           rem
2178 bf.dta    equ       bf.siz+1  start of data
2179           rem
2180 bufsiz    equ       32        buffer size
2181           rem
2182 bufnch    equ       bufsiz*2-4          number of data characters in a buffer
2183           rem
2184 bufmax    equ       40        maximum number of input buffers
2185           rem
2186 bufpre    equ       10        number of buffers to trigger pre-exhaust
2187           rem
2188 bufshf    equ       5         number of bits shifted to divide by bufsiz
2189           rem
2190 bufres    equ       20        number of reserved buffers
2191           rem
2192 bufsmk    bool      700000    mask to isolate bf.siz
2193           rem
2194 buffmk    bool      077000    mask to isolate bf.flg
2195           rem
2196 buftmk    bool      000777    mask to isolate bf.tly
2197           rem
2198 bufthr    equ       2         threshold at which to send send_output
2199           rem
2200 bfmsiz    equ       256       maximum buffer size in words
2201           rem
2202           rem                 ********************************
2203           rem                 * buffer flags
2204           rem                 ********************************
2205           rem
2206           rem
2207 bfflst    bool      040000    last buffer in message
2208           rem
2209 bffbrk    bool      020000    buffer contains break character
2210           rem
2211 bfftra    bool      010000    throw away this buffer when done inputting
2212           rem
2213 bffrpy    bool      004000    buffer is last in replay chain
2214           rem
2215 bffctl    bool      002000    buffer consists of keybd/prtr control
2216           rem
2217 bffhld    bool      001000    hold output buffer until dmpout
2218           endm      buffer
2219           ttls      tconst macro
2220           rem
2221           rem
2222           rem       this macro defines various flags, control bits,
2223           rem       and character constants for the control_tables
2224           rem       modules
2225           rem
2226           rem
2227 tconst    macro     c,m
2228           ttls      flag and control bit definitions
2229           rem
2230 gbf6up    bool      000001    cs up global switch
2231           rem
2232           rem       device types
2233           rem
2234 ttasci    equ       1         ascii terminals, cdi, tty 33, 35, 37, etc.
2235 tt1050    equ       2         ibm 1050
2236 tt2741    equ       3         ibm 2741, trendata, dura, etc.
2237 ttards    equ       4         ards, tektronix
2238 ttsync    equ       5         general sync devices
2239 ttg115    equ       6         remote computer interface, g115
2240 ttbsc     equ       7         binary synchronous communications
2241 tt202c    equ       8         ascii on 202c6 modem
2242 ttvip     equ       9         vip terminal
2243 ttpvip    equ       16        polled vip
2244 ttx25l    equ       17        X.25 Link Access Procedure (LAP)
2245 ttcolt    equ       19        colts (online t&d executive)
2246           rem
2247           rem       signal types
2248           rem
2249 quit      bool      113       dia cmd, break received
2250 dialup    bool      100       dia cmd, accept new terminal
2251 hangup    bool      101       dia cmd, disconnected line
2252 wrutim    bool      114       dia cmd, wru timeout
2253 sndout    bool      105       dia cmd, send output
2254 acupwi    bool      120       dia cmd, no power to acu
2255 acudlo    bool      121       dia cmd, data line occupied
2256 acuacr    bool      122       dia cmd, dial out failed
2257 acung     bool      123       dia cmd, request for acu is invalid
2258           rem
2259           rem       control types
2260           rem
2261 srec      equ       c.srec    set receive mode
2262 rrec      equ       c.rrec    reset receive
2263 sxmit     equ       c.sxmt    set xmit mode
2264 rxmit     equ       c.rxmt    reset xmit
2265 sdtr      equ       c.sdtr    set data terminal ready
2266 rdtr      equ       c.rdtr    reset dtr
2267 ssup      equ       c.ssup    set supervisory xmit
2268 rsup      equ       c.rsup    reset supervisory xmit
2269 stat      equ       c.stat    store status
2270 sbrk      equ       c.sbrk    send line break
2271 smark     equ       c.smrk    send marker status
2272 sterm     equ       c.strm    send terminate status
2273 srts      equ       c.srqs    set request to send
2274 rrts      equ       c.rrqs    reset request to send
2275 scrq      equ       c.scrq    set call request
2276 rcrq      equ       c.rcrq    reset call request
2277 stroe     equ       c.stre    set tally runout enable (hdlc)
2278 rtroe     equ       c.rtre    reset tally runout enable (hdlc)
2279           rem
2280           rem       status bits
2281           rem
2282 cd        equ       s.cd      carrier detect
2283 cts       equ       s.cts     clear to send
2284 dsr       equ       s.dsr     data set ready
2285 suprec    equ       s.sprc    supervisory receive
2286 st        equ       s.st      status requested
2287 break     equ       s.brk     line break received
2288 brkchr    equ       s.brch    break char received
2289 ring      equ       s.ring    ring
2290 term      equ       s.term    terminate status
2291 marker    equ       s.mark    marker status
2292 exh       equ       s.exh     exhaust status
2293 prexh     equ       s.prex    pre-exhaust status
2294 parity    equ       s.prty    parity error
2295 xte       equ       s.xte     transfer timing error
2296 pwi       equ       s.pwi     power indicator on acu
2297 dlo       equ       s.dlo     data line occupied (acu)
2298 ads       equ       s.ads     dialed station has answered
2299           rem                 data set is in data mode (acu)
2300 acr       equ       s.acr     abandon call and retry (acu)
2301 rcvto     equ       s.rto     rcv time out
2302 bscrcv    equ       s.rbt     bsc terminate
2303 bscmrk    equ       s.bmk     bsc marker
2304 bscdmk    equ       s.bdmk    bsc delayed marker
2305 fcserr    equ       s.fcse    frame check sequence error (hdlc)
2306 idlesd    equ       s.isd     idle state detect (hdlc)
2307 rcvtrm    equ       s.rbt     receive terminate (hdlc)
2308 rcvabt    equ       s.rabt    receive abort (hdlc)
2309 parbyt    equ       s.pbyt    partial byte (hdlc)
2310           eject
2311           rem
2312           rem       output types
2313           rem
2314 adprtr    bool      401       insert printer addr string
2315 adkybd    bool      402       insert keyboard addr string
2316 outmsg    bool      403       insert output msg
2317 repeat    bool      404       insert next char n times
2318           rem
2319           rem       various characters matched and sent
2320           rem
2321 eoa       bool      64        eoa from/to 2741/1050
2322 minus     bool      1         minus char from 1050
2323 ibmnl     bool      55        cr nl from/to 2741/1050
2324 ibmpad    bool      75        2741/1050 pad character(idle)
2325 ibmeot    bool      74        2741/1050 eot char
2326 eotshf    bool      174       eot w/case shift
2327 ibmbs     bool      35        backspace from 2741
2328 ibmtab    bool      57        tab from 2741
2329 ibmsl     bool      42        2741 slash
2330 ibm0      bool      24        2741 zero
2331 ibm9      bool      44        2741 nine
2332 ibmprf    bool      76        2741 prefix code
2333 ibmpls    bool      3         2741 plus sign
2334 ibmup     bool      34        2741 upshift
2335 ibmdwn    bool      37        2741 downshift
2336 nl        bool      12        ascii new-line
2337 cr        bool      15        ascii carriage return
2338 pad       bool      0         ascii pad char
2339 dle       bool      20        ascii data link escape
2340 eot       bool      4         ascii end of transmission
2341 esc       bool      33        ascii escape char
2342 ff        bool      14        ascii form feed char
2343 tab       bool      11        ascii tab char
2344 bs        bool      10        ascii backspace
2345 space     bool      40        ascii space
2346 awru      bool      5         ascii "who are you?"
2347 null      bool      0         nothing
2348 ack       bool      6         ascii ack
2349 nak       bool      25        ascii nak
2350 soh       bool      1         ascii start of header
2351 syn       bool      26        ascii syn character
2352 stx       bool      2         ascii start of text char
2353 etx       bool      3         ascii end of text char
2354 bel       bool      007       ascii bell character
2355 h         bool      150       ascii h (esc mtr on)
2356 l         bool      154       ascii l (used by vip for ff)
2357 q         bool      161       ascii q (used by vip for quit)
2358 atchar    bool      100       ascii at sign (used to mark reset-read)
2359 nochar    bool      777       used in cmt to match no character
2360           rem
2361           rem       scan subop types
2362           rem
2363 match     bool      501       match the char exactly
2364 search    bool      502       search until match
2365 ignore    bool      503       skip to next char, block check unchanged
2366 sbcc      bool      504       start the bcc computation
2367 endchn    bool      505       point to last character in chain
2368 cbcc      bool      506       compare current with bcc char
2369 cmask     bool      507       compare char with mask
2370 rescan    bool      510       reset scan position to first char in chai
2371 strlrc    bool      511       start lrc computation
2372 outlrc    bool      512       insert lrc into chain
2373 cmplrc    bool      513       compare lrc accumulation vs current char
2374 seteom    bool      514       set last buffer in message flag ( for bld
2375 replac    bool      515       replace current char
2376 cmplst    bool      516       compare current vs list of chars for equa
2377 movchr    bool      517       move current char to tib extension
2378 movmsk    bool      520       movchr with masking of current char
2379 count     bool      521       count number of chars scanned
2380 serch2    bool      522       search for one of two chars
2381 setbit    bool      523       turn on bits in current char
2382 offbit    bool      524       turn off bits in current char
2383 chktrm    bool      525       check the sync termination char
2384 mvlst2    bool      526       move last two chars to tib ext
2385 nxtchr    bool      527       update block check and skip to next char
2386           endm      tconst
2387           ttls      tibex - macro for define addresses in tib extension
2388           rem
2389 tibex     macro     c,m
2390           pmc       save,off
2391           ine       tibx.0,1,%exbegn
2392 tibx.1    set       0
2393 tibx.2    set       0
2394 tibx.0    set       1
2395 tibxsz    set       0
2396 exbegn    mark
2397           ine       '#2','word',%exword
2398           ine       '#2','char',%exchar
2399           seterr    #2        not word or char
2400           ine       1,1,%exdone
2401 exchar    mark
2402 #1        equ       304+2*tibx.1+tibx.2
2403           ine       tibx.2,1,%exch2
2404 tibx.2    set       1
2405 tibxsz    set       tibxsz+1
2406           ine       1,1,%exdone
2407 exch2     mark
2408 tibx.1    set       tibx.1+1
2409 tibx.2    set       0
2410           ine       1,1,%exdone
2411 exword    mark
2412           ine       tibx.2,0,%exwrd2
2413 tibx.1    set       tibx.1+1
2414 tibx.2    set       0
2415 exwrd2    mark
2416           crsm      save,off
2417 tibx.3    set       1
2418           ine       '#3','',1
2419 tibx.3    set       #3
2420           crsm      restore
2421 #1        equ       -tibx.1-1
2422 tibx.1    set       tibx.1+tibx.3
2423 tibxsz    set       tibxsz+tibx.3
2424 exdone    mark
2425           pmc       restore
2426           endm      tibex
2427           ttls      macro to define bisync data
2428           rem
2429 bscdat    macro     c,m
2430           ttls      bsc symbol definitions
2431 ************************************************************************
2432 *
2433 *         format of tib extentsion
2434 *
2435 ************************************************************************
2436           rem
2437           tibex     ack0,char /* ack0 value */
2438           tibex     ack1,char /* ack1 value */
2439           tibex     tiback,char         /* current ack value */
2440           tibex     enq,char  /* enq value */
2441           tibex     tibnak,char         /* nak value */
2442           tibex     tibeot,char         /* eot value */
2443           tibex     rvi,char  /* rvi value */
2444           tibex     wack,char /* wack value */
2445           tibex     etb,char  /* etb value */
2446           tibex     wrkch1,char         /* temporary work character (HASP) */
2447           tibex     wrkch2,char         /* temporary work character (HASP) */
2448           tibex     chartb,word         /* address of table define characters for mode */
2449           tibex     stattb,word         /* address of state transiion table */
2450           tibex     nakcnt,word         /* count of naks received during write */
2451           tibex     naklmt,word         /* limit of naks during write */
2452           tibex     enqcnt,word         /* count of bad responses or timeouts during write */
2453           rem
2454           tibex     result,word         /* final answer on message scans */
2455           rem                 /* ... possible values are: */
2456 resinc    equ       0         /*     ... message incomplete */
2457 resnak    equ       1         /*     ... message should be nakked */
2458 reseot    equ       2         /*     ... message was eot */
2459 resenq    equ       3         /*     ... message was enq */
2460 resack    equ       4         /*     ... good message */
2461 resnul    equ       5         /*     ... no data at all */
2462 resntr    equ       6         /*     ... non-transparent msg in trans mode */
2463           rem
2464           tibex     ctlop,word          /* start of 4 words for linctl */
2465           tibex     ctlvl1,word
2466           tibex     ctlvl2,word
2467           tibex     ctlvl3,word
2468           tibex     bidlmt,word         /* maximum times to bid for line */
2469           tibex     bidcnt,word         /* count of bid tries */
2470           tibex     cfgrmd,word         /* rmode bits for reconfig */
2471           tibex     cfgsmd,word         /* smode bits for reconfig */
2472           tibex     ttdtim,word         /* time interval between ttds */
2473           tibex     ttdlmt,word         /* maxinum number to send */
2474           tibex     ttdcnt,word         /* number sent so far */
2475           tibex     polad1,word         /* 3 words for polling address */
2476           tibex     polad2,word
2477           tibex     polad3,word
2478           tibex     testrt,word         /* address of extra test state handler */
2479           rem
2480           tibex     exflg1,word         /* a word of flags */
2481 dialed    bool      000001    /* set when dialup has been signalled */
2482 naksw     bool      000002    /* nak required */
2483 nakksw    bool      000004    /* indicates receive nakked last message */
2484 codasc    bool      000010    /* set if using ascii code */
2485 codebc    bool      000020    /* set if using ebcdic code */
2486 trnon     bool      000040    /* set if tranparency is on */
2487 trnoff    bool      000100    /* set if transparency is off */
2488 wacksw    bool      000200    /* indicates wack sent or received on last msg */
2489 datrcv    bool      000400    /* indicates data was read during write */
2490 alwbid    bool      001000    /* set if line bid should be accepted */
2491 cfgpnd    bool      002000    /* reconfiguration is pending */
2492 cfgok     bool      004000    /* its ok to reconfigure now */
2493 rflag     bool      010000    /* to distinguish between 'write' and 'writer' */
2494 ttdsw     bool      020000    /* ttd was just sent */
2495 ntrsw     bool      040000    /* set while send non-trans block in trans mode */
2496 rvisw     bool      100000    /* rvi has been used as ack this transmission */
2497 needrv    bool      200000    /* ack this msg with rvi if possible */
2498 ctlmsg    bool      400000    /* indicates first output buffer is ctl msg */
2499           rem
2500           tibex     exflg2,word         /* second word of flags */
2501 lookot    bool      000001    /* set if read subr should watch for write data */
2502 gotot     bool      000002    /* read terminated by write call */
2503 timout    bool      000004    /* timeout waiting for input */
2504 ib3270    bool      000010    /* ibm 3270 protocol to be used */
2505 polpnd    bool      000020    /* poll pending on channel */
2506 pollok    bool      000040    /* ok to poll now */
2507 selop     bool      000100    /* select in progress */
2508           bool      000200
2509 pollsw    bool      000400    /* last message sent was poll */
2510 autopl    bool      001000    /* automatic poll mode enabled */
2511 haspmd    bool      002000    /* hasp protocol to be used */
2512 master    bool      004000    /* we are master (or primary) end */
2513 outarv    bool      010000    /* output from CS arrived while busy (HASP) */
2514 dialos    bool      020000    /* can't send input over DIA now (HASP) */
2515 csreqa    bool      040000    /* tell CS when current msg is sent (HASP) */
2516 lswabs    bool      100000    /* local system wait-a-bit (HASP) */
2517 fswabs    bool      200000    /* foreign system wait-a-bit (HASP) */
2518 fnrcba    bool      400000    /* block arrived but foreign not ready (HASP) */
2519           rem
2520           tibex     selad1,word
2521           tibex     selad2,word
2522           tibex     selad3,word
2523           rem
2524           rem       /* HASP re-definitions */
2525           rem
2526 hxmttm    equ       ttdtim    /* hasp transmit time limit */
2527 hcontm    equ       bidlmt    /* hasp connect time limit */
2528 hrcvtm    equ       ttdcnt    /* hasp receive time limit */
2529 wabmsk    equ       selad1    /* array of wait-a-bit masks */
2530 hblkno    equ       selad2    /* BCB of block CS is interested in */
2531 wrpcnt    equ       selad3    /* sync-blocks needed before xfer resumes */
2532           eject
2533           rem       /* ascii char values */
2534           rem
2535 aack0     bool      60
2536 aack1     bool      61
2537 aenq      bool      5
2538 anak      bool      25
2539 aeot      bool      4
2540 arvi      bool      74
2541 awack     bool      73
2542 aetb      bool      27
2543           rem
2544           rem       /* ebcdic char values */
2545           rem
2546 eack0     bool      160
2547 eack1     bool      141
2548 eenq      bool      55
2549 enak      bool      75
2550 eeot      bool      67
2551 ervi      bool      174
2552 ewack     bool      153
2553 eetb      bool      46
2554           rem
2555           rem       /* common char values */
2556           rem
2557 itb       bool      37
2558           rem
2559           rem
2560           rem       /* line status op-codes */
2561           rem
2562 lstbdf    equ       1         /* bid failed */
2563 lstbbk    equ       2         /* attempt to write bad block */
2564 lstrvi    equ       3         /* rvi recieved */
2565 lstnak    equ       4         /* excessive naks */
2566 lstrwr    equ       5         /* reporting result of write status */
2567 lstwrc    equ       6         /* write completed */
2568 lstwkm    equ       7         /* ibm3270 wacked message */
2569 lsteot    equ       8         /* got eot in response to output */
2570 lstabo    equ       9         /* sent eot because too many timeouts or enq's */
2571 lstslf    equ       10        /* select failed */
2572 lstwck    equ       11        /* wack in response to select */
2573 lstnko    equ       12        /* too many naks on output */
2574 lsthin    equ       13        /* hasp initialization complete */
2575 lsthfr    equ       14        /* foreign system wait-a-bit reset (HASP) */
2576           rem
2577           rem       /* line control op-codes */
2578           rem
2579 lctbid    equ       1         /* set bid retry limit */
2580 lctabd    equ       2         /* allow line bids now */
2581 lctcfg    equ       3         /* reconfigure */
2582 lctttd    equ       4         /* set ttd parameters */
2583 lcttwr    equ       5         /* test write status */
2584 lct327    equ       6         /* set ibm3270 mode */
2585 lctpla    equ       7         /* set polling address */
2586 lctpol    equ       8         /* start a polling operation */
2587 lctsla    equ       9         /* set selection address */
2588 lctsta    equ       10        /* stop auto polling */
2589 lctmst    equ       11        /* set master or slave mode */
2590 lcthsp    equ       12        /* set hasp mode */
2591 lctnak    equ       13        /* set nak limit */
2592 lcthtm    equ       14        /* set hasp time limits */
2593           rem
2594           endm      bscdat
2595           ttls      control tables op block definitions
2596           rem
2597 *++opstart -- db_fnp_opblocks_.cds looks for this statement when compiled
2598           rem
2599 * * * * * * * * * * * * * * * * * * * * *
2600 *
2601 *         goto macro
2602 *
2603 * * * * * * * * * * * * * * * * * * * * *
2604           rem
2605 goto      macro
2606           oct       777001
2607           zero      #1
2608           endm      goto
2609           rem
2610 * * * * * * * * * * * * * * * * * * * * *
2611 *
2612 *         iftype macro
2613 *
2614 * * * * * * * * * * * * * * * * * * * * *
2615           rem
2616 iftype    macro
2617           oct       777002
2618           zero      #1
2619           zero      #2
2620           endm      iftype
2621           rem
2622 * * * * * * * * * * * * * * * * * * * * *
2623 *
2624 *         punt macro
2625 *
2626 * * * * * * * * * * * * * * * * * * * * *
2627           rem
2628 punt      macro
2629           oct       777000
2630           zero      #1
2631           endm      punt
2632           eject
2633 * * * * * * * * * * * * * * * * * * * * *
2634 *
2635 *         wait macro
2636 *
2637 * * * * * * * * * * * * * * * * * * * * *
2638           rem
2639 wait      macro
2640           oct       777003
2641           zero      #1
2642           zero      #2
2643           zero      #3
2644           endm      wait
2645           rem
2646 * * * * * * * * * * * * * * * * * * * * *
2647 *
2648 *         status macro
2649 *
2650 * * * * * * * * * * * * * * * * * * * * *
2651           rem
2652 status    macro
2653           oct       777004
2654           zero      #3
2655           vfd       o18/#1
2656           vfd       o18/#2
2657           endm      status
2658           eject
2659 * * * * * * * * * * * * * * * * * * * * *
2660 *
2661 *         dcwlst macro
2662 *
2663 * * * * * * * * * * * * * * * * * * * * *
2664           rem
2665 dcwlst    macro
2666           oct       777005
2667           endm      dcwlst
2668           rem
2669           rem       SUB-OPS TO DCWLST OP BLOCK
2670           rem       leftmost 3 bits of 18 bit word
2671           rem       distinguish the sub-ops.
2672           rem
2673 * * * * * * * * * * * * * * * * * * * * *
2674 *
2675 *         cmd macro           SUB-OP 1
2676 *                             up to 15 control bits
2677 *
2678 *                             SUB-OP 5
2679 *                             if 2nd arg, allows for
2680 *                             up to 15 more control bits
2681 *
2682 * * * * * * * * * * * * * * * * * * * * *
2683           rem
2684 cmd       macro
2685           vfd       o3/1,o15/#1
2686           crsm      off
2687           ine       '#2', '', 1
2688           vfd       o3/5,o15/#2
2689           crsm      on
2690           endm      cmd
2691           eject
2692 * * * * * * * * * * * * * * * * * * * * *
2693 *
2694 *         input macro         SUB-OP 2
2695 *
2696 * * * * * * * * * * * * * * * * * * * * *
2697           rem
2698 input     macro
2699           vfd       o3/2,6/#1,o9/#2
2700           endm      input
2701           rem
2702 * * * * * * * * * * * * * * * * * * * * *
2703 *
2704 *         output macro        SUB-OP 3
2705 *
2706 * * * * * * * * * * * * * * * * * * * * *
2707           rem
2708 output    macro
2709           pmc       save,off
2710 k         set       1
2711 x         set       192
2712           idrp      #1
2713           ife       k,0,3
2714 k         set       1
2715 x         set       #1
2716           ife       1,2,4
2717 k         set       0
2718           pmc       restore
2719           vfd       o9/x,o9/#1
2720           pmc       save,off
2721           idrp
2722           pmc       restore
2723           ife       k,1,1
2724           vfd       o9/X,o9/477
2725           ife       k,0,1
2726           vfd       o18/477000
2727           endm      output
2728           rem
2729 * * * * * * * * * * * * * * * * * * * * *
2730 *
2731 *         rdtly macro         SUB-OP 4
2732 *
2733 * * * * * * * * * * * * * * * * * * * * *
2734           rem
2735 rdtly     macro
2736           vfd       o3/4,6/#1,9/0
2737           endm      rdtly
2738           eject
2739 * * * * * * * * * * * * * * * * * * * * *
2740 *
2741 *         setime macro
2742 *
2743 * * * * * * * * * * * * * * * * * * * * *
2744           rem
2745 setime    macro
2746           oct       777006
2747           vfd       18/#1
2748           endm      setime
2749           rem
2750 * * * * * * * * * * * * * * * * * * * * *
2751 *
2752 *         gotype macro
2753 *
2754 * * * * * * * * * * * * * * * * * * * * *
2755           rem
2756 gotype    macro
2757           oct       777007
2758           idrp      #1
2759           zero      #1
2760           idrp
2761           oct       777000
2762           endm      gotype
2763           rem
2764 * * * * * * * * * * * * * * * * * * * * *
2765 *
2766 *         setflg macro
2767 *
2768 * * * * * * * * * * * * * * * * * * * * *
2769           rem
2770 setflg    macro
2771           oct       777010
2772           pmc       save,off
2773           crsm      save,off
2774           ine       '#2','',%setok
2775           seterr    old_style_setflg_macro
2776           org       *-1
2777 setok     mark
2778           crsm      restore
2779 tfwrd1    set       0
2780 tfwrd2    set       0
2781           idrp      #1
2782           tsttib    #1
2783           idrp
2784           pmc       restore
2785           vfd       18/tfwrd1
2786           vfd       18/tfwrd2
2787           endm      setflg
2788           rem
2789 * * * * * * * * * * * * * * * * * * * * *
2790 *
2791 *         clrflg macro
2792 *
2793 * * * * * * * * * * * * * * * * * * * * *
2794           rem
2795 clrflg    macro
2796           oct       777011
2797           pmc       save,off
2798           crsm      save,off
2799           ine       '#2','',%clrok
2800           seterr    old_style_clrflg_macro
2801           org       *-1
2802 clrok     mark
2803           crsm      restore
2804 tfwrd1    set       0
2805 tfwrd2    set       0
2806           idrp      #1
2807           tsttib    #1
2808           idrp
2809           pmc       restore
2810           vfd       18/tfwrd1
2811           vfd       18/tfwrd2
2812           endm
2813           eject
2814 * * * * * * * * * * * * * * * * * * * * *
2815 *
2816 *         tstflg macro
2817 *
2818 * * * * * * * * * * * * * * * * * * * * *
2819           rem
2820 tstflg    macro
2821           oct       777012
2822           zero      #2
2823           pmc       save,off
2824           crsm      save,off
2825           ine       '#3','',%tstok
2826           seterr    old_style_tstflg_macro
2827           org       *-1
2828 tstok     mark
2829           crsm      restore
2830 tfwrd1    set       0
2831 tfwrd2    set       0
2832           idrp      #1
2833           tsttib    #1
2834           idrp
2835           pmc       restore
2836           vfd       18/tfwrd1
2837           vfd       18/tfwrd2
2838           endm      tstflg
2839           rem
2840 * * * * * * * * * * * * * * * * * * * * *
2841 *
2842 *         contrl macro
2843 *                             generates a dcwlst op
2844 *                             and 1 cmd sub-op
2845 *
2846 * * * * * * * * * * * * * * * * * * * * *
2847           rem
2848 contrl    macro
2849           dcwlst
2850           crsm      off
2851           cmd       #1,#2
2852           crsm      on
2853           endm      contrl
2854           rem
2855 * * * * * * * * * * * * * * * * * * * * *
2856 *
2857 *         dmpout macro
2858 *
2859 * * * * * * * * * * * * * * * * * * * * *
2860           rem
2861 dmpout    macro
2862           oct       777013
2863           endm      dmpout
2864           rem
2865 * * * * * * * * * * * * * * * * * * * * *
2866 *
2867 *         signal macro
2868 *
2869 * * * * * * * * * * * * * * * * * * * * *
2870           rem
2871 signal    macro
2872           oct       777014
2873           vfd       o18/#1
2874           endm      signal
2875           eject
2876 * * * * * * * * * * * * * * * * * * * * *
2877 *
2878 *         meter macro
2879 *
2880 * * * * * * * * * * * * * * * * * * * * *
2881           rem
2882 meter     macro
2883           oct       777015
2884           dec       #1
2885           endm      meter
2886           rem
2887 * * * * * * * * * * * * * * * * * * * * *
2888 *
2889 *         waitm macro
2890 *
2891 * * * * * * * * * * * * * * * * * * * * *
2892           rem
2893 waitm     macro
2894           oct       777016
2895           endm      waitm
2896           rem
2897 * * * * * * * * * * * * * * * * * * * * *
2898 *
2899 *         sendin macro
2900 *
2901 * * * * * * * * * * * * * * * * * * * * *
2902           rem
2903 sendin    macro
2904           oct       777017
2905           endm      sendin
2906           rem
2907 * * * * * * * * * * * * * * * * * * * * *
2908 *
2909 *         tstwrt macro
2910 *
2911 * * * * * * * * * * * * * * * * * * * * *
2912           rem
2913 tstwrt    macro
2914           oct       777020
2915           zero      #1
2916           endm      tstwrt
2917           eject
2918 * * * * * * * * * * * * * * * * * * * * *
2919 *
2920 *         tstglb  macro
2921 *
2922 * * * * * * * * * * * * * * * * * * * * *
2923           rem
2924 tstglb    macro
2925           oct       777021
2926           vfd       o18/#1
2927           zero      #2
2928           endm      tstglb
2929           rem
2930 * * * * * * * * * * * * * * * * * * * * *
2931 *
2932 *         stpchn macro
2933 *
2934 * * * * * * * * * * * * * * * * * * * * *
2935           rem
2936 stpchn    macro
2937           ine       stpchx,1,%stpbeg
2938 stpchx    set       1
2939           symref    stpchn
2940 stpbeg    mark
2941           calsub    stpchn
2942           endm      macro
2943           rem
2944 * * * * * * * * * * * * * * * * * * * * *
2945 *
2946 *         setype macro
2947 *
2948 * * * * * * * * * * * * * * * * * * * * *
2949           rem
2950 setype    macro
2951           oct       777022
2952           zero      #1
2953           endm      setype
2954           eject
2955 * * * * * * * * * * * * * * * * * * * * *
2956 *
2957 *         scntr macro
2958 *
2959 * * * * * * * * * * * * * * * * * * * * *
2960           rem
2961 scntr     macro
2962           oct       777023
2963           zero      #1
2964           endm      scntr
2965           rem
2966 * * * * * * * * * * * * * * * * * * * * *
2967 *
2968 *         acntr macro
2969 *
2970 * * * * * * * * * * * * * * * * * * * * *
2971           rem
2972 acntr     macro
2973           oct       777024
2974           zero      #1
2975           endm      acntr
2976           rem
2977 * * * * * * * * * * * * * * * * * * * * *
2978 *
2979 *         tcntr macro
2980 *
2981 * * * * * * * * * * * * * * * * * * * * *
2982           rem
2983 tcntr     macro
2984           oct       777025
2985           zero      #1
2986           zero      #2
2987           endm      tcntr
2988           eject
2989 * * * * * * * * * * * * * * * * * * * *
2990 *
2991 *         getext macro
2992 *
2993 * * * * * * * * * * * * * * * * * * * *
2994           rem
2995 getext    macro
2996           oct       777026
2997           ife       '#1','',1
2998           zero      tibxsz
2999           ine       '#1','',1
3000           zero      #1
3001           zero      #2
3002           endm      getext
3003           rem
3004 * * * * * * * * * * * * * * * * * * * *
3005 *
3006 *         retext macro
3007 *
3008 * * * * * * * * * * * * * * * * * * * *
3009           rem
3010 retext    macro
3011           oct       777027
3012           endm      retext
3013           rem
3014 * * * * * * * * * * * * * * * * * * * *
3015 *
3016 *         inscan macro
3017 *
3018 * * * * * * * * * * * * * * * * * * * *
3019           rem
3020 inscan    macro
3021           oct       777030
3022           zero      #1
3023           zero      #2
3024           endm      inscan
3025           rem
3026 * * * * * * * * * * * * * * * * * * * * * * *
3027 *
3028 *         outscn macro
3029 *
3030 * * * * * * * * * * * * * * * * * * * * * * *
3031           rem
3032 outscn    macro
3033           oct       777031
3034           zero      #1
3035           zero      #2
3036           endm      outscn
3037           eject
3038 * * * * * * * * * * * * * * * * * * * * * * *
3039 *
3040 *         bldmsg macro
3041 *
3042 * * * * * * * * * * * * * * * * * * * * * * *
3043           rem
3044 bldmsg    macro
3045           oct       777032
3046           zero      #1
3047           zero      #2
3048           endm      bldmsg
3049           rem
3050 * * * * * * * * * * * * * * * * * * * * * * *
3051 *
3052 *         dumpin macro
3053 *
3054 * * * * * * * * * * * * * * * * * * * * * * *
3055           rem
3056 dumpin    macro
3057           oct       777033
3058           endm      dumpin
3059           rem
3060 * * * * * * * * * * * * * * * * * * * * * * *
3061 *
3062 *         setchr macro
3063 *
3064 * * * * * * * * * * * * * * * * * * * * * * *
3065           rem
3066 setchr    macro
3067           oct       777034
3068           vfd       o9/#1,o9/#2
3069           endm      setchr
3070           rem
3071 * * * * * * * * * * * * * * * * * * * * * * *
3072 *
3073 *         cmpchr macro
3074 *
3075 * * * * * * * * * * * * * * * * * * * * * * *
3076           rem
3077 cmpchr    macro
3078           oct       777035
3079           vfd       o9/#1,o9/#2
3080           zero      #3
3081           endm      cmpchr
3082           eject
3083 * * * * * * * * * * * * * * * * * * * * * * *
3084 *
3085 *         calsub macro
3086 *
3087 * * * * * * * * * * * * * * * * * * * * * * *
3088           rem
3089 calsub    macro
3090           oct       777036
3091           zero      #1
3092           endm      calsub
3093           rem
3094 * * * * * * * * * * * * * * * * * * * * * * *
3095 *
3096 *         retsub macro
3097 *
3098 * * * * * * * * * * * * * * * * * * * * * * *
3099           rem
3100 retsub    macro
3101           oct       777037
3102           endm      retsub
3103           rem
3104 * * * * * * * * * * * * * * * * * * * * * * *
3105 *
3106 *         holdot macro
3107 *
3108 * * * * * * * * * * * * * * * * * * * * * * *
3109           rem
3110 holdot    macro
3111           oct       777040
3112           endm      holdot
3113 * * * * * * * * * * * * * * * * * * * * * * *
3114 *
3115 *         ifhsla macro
3116 *
3117 * * * * * * * * * * * * * * * * * * * * * * *
3118           rem
3119 ifhsla    macro
3120           oct       777041
3121           zero      #1
3122           endm      ifhsla
3123           eject
3124 * * * * * * * * * * * * * * * * * * * * * * *
3125 *
3126 *         config macro
3127 *
3128 * * * * * * * * * * * * * * * * * * * * * * *
3129           rem
3130 config    macro
3131           oct       777042
3132           endm      config
3133           rem
3134 * * * * * * * * * * * * * * * * * * * * * * *
3135 *
3136 *         smode     macro
3137 *
3138 * * * * * * * * * * * * * * * * * * * * * * *
3139           rem
3140 smode     macro
3141           vfd       o3/1,o15/#1
3142           endm      smode
3143           rem
3144 * * * * * * * * * * * * * * * * * * * * * * *
3145 *
3146 *         rmode     macro
3147 *
3148 * * * * * * * * * * * * * * * * * * * * * * *
3149           rem
3150 rmode     macro
3151           vfd       o3/2,o15/#1
3152           endm      rmode
3153           rem
3154 * * * * * * * * * * * * * * * * * * * * * * *
3155 *
3156 *         baud macro
3157 *
3158 * * * * * * * * * * * * * * * * * * * * * * *
3159           rem
3160 baud      macro
3161           vfd       o3/3,15/#1
3162           endm      baud
3163           eject
3164 * * * * * * * * * * * * * * * * * * * * * * *
3165 *
3166 *         ckinpt macro
3167 *
3168 * * * * * * * * * * * * * * * * * * * * * * *
3169           rem
3170 ckinpt    macro
3171           oct       777043
3172           zero      #1
3173           endm      ckinpt
3174           rem
3175 * * * * * * * * * * * * * * * * * * * * * * *
3176 *
3177 *         gtinpt macro
3178 *
3179 * * * * * * * * * * * * * * * * * * * * * * *
3180           rem
3181 gtinpt    macro
3182           oct       777044
3183           endm      gtinpt
3184           rem
3185 * * * * * * * * * * * * * * * * * * * * * * *
3186 *
3187 *         replay macro
3188 *
3189 * * * * * * * * * * * * * * * * * * * * * * *
3190           rem
3191 replay    macro
3192           oct       777045
3193           endm      replay
3194           rem
3195 * * * * * * * * * * * * * * * * * * * * * * *
3196 *
3197 *         dmprpy macro
3198 *
3199 * * * * * * * * * * * * * * * * * * * * * * *
3200           rem
3201 dmprpy    macro
3202           oct       777046
3203           endm      dmprpy
3204           eject
3205 * * * * * * * * * * * * * * * * * * * * * * *
3206 *
3207 *         prepnl macro
3208 *
3209 * * * * * * * * * * * * * * * * * * * * * * *
3210           rem
3211 prepnl    macro
3212           oct       777047
3213           endm      prepnl
3214           rem
3215 * * * * * * * * * * * * * * * * * * * * * * *
3216 *
3217 *         tstrpy macro
3218 *
3219 * * * * * * * * * * * * * * * * * * * * * * *
3220           rem
3221 tstrpy    macro
3222           oct       777050
3223           zero      #1
3224           rem
3225           endm      tstrpy
3226           rem
3227 * * * * * * * * * * * * * * * * * * * * * * *
3228 *
3229 *         echo macro
3230 *
3231 * * * * * * * * * * * * * * * * * * * * * * *
3232           rem
3233 echo      macro
3234           oct       777051
3235           zero      #1
3236           endm      echo
3237 * * * * * * * * * * * * * * * * * * * * * * *
3238 *
3239 *         setcct macro
3240 *
3241 * * * * * * * * * * * * * * * * * * * * * * *
3242           rem
3243 setcct    macro
3244           oct       777052
3245           zero      #1
3246           endm      setcct
3247           eject
3248 * * * * * * * * * * * * * * * * * * * * * * *
3249 *
3250 *         dmpmsg macro
3251 *
3252 * * * * * * * * * * * * * * * * * * * * * * *
3253           rem
3254 dmpmsg    macro
3255           oct       777053
3256           endm      dmpmsg
3257           rem
3258 * * * * * * * * * * * * * * * * * * * * * * *
3259 *
3260 *         setlcl macro
3261 *
3262 * * * * * * * * * * * * * * * * * * * * * * *
3263           rem
3264 setlcl    macro
3265           oct       777054
3266           vfd       18/#1
3267           vfd       18/#2
3268           endm      setlcl
3269           rem
3270 * * * * * * * * * * * * * * * * * * * * * * *
3271 *
3272 *         addlcl macro
3273 *
3274 * * * * * * * * * * * * * * * * * * * * * * *
3275           rem
3276 addlcl    macro
3277           oct       777055
3278           vfd       18/#1
3279           vfd       18/#2
3280           endm      addlcl
3281           rem
3282 * * * * * * * * * * * * * * * * * * * * * * *
3283 *
3284 *         tstlcl macro
3285 *
3286 * * * * * * * * * * * * * * * * * * * * * * *
3287           rem
3288 tstlcl    macro
3289           oct       777056
3290           vfd       18/#1
3291           vfd       18/#2
3292           zero      #3
3293           endm      tstlcl
3294           eject
3295 * * * * * * * * * * * * * * * * * * * * * * *
3296 *
3297 *         setlcf macro
3298 *
3299 * * * * * * * * * * * * * * * * * * * * * * *
3300           rem
3301 setlcf    macro
3302           oct       777057
3303           vfd       18/#1
3304           vfd       o18/#2
3305           endm      setlcf
3306           rem
3307 * * * * * * * * * * * * * * * * * * * * * * *
3308 *
3309 *         clrlcf macro
3310 *
3311 * * * * * * * * * * * * * * * * * * * * * * *
3312           rem
3313 clrlcf    macro
3314           oct       777060
3315           vfd       18/#1
3316           vfd       o18/#2
3317           endm      clrlcf
3318           rem
3319 * * * * * * * * * * * * * * * * * * * * * * *
3320 *
3321 *         tstlcf macro
3322 *
3323 * * * * * * * * * * * * * * * * * * * * * * *
3324           rem
3325 tstlcf    macro
3326           oct       777061
3327           vfd       18/#1
3328           vfd       o18/#2
3329           vfd       18/#3
3330           endm      tstlcf
3331           rem
3332 * * * * * * * * * * * * * * * * * * * * * * *
3333 *
3334 *         setlcv macro
3335 *
3336 * * * * * * * * * * * * * * * * * * * * * * *
3337           rem
3338 setlcv    macro
3339           oct       777062
3340           vfd       18/#1
3341           vfd       18/#2
3342           endm      setlcf
3343           eject
3344 * * * * * * * * * * * * * * * * * * * * * * *
3345 *
3346 *         calasm macro
3347 *
3348 * * * * * * * * * * * * * * * * * * * * * * *
3349           rem
3350 calasm    macro
3351           oct       777063
3352           vfd       18/#1
3353           crsm      save,off
3354           pmc       save,off
3355           ine       '#2','',%cala.y
3356           crsm      on
3357           pmc       restore
3358 #3        equ       *
3359           org       *+1
3360           pmc       save,off
3361 cala.x    set       0
3362           idrp      #2
3363           pmc       restore
3364           vfd       18/#2
3365           pmc       save,off
3366 cala.x    set       cala.x+1
3367           idrp
3368           pmc       restore
3369 #4        equ       *
3370           org       #3
3371           vfd       18/cala.x
3372           org       #4
3373           pmc       save,off
3374           ine       1,1,%cala.z
3375 cala.y    mark
3376           pmc       restore
3377           oct       0
3378           pmc       save,off
3379 cala.z    mark
3380           pmc       restore
3381           crsm      restore
3382           endm      calasm
3383           eject
3384 * * * * * * * * * * * * * * * * * * * * * * *
3385 *
3386 *         bkptop macro
3387 *
3388 * * * * * * * * * * * * * * * * * * * * * * *
3389           rem
3390 bkptop    macro     c,m
3391           oct       777064
3392           endm      bkptop
3393           rem
3394 * * * * * * * * * * * * * * * * * * * * * * *
3395 *
3396 *         linctl macro
3397 *
3398 * * * * * * * * * * * * * * * * * * * * * * *
3399           rem
3400 linctl    macro     c,m
3401           oct       777065
3402           vfd       18/#1
3403           vfd       18/#2
3404           endm      linctl
3405           rem
3406 * * * * * * * * * * * * * * * * * * * * * * *
3407 *
3408 *         linsta macro
3409 *
3410 * * * * * * * * * * * * * * * * * * * * * * *
3411           rem
3412 linsta    macro     c,m
3413           oct       777066
3414           vfd       18/#1
3415           endm      linsta
3416           rem
3417 * * * * * * * * * * * * * * * * * * * * * * *
3418 *
3419 *         tstlcv macro
3420 *
3421 * * * * * * * * * * * * * * * * * * * * * * *
3422           rem
3423 tstlcv    macro     c,m
3424           oct       777067
3425           vfd       18/#1
3426           vfd       18/#2
3427           vfd       18/#3
3428           endm      tstlcv
3429           rem
3430 * * * * * * * * * * * * * * * * * * * * * * *
3431 *
3432 *         nullop macro
3433 *
3434 * * * * * * * * * * * * * * * * * * * * * * *
3435           rem
3436 nullop    macro     c,m
3437           oct       777070
3438           endm      nullop
3439           rem
3440 * * * * * * * * * * * * * * * * * * * * * * *
3441 *
3442 *         unwind macro
3443 *
3444 * * * * * * * * * * * * * * * * * * * * * * *
3445           rem
3446 unwind    macro     c,m
3447           oct       777071
3448           endm      unwind
3449           rem
3450 * * * * * * * * * * * * * * * * * * * * * * *
3451 *
3452 *         setimv macro
3453 *
3454 * * * * * * * * * * * * * * * * * * * * * * *
3455           rem
3456 setimv    macro     c,m
3457           oct       777072
3458           vfd       o18/#1
3459           endm      setimv
3460           rem
3461 * * * * * * * * * * * * * * * * * * * * * * *
3462 *
3463 *         gotov macro
3464 *
3465 * * * * * * * * * * * * * * * * * * * * * * *
3466           rem
3467 gotov     macro     c,m
3468           oct       777074
3469           vfd       o18/#1
3470           endm      gotov
3471           rem
3472           rem
3473 * * * * * * * * * * * * * * * * * * * * * * *
3474 *
3475 *         gocase macro
3476 *
3477 * * * * * * * * * * * * * * * * * * * * * * *
3478           rem
3479 gocase    macro     c,m
3480           oct       777075
3481           vfd       o9/,o9/#1 value of tib ext
3482           vfd       18/#2
3483           vfd       18/#3
3484           endm      gocase
3485           rem
3486 * * * * * * * * * * * * * * * * * * * * * * *
3487 *
3488 *         setfld macro
3489 *
3490 * * * * * * * * * * * * * * * * * * * * * * *
3491           rem
3492 setfld    macro     c,m
3493           oct       777076
3494           ind       #1,1
3495           vfd       18/#2
3496           endm      setfld
3497           rem
3498 * * * * * * * * * * * * * * * * * * * * * * *
3499 *
3500 *         addfld macro
3501 *
3502 * * * * * * * * * * * * * * * * * * * * * * *
3503           rem
3504 addfld    macro     c,m
3505           oct       777077
3506           ind       #1,1
3507           vfd       18/#2
3508           endm      addfld
3509           rem
3510 * * * * * * * * * * * * * * * * * * * * * * *
3511 *
3512 *         tstfld macro
3513 *
3514 * * * * * * * * * * * * * * * * * * * * * * *
3515           rem
3516 tstfld    macro     c,m
3517           oct       777100
3518           ind       #1,1
3519           vfd       18/#2
3520           vfd       18/#3
3521           endm      tstfld
3522           rem
3523 * * * * * * * * * * * * * * * * * * * * * * *
3524 *
3525 *         meter1 macro (single-word increment)
3526 *
3527 * * * * * * * * * * * * * * * * * * * * * * *
3528           rem
3529 meter1    macro     c,m
3530           oct       777101
3531           zero      #1
3532           zero      #2
3533           endm      meter1
3534           rem
3535 * * * * * * * * * * * * * * * * * * * * * * *
3536 *
3537 *         meter2 macro (double-word increment)
3538 *
3539 * * * * * * * * * * * * * * * * * * * * * * *
3540           rem
3541 meter2    macro     c,m
3542           oct       777102
3543           zero      #1
3544           zero      #2
3545           endm      meter2
3546           rem
3547 * * * * * * * * * * * * * * * * * * * * * * *
3548 *
3549 *         meteru macro (update meter)
3550 *
3551 * * * * * * * * * * * * * * * * * * * * * * *
3552           rem
3553 meteru    macro     c,m
3554           oct       777103
3555           zero      #1
3556           zero      #2
3557           endm      meteru
3558           rem
3559 * * * * * * * * * * * * * * * * * * * * * * *
3560 *
3561 *         meterm macro (message meter)
3562 *
3563 * * * * * * * * * * * * * * * * * * * * * * *
3564           rem
3565 meterm    macro     c,m
3566           oct       777104
3567           zero      #1        0=input, 1=output
3568           endm      meterm
3569           rem
3570 * * * * * * * * * * * * * * * * * * * * * * *
3571 *
3572 *         bldims macro (build input message)
3573 *
3574 * * * * * * * * * * * * * * * * * * * * * * *
3575           rem
3576 bldims    macro
3577           oct       777105
3578           zero      #1
3579           zero      #2
3580           endm      bldims
3581           eject
3582 * * * * * * * * * * * * * * * * * * * * *
3583 *
3584 *         chstr macro
3585 *
3586 * * * * * * * * * * * * * * * * * * * * *
3587           rem
3588 chstr     macro
3589           pmc       save,off
3590 chk       set       0
3591           idrp      #1
3592           ife       chk,0,3
3593 chk       set       1
3594 chval     set       #1
3595           ife       1,2,2
3596 chk       set       0
3597           vfd       o9/chval,o9/#1
3598           idrp
3599           ife       chk,1,1
3600           vfd       o9/chval,o9/777
3601           ife       chk,0,1
3602           vfd       o9/777,o9/777
3603           pmc       restore
3604           endm      chstr
3605           rem
3606           rem
3607 * * * * * * * * * * * * * * * * * * * * * * *
3608 *
3609 *         adrlst macro
3610 *
3611 * * * * * * * * * * * * * * * * * * * * * * *
3612           rem
3613 adrlst    macro     c,m
3614           pmc       save,off
3615           idrp      #1
3616           vfd       18/#1
3617           idrp
3618           oct       777000
3619           pmc       restore
3620           endm      adrlst
3621           rem
3622           punm
3623           end                 1