1: /
   2: /
   3: 
   4: / a6 -- pdp-11 assembler pass 2
   5: 
   6: opline:
   7:         mov     r4,r0
   8:         jsr     r5,betwen; 0; 177
   9:                 br 2f
  10:         cmp     r4,$5
  11:         beq     opeof
  12:         cmp     r4,$'<
  13:         bne     xpr
  14:         jmp     opl17
  15: xxpr:
  16:         tst     (sp)+
  17: xpr:
  18:         jsr     pc,expres
  19:         jsr     pc,outw
  20:         rts     pc
  21: 2:
  22:         movb    (r4),r0
  23:         cmp     r0,$24          /reg
  24:         beq     xpr
  25:         cmp     r0,$33          /est text
  26:         beq     xpr
  27:         cmp     r0,$34          / est data
  28:         beq     xpr
  29:         jsr     r5,betwen; 5; 36
  30:                 br xpr
  31:         mov     2(r4),-(sp)
  32:         mov     r0,-(sp)
  33:         jsr     pc,readop
  34:         mov     (sp)+,r0
  35:         asl     r0
  36:         mov     $adrbuf,r5
  37:         clr     swapf
  38:         mov     $-1,rlimit
  39:         jmp     *1f-10.(r0)
  40: 
  41: 1:
  42:         opl5
  43:         opl6
  44:         opl7
  45:         opl10
  46:         opl11
  47:         opl12
  48:         opl13
  49:         opl14
  50:         opl15
  51:         opl16
  52:         opl17
  53:         opl20
  54:         opl21
  55:         opl22
  56:         opl23
  57:         xxpr
  58:         opl25
  59:         opl26
  60:         opl27
  61:         opl30
  62:         opl31
  63:         opl32
  64:         xxpr
  65:         xxpr
  66:         opl35
  67:         opl36
  68: 
  69: opeof:
  70:         mov     $1,line
  71:         mov     $20,-(sp)
  72:         mov     $argb,r1
  73: 1:
  74:         jsr     pc,getw
  75:         tst     r4
  76:         bmi     1f
  77:         movb    r4,(r1)+
  78:         dec     (sp)
  79:         bgt     1b
  80:         tstb    -(r1)
  81:         br      1b
  82: 1:
  83:         movb    $'\n,(r1)+
  84:         clrb    (r1)+
  85:         tst     (sp)+
  86:         rts     pc
  87: 
  88: opl30:  / mpy, dvd etc
  89:         inc     swapf
  90:         mov     $1000,rlimit
  91:         br      opl13
  92: 
  93: opl14:          / flop freg,fsrc
  94:         inc     swapf
  95: 
  96: opl5:           / flop src,freg
  97:         mov     $400,rlimit
  98: 
  99: /double
 100: opl13:
 101:         jsr     pc,addres
 102: op2a:
 103:         mov     r2,-(sp)
 104:         jsr     pc,readop
 105: op2b:
 106:         jsr     pc,addres
 107:         tst     swapf
 108:         beq     1f
 109:         mov     (sp),r0
 110:         mov     r2,(sp)
 111:         mov     r0,r2
 112: 1:
 113:         swab    (sp)
 114:         asr     (sp)
 115:         asr     (sp)
 116:         cmp     (sp),rlimit
 117:         blo     1f
 118:         jsr     r5,error; 'x
 119: 1:
 120:         bis     (sp)+,r2
 121:         bis     (sp)+,r2
 122:         clr     r3
 123:         jsr     pc,outw
 124:         mov     $adrbuf,r1
 125: 1:
 126:         cmp     r1,r5
 127:         bhis    1f
 128:         mov     (r1)+,r2
 129:         mov     (r1)+,r3
 130:         mov     (r1)+,xsymbol
 131:         jsr     pc,outw
 132:         br      1b
 133: 1:
 134:         rts     pc
 135: 
 136: opl15:          / single operand
 137:         clr     -(sp)
 138:         br      op2b
 139: 
 140: opl12:          / movf
 141:         mov     $400,rlimit
 142:         jsr     pc,addres
 143:         cmp     r2,$4           / see if source is fregister
 144:         blo     1f
 145:         inc     swapf
 146:         br      op2a
 147: 1:
 148:         mov     $174000,(sp)
 149:         br      op2a
 150: 
 151: / jbr
 152: opl35:
 153: / jeq, jne, etc
 154: opl36:
 155:         jsr     pc,expres
 156:         tstb    passno
 157:         bne     1f
 158:         mov     r2,r0
 159:         jsr     pc,setbr
 160:         tst     r2
 161:         beq     2f
 162:         cmp     (sp),$br
 163:         beq     2f
 164:         add     $2,r2
 165: 2:
 166:         add     r2,dot          / if doesn't fit
 167:         add     $2,dot
 168:         tst     (sp)+
 169:         rts     pc
 170: 1:
 171:         jsr     pc,getbr
 172:         bcc     dobranch
 173:         mov     (sp)+,r0
 174:         mov     r2,-(sp)
 175:         mov     r3,-(sp)
 176:         cmp     r0,$br
 177:         beq     2f
 178:         mov     $402,r2
 179:         xor     r0,r2           / flip cond, add ".+6"
 180:         mov     $1,r3
 181:         jsr     pc,outw
 182: 2:
 183:         mov     $1,r3
 184:         mov     $jmp+37,r2
 185:         jsr     pc,outw
 186:         mov     (sp)+,r3
 187:         mov     (sp)+,r2
 188:         jsr     pc,outw
 189:         rts     pc
 190: 
 191: /sob
 192: opl31:  / sob
 193:         jsr     pc,expres
 194:         jsr     pc,checkreg
 195:         swab    r2
 196:         asr     r2
 197:         asr     r2
 198:         bis     r2,(sp)
 199:         jsr     pc,readop
 200:         jsr     pc,expres
 201:         tstb    passno
 202:         beq     3f
 203:         sub     dot,r2
 204:         neg     r2
 205:         mov     r2,r0
 206:         jsr     r5,betwen; -2; 175
 207:                 br 2f
 208:         add     $4,r2
 209:         br      1f
 210: 
 211: /branch
 212: opl6:
 213:         jsr     pc,expres
 214:         tstb    passno
 215:         beq     3f
 216: dobranch:
 217:         sub     dot,r2
 218:         mov     r2,r0
 219:         jsr     r5,betwen; -254.; 256.
 220:                 br 2f
 221: 1:
 222:         bit     $1,r2
 223:         bne     2f
 224:         cmp     r3,dot-2        / same relocation as .
 225:         bne     2f
 226:         asr     r2
 227:         dec     r2
 228:         bic     $177400,r2
 229: 3:
 230:         bis     (sp)+,r2
 231:         clr     r3
 232:         jsr     pc,outw
 233:         rts     pc
 234: 2:
 235:         jsr     r5,error; 'b
 236:         clr     r2
 237:         br      3b
 238: 
 239: /jsr
 240: opl7:
 241:         jsr     pc,expres
 242:         jsr     pc,checkreg
 243:         jmp     op2a
 244: 
 245: / rts
 246: opl10:
 247:         jsr     pc,expres
 248:         jsr     pc,checkreg
 249:         br      1f
 250: 
 251: / sys, emt etc
 252: opl11:
 253:         jsr     pc,expres
 254:         cmp     r2,$64.
 255:         bhis    0f
 256:         cmp     r3,$1
 257:         ble     1f
 258: 0:
 259:         jsr     pc,errora
 260: 1:
 261:         bis     (sp)+,r2
 262:         jsr     pc,outw
 263:         rts     pc
 264: 
 265: / .byte
 266: opl16:
 267:         jsr     pc,expres
 268:         jsr     pc,outb
 269:         cmp     r4,$',
 270:         bne     1f
 271:         jsr     pc,readop
 272:         br      opl16
 273: 1:
 274:         tst     (sp)+
 275:         rts     pc
 276: 
 277: / < (.ascii)
 278: opl17:
 279:         jsr     pc,getw
 280:         mov     $1,r3
 281:         mov     r4,r2
 282:         bmi     2f
 283:         bic     $!377,r2
 284:         jsr     pc,outb
 285:         br      opl17
 286: 2:
 287:         jsr     pc,getw
 288:         rts     pc
 289: 
 290: /.even
 291: opl20:
 292:         bit     $1,dot
 293:         beq     1f
 294:         cmp     dot-2,$4
 295:         beq     2f              / bss mode
 296:         clr     r2
 297:         clr     r3
 298:         jsr     pc,outb
 299:         br      1f
 300: 2:
 301:         inc     dot
 302: 1:
 303:         tst     (sp)+
 304:         rts     pc
 305: opl21:  /if
 306:         jsr     pc,expres
 307: opl22:
 308: oplret:
 309:         tst     (sp)+
 310:         rts     pc
 311: 
 312: 
 313: /.globl
 314: opl23:
 315:         cmp     r4,$200
 316:         blo     1f
 317:         bisb    $40,(r4)
 318:         jsr     pc,readop
 319:         cmp     r4,$',
 320:         bne     1f
 321:         jsr     pc,readop
 322:         br      opl23
 323: 1:
 324:         tst     (sp)+
 325:         rts     pc
 326: 
 327: / .text, .data, .bss
 328: opl25:
 329: opl26:
 330: opl27:
 331:         inc     dot
 332:         bic     $1,dot
 333:         mov     r0,-(sp)
 334:         mov     dot-2,r1
 335:         asl     r1
 336:         mov     dot,savdot-4(r1)
 337:         tstb    passno
 338:         beq     1f
 339:         jsr     r5,flush; txtp
 340:         jsr     r5,flush; relp
 341:         mov     (sp),r2
 342:         add     $txtseek-[2*25],r2
 343:         mov     r2,tseekp
 344:         mov     (r2),r0
 345:         jsr     r5,oset; txtp
 346:         add     $trelseek-txtseek,r2
 347:         mov     (r2),r0
 348:         mov     r2,rseekp
 349:         jsr     r5,oset; relp
 350: 1:
 351:         mov     (sp)+,r0
 352:         mov     savdot-[2*25](r0),dot
 353:         asr     r0
 354:         sub     $25-2,r0
 355:         mov     r0,dot-2        / new . relocation
 356:         tst     (sp)+
 357:         rts     pc
 358: 
 359: opl32:
 360:         cmp     r4,$200
 361:         blo     1f
 362:         mov     r4,-(sp)
 363:         jsr     pc,readop
 364:         jsr     pc,readop
 365:         jsr     pc,expres
 366:         mov     (sp)+,r0
 367:         bit     $37,(r0)
 368:         bne     1f
 369:         bis     $40,(r0)
 370:         mov     r2,2(r0)
 371: 1:
 372:         tst     (sp)+
 373:         rts     pc
 374: 
 375: addres:
 376:         clr     -(sp)
 377: 4:
 378:         cmp     r4,$'(
 379:         beq     alp
 380:         cmp     r4,$'-
 381:         beq     amin
 382:         cmp     r4,$'$
 383:         beq     adoll
 384:         cmp     r4,$'*
 385:         bne     getx
 386:         jmp     astar
 387: getx:
 388:         jsr     pc,expres
 389:         cmp     r4,$'(
 390:         bne     2f
 391:         jsr     pc,readop
 392:         mov     r2,(r5)+
 393:         mov     r3,(r5)+
 394:         mov     xsymbol,(r5)+
 395:         jsr     pc,expres
 396:         jsr     pc,checkreg
 397:         jsr     pc,checkrp
 398:         bis     $60,r2
 399:         bis     (sp)+,r2
 400:         rts     pc
 401: 
 402: 2:
 403:         cmp     r3,$24
 404:         bne     1f
 405:         jsr     pc,checkreg
 406:         bis     (sp)+,r2
 407:         rts     pc
 408: 1:
 409:         mov     r3,-(sp)
 410:         bic     $40,r3
 411:         mov     (sp)+,r3
 412:         bis     $100000,r3
 413:         sub     dot,r2
 414:         sub     $4,r2
 415:         cmp     r5,$adrbuf
 416:         beq     1f
 417:         sub     $2,r2
 418: 1:
 419:         mov     r2,(r5)+                / index
 420:         mov     r3,(r5)+                / index reloc.
 421:         mov     xsymbol,(r5)+           / index global
 422:         mov     $67,r2                  / address mode
 423:         bis     (sp)+,r2
 424:         rts     pc
 425: 
 426: alp:
 427:         jsr     pc,readop
 428:         jsr     pc,expres
 429:         jsr     pc,checkrp
 430:         jsr     pc,checkreg
 431:         cmp     r4,$'+
 432:         beq     1f
 433:         tst     (sp)+
 434:         beq     2f
 435:         bis     $70,r2
 436:         clr     (r5)+
 437:         clr     (r5)+
 438:         mov     xsymbol,(r5)+
 439:         rts     pc
 440: 2:
 441:         bis     $10,r2
 442:         rts     pc
 443: 1:
 444:         jsr     pc,readop
 445:         bis     $20,r2
 446:         bis     (sp)+,r2
 447:         rts     pc
 448: 
 449: amin:
 450:         jsr     pc,readop
 451:         cmp     r4,$'(
 452:         beq     1f
 453:         mov     r4,savop
 454:         mov     $'-,r4
 455:         br      getx
 456: 1:
 457:         jsr     pc,readop
 458:         jsr     pc,expres
 459:         jsr     pc,checkrp
 460:         jsr     pc,checkreg
 461:         bis     (sp)+,r2
 462:         bis     $40,r2
 463:         rts     pc
 464: 
 465: adoll:
 466:         jsr     pc,readop
 467:         jsr     pc,expres
 468:         mov     r2,(r5)+
 469:         mov     r3,(r5)+
 470:         mov     xsymbol,(r5)+
 471:         mov     (sp)+,r2
 472:         bis     $27,r2
 473:         rts     pc
 474: 
 475: astar:
 476:         tst     (sp)
 477:         beq     1f
 478:         jsr     r5,error; '*
 479: 1:
 480:         mov     $10,(sp)
 481:         jsr     pc,readop
 482:         jmp     4b
 483: 
 484: errora:
 485:         jsr     r5,error; 'a
 486:         rts     pc
 487: 
 488: checkreg:
 489:         cmp     r2,$7
 490:         bhi     1f
 491:         cmp     r1,$1
 492:         blos    2f
 493:         cmp     r3,$5
 494:         blo     1f
 495: 2:
 496:         rts     pc
 497: 1:
 498:         jsr     pc,errora
 499:         clr     r2
 500:         clr     r3
 501:         rts     pc
 502: 
 503: errore:
 504:         jsr     r5,error; 'e
 505:         rts     pc
 506: 
 507: checkrp:
 508:         cmp     r4,$')
 509:         beq     1f
 510:         jsr     r5,error; ')
 511:         rts     pc
 512: 1:
 513:         jsr     pc,readop
 514:         rts     pc
 515: 
 516: setbr:
 517:         mov     brtabp,r1
 518:         cmp     r1,$brlen
 519:         blt     1f
 520:         mov     $2,r2
 521:         rts     pc
 522: 1:
 523:         inc     brtabp
 524:         clr     -(sp)
 525:         sub     dot,r0
 526:         ble     1f
 527:         sub     brdelt,r0
 528: 1:
 529:         jsr     r5,betwen; -254.; 256.
 530:                 br 1f
 531:         br      2f
 532: 1:
 533:         mov     r1,-(sp)
 534:         bic     $!7,(sp)
 535:         mov     $1,r0
 536:         ash     (sp)+,r0
 537:         ash     $-3,r1
 538:         bisb    r0,brtab(r1)
 539:         mov     $2,(sp)
 540: 2:
 541:         mov     (sp)+,r2
 542:         rts     pc
 543: 
 544: getbr:
 545:         mov     brtabp,r1
 546:         cmp     r1,$brlen
 547:         blt     1f
 548:         sec
 549:         rts     pc
 550: 1:
 551:         mov     r1,-(sp)
 552:         bic     $!7,(sp)
 553:         neg     (sp)
 554:         inc     brtabp
 555:         ash     $-3,r1
 556:         movb    brtab(r1),r1
 557:         ash     (sp)+,r1
 558:         ror     r1              / 0-bit into c-bit
 559:         rts     pc

Defined functions

addres defined in line 375; used 3 times
adoll defined in line 465; used 1 times
alp defined in line 426; used 1 times
amin defined in line 449; used 1 times
astar defined in line 475; used 1 times
checkreg defined in line 488; used 7 times
checkrp defined in line 507; used 3 times
dobranch defined in line 216; used 1 times
errora defined in line 484; used 2 times
errore defined in line 503; never used
getbr defined in line 544; used 1 times
getx defined in line 387; used 2 times
op2a defined in line 102; used 3 times
op2b defined in line 105; used 1 times
opeof defined in line 69; used 1 times
  • in line 11
opl10 defined in line 246; used 1 times
  • in line 45
opl11 defined in line 252; used 1 times
  • in line 46
opl12 defined in line 140; used 1 times
  • in line 47
opl13 defined in line 100; used 2 times
opl14 defined in line 93; used 1 times
  • in line 49
opl15 defined in line 136; used 1 times
  • in line 50
opl16 defined in line 266; used 2 times
opl17 defined in line 278; used 3 times
opl20 defined in line 291; used 1 times
  • in line 53
opl21 defined in line 305; used 1 times
  • in line 54
opl22 defined in line 307; used 1 times
  • in line 55
opl23 defined in line 314; used 2 times
opl25 defined in line 328; used 1 times
  • in line 58
opl26 defined in line 329; used 1 times
  • in line 59
opl27 defined in line 330; used 1 times
  • in line 60
opl30 defined in line 88; used 1 times
  • in line 61
opl31 defined in line 192; used 1 times
  • in line 62
opl32 defined in line 359; used 1 times
  • in line 63
opl35 defined in line 152; used 1 times
  • in line 66
opl36 defined in line 154; used 1 times
  • in line 67
opl5 defined in line 96; used 1 times
  • in line 42
opl6 defined in line 212; used 1 times
  • in line 43
opl7 defined in line 240; used 1 times
  • in line 44
opline defined in line 6; never used
oplret defined in line 308; never used
setbr defined in line 516; used 1 times
xpr defined in line 17; used 5 times
xxpr defined in line 15; used 3 times
Last modified: 1975-07-17
Generated: 2016-12-26
Generated by src2html V0.67
page hit count: 914
Valid CSS Valid XHTML 1.0 Strict