1: /
   2: /
   3: 
   4: / nroff2
   5: 
   6: casead:
   7:         inc     ad
   8:         jsr     pc,skipcont
   9:         tst     nlflg
  10:         bne     1f
  11:         jsr     pc,getchar
  12:         cmp     r0,$'r  /right adj, left ragged
  13:         bne     0f
  14:         mov     $2,jfomod
  15:         br      1f
  16: 0:
  17:         cmp     r0,$'l  /left adj, right ragged
  18:         bne     0f
  19:         clr     jfomod
  20:         clr     ad
  21:         br      1f
  22: 0:
  23:         cmp     r0,$'c  /centered adj
  24:         bne     0f
  25:         mov     $1,jfomod
  26:         br      1f
  27: 0:
  28:         clr     jfomod  /left and right adj
  29:         inc     ad
  30: 1:
  31:         rts     pc
  32: 
  33: casebr:
  34:         jsr     pc,rbreak
  35:         rts     pc
  36: 
  37: casecc:
  38:         clr     -(sp)
  39:         br      0f
  40: casec2:
  41:         mov     pc,-(sp)
  42: 0:
  43:         jsr     pc,skipcont
  44:         jsr     pc,getchar
  45:         cmp     r0,$'\n
  46:         beq     2f
  47:         tst     (sp)
  48:         bne     1f
  49:         mov     r0,cc
  50:         br      2f
  51: 1:
  52:         mov     r0,c2
  53: 2:
  54:         mov     r0,ch
  55:         tst     (sp)+
  56:         rts     pc
  57: 
  58: casece:
  59:         jsr     r5,number; 0
  60:         jsr     pc,min
  61:         mov     r0,-(sp)
  62:         jsr     pc,rbreak
  63:         mov     (sp)+,ce
  64:         rts     pc
  65: 
  66: casefi:
  67:         jsr     pc,rbreak
  68:         inc     fi
  69:         rts     pc
  70: 
  71: casein:
  72:         jsr     pc,skipcont
  73:         tst     nlflg
  74:         beq     1f
  75:         mov     in1,r0
  76:         br      2f
  77: 1:
  78:         jsr     r5,number1; in
  79:         jsr     pc,min
  80: 2:
  81:         mov     r0,-(sp)
  82:         jsr     pc,rbreak
  83:         mov     in,in1
  84:         mov     (sp)+,in
  85:         tst     nc
  86:         bne     1f
  87:         mov     in,un
  88:         jsr     pc,setnel
  89: 1:
  90:         rts     pc
  91: 
  92: caseli:
  93:         jsr     r5,number; 0
  94:         jsr     pc,min
  95:         mov     r0,lit
  96:         mov     frame,litlev
  97:         cmp     nl,$-1
  98:         bne     0f
  99:         jsr     pc,newln1
 100: 0:
 101:         rts     pc
 102: 
 103: casell:
 104:         jsr     pc,skipcont
 105:         tst     nlflg
 106:         beq     1f
 107:         mov     ll1,r0
 108:         br      2f
 109: 1:
 110:         jsr     r5,number1; ll
 111:         jsr     pc,min
 112: 2:
 113:         mov     ll,ll1
 114:         mov     r0,ll
 115: 2:
 116:         jsr     pc,setnel
 117:         rts     pc
 118: 
 119: casels:
 120:         jsr     pc,skipcont
 121:         tst     nlflg
 122:         beq     1f
 123:         mov     ls1,r0
 124:         br      2f
 125: 1:
 126:         jsr     r5,number1; ls
 127:         dec     r0
 128:         jsr     pc,min
 129:         inc     r0
 130: 2:
 131:         mov     r0,-(sp)
 132: /	jsr	pc,rbreak
 133:         mov     ls,ls1
 134:         mov     (sp)+,ls
 135:         rts     pc
 136: 
 137: casens:
 138:         inc     nls
 139:         rts     pc
 140: 
 141: casers:
 142:         clr     nls
 143:         rts     pc
 144: 
 145: casena:
 146:         clr     ad
 147:         rts     pc
 148: 
 149: casene:
 150:         jsr     r5,number; 0
 151:         jsr     pc,min
 152:         jsr     pc,need2
 153:         rts     pc
 154: 
 155: casenf:
 156:         jsr     pc,rbreak
 157:         clr     fi
 158:         rts     pc
 159: 
 160: casepn:
 161:         jsr     pc,skipcont
 162:         bne     1f
 163:         jsr     r5,number1; pn
 164:         jsr     pc,min
 165:         mov     r0,npn
 166: 1:
 167:         rts     pc
 168: casebp:
 169:         mov     ilistp,-(sp)
 170:         clr     -(sp)
 171:         jsr     pc,skipcont
 172:         bne     1f
 173:         jsr     r5,number1; pn
 174:         jsr     pc,min
 175:         mov     r0,(sp)
 176: 1:
 177:         jsr     pc,rbreak
 178:         mov     (sp)+,r0
 179:         beq     0f
 180:         mov     r0,npn
 181: 0:
 182:         bne     2f
 183:         tst     nls
 184:         bne     3f
 185: 2:
 186:         mov     (sp),r0
 187:         jsr     pc,eject
 188: 3:
 189:         tst     (sp)+
 190:         rts     pc
 191: 
 192: casepl:
 193:         jsr     pc,skipcont
 194:         tst     nlflg
 195:         bne     1f
 196:         jsr     r5,number1; pl
 197:         mov     r0,pl
 198:         rts     pc
 199: 1:
 200:         mov     $66.,pl
 201:         rts     pc
 202: 
 203: casesp:
 204:         mov     pc,-(sp)
 205:         br      0f
 206: casesp1:
 207:         clr     -(sp)
 208: 0:
 209:         mov     r0,-(sp)
 210:         tst     nb
 211:         bne     0f
 212:         jsr     pc,rbreak
 213: 0:
 214:         tst     nls
 215:         bne     2f
 216:         clr     r0
 217:         jsr     pc,findt
 218:         tst     nb
 219:         bne     1f
 220:         tst     trap
 221:         bne     2f
 222: 1:
 223:         tst     2(sp)
 224:         beq     1f
 225:         jsr     r5,number;0
 226:         mov     r0,(sp)
 227: 1:
 228:         cmp     r1,(sp)
 229:         bge     1f
 230:         mov     r1,(sp)
 231: 1:
 232:         mov     (sp),r0
 233:         ble     3f
 234:         jsr     r5,nlines; newline
 235: 2:
 236:         cmp     (sp)+,(sp)+
 237:         rts     pc
 238: 3:
 239:         add     nl,r0
 240:         cmp     (sp)+,(sp)+
 241:         br      casert1
 242: 
 243: casert:
 244:         mov     markline,r2
 245:         jsr     pc,skipcont
 246:         bne     0f
 247:         jsr     r5,number1;nl
 248: casert1:
 249:         mov     r0,r2
 250: 0:
 251:         tst     r2
 252:         blt     2f
 253:         cmp     r2,nl
 254:         bge     2f
 255:         mov     nl,r1
 256:         mov     r2,nl
 257:         sub     r2,r1
 258:         mov     r1,r2
 259: 1:
 260:         mov     $036,r0
 261:         jsr     pc,putchar
 262:         dec     r2
 263:         bgt     1b
 264:         mov     $015,r0
 265:         jsr     pc,putchar
 266: 2:
 267:         rts     pc
 268: 
 269: casesv:
 270:         clr     r0
 271:         jsr     pc,findt
 272:         jsr     r5,number; 0
 273:         cmp     r1,r0
 274:         bge     1f
 275:         mov     r0,sv
 276:         rts     pc
 277: 1:
 278:         jsr     r5,nlines; newline
 279:         rts     pc
 280: 
 281: caseos:
 282:         tst     sv
 283:         beq     2f
 284:         clr     r0
 285:         jsr     pc,findt
 286:         cmp     r1,sv
 287:         bge     1f
 288:         rts     pc
 289: 1:
 290:         mov     sv,r0
 291:         clr     sv
 292:         jsr     r5,nlines; newline
 293: 2:
 294:         rts     pc
 295: 
 296: casetr:
 297:         jsr     pc,skipcont
 298: 1:
 299:         jsr     pc,getchar
 300:         cmp     r0,$'\n
 301:         beq     1f
 302:         mov     r0,r1
 303:         jsr     pc,getchar
 304:         cmp     r0,$'\n
 305:         bne     2f
 306:         mov     $' ,r0
 307: 2:
 308:         movb    r0,trtab(r1)
 309:         br      1b
 310: 1:
 311:         rts     pc
 312: 
 313: caseta:
 314:         clr     -(sp)
 315:         mov     $tabtab,r1
 316: 1:
 317:         jsr     pc,getchar
 318:         tst     nlflg
 319:         bne     1f
 320:         cmpb    r0,$'+
 321:         bne     0f
 322:         inc     (sp)
 323:         br      2f
 324: 0:
 325:         cmpb    r0,$'-
 326:         beq     2f
 327:         cmpb    r0,$'0
 328:         blo     1b
 329:         cmpb    r0,$'9
 330:         bhi     1b
 331: 2:
 332:         mov     r0,ch
 333:         jsr     pc,atoi
 334:         beq     1f
 335:         jsr     pc,min
 336:         dec     r0
 337:         ble     1f
 338:         cmp     r1,$tabtab
 339:         beq     0f
 340:         tst     (sp)
 341:         bne     3f
 342:         cmp     r0,-2(r1)
 343:         bgt     0f
 344: 3:
 345:         add     -2(r1),r0
 346: 0:
 347:         clr     (sp)
 348:         mov     r0,(r1)+
 349:         cmp     r1,$etabtab
 350:         blo     1b
 351:         tst     -(r1)
 352: 1:
 353:         tst     (sp)+
 354:         clr     (r1)
 355:         rts     pc
 356: 
 357: caseti:
 358:         jsr     r5,number; in
 359:         jsr     pc,min
 360:         mov     r0,-(sp)
 361:         jsr     pc,rbreak
 362:         mov     (sp)+,un1
 363:         jsr     pc,setnel
 364:         rts     pc
 365: 
 366: caseul:
 367:         jsr     r5,number; 0
 368:         jsr     pc,min
 369:         mov     r0,ul
 370:         rts     pc
 371: 
 372: casetl:
 373:         jsr     pc,header
 374:         rts     pc
 375: 
 376: caselt:
 377:         jsr     pc,skipcont
 378:         tst     nlflg
 379:         beq     1f
 380:         mov     llh1,r0
 381:         br      2f
 382: 1:
 383:         jsr     r5,number1; llh
 384:         jsr     pc,min
 385: 2:
 386:         mov     llh,llh1
 387:         mov     r0,llh
 388:         rts     pc
 389: 
 390: 
 391: casehc:
 392:         jsr     pc,skipcont
 393:         jsr     pc,getchar
 394:         cmp     r0,$'\n
 395:         bne     1f
 396:         movb    $200,r0
 397: 1:
 398:         mov     r0,ohc
 399:         rts     pc
 400: 
 401: casetc:
 402:         jsr     pc,skipcont
 403:         jsr     pc,getchar
 404:         cmp     r0,$'\n
 405:         bne     1f
 406:         mov     $014,r0
 407: 1:
 408:         mov     r0,tabc
 409:         rts     pc
 410: 
 411: caselc:
 412:         jsr     pc,skipcont
 413:         jsr     pc,getchar
 414:         cmp     r0,$'\n
 415:         bne     1f
 416:         mov     $'.,r0
 417: 1:
 418:         mov     r0,dotc
 419:         rts     pc
 420: 
 421: casenc:
 422:         jsr     pc,skipcont
 423:         jsr     pc,getchar
 424:         cmp     r0,$'\n
 425:         bne     1f
 426:         mov     $034,r0
 427: 1:
 428:         mov     r0,numc
 429:         rts     pc
 430: 
 431: casehy:
 432:         mov     $1,hyf
 433:         jsr     pc,skipcont
 434:         bne     1f
 435:         jsr     pc,atoi
 436:         beq     1f
 437:         jsr     pc,min
 438:         mov     r0,hyf
 439: 1:
 440:         rts     pc
 441: 
 442: casenh:
 443:         clr     hyf
 444:         rts     pc
 445: 
 446: casenp:
 447:         jsr     pc,skipcont
 448:         tst     nlflg
 449:         beq     2f
 450:         clr     ni
 451:         mov     $1,nms
 452:         mov     $1,ndf
 453:         rts     pc
 454: casenm:
 455:         clr     numbmod
 456:         clr     nn
 457:         jsr     pc,skipcont
 458:         tst     nlflg
 459:         beq     1f
 460:         rts     pc
 461: 1:
 462:         inc     numbmod
 463:         jsr     r5,number1; lnumber
 464:         jsr     pc,min
 465:         mov     r0,lnumber
 466:         jsr     pc,skipcont
 467: 2:
 468:         jsr     r5,3f; ndf
 469:         tst     ndf
 470:         bne     1f
 471:         inc     ndf
 472: 1:
 473:         jsr     pc,skipcont
 474:         jsr     r5,3f; nms
 475:         jsr     pc,skipcont
 476:         jsr     r5,3f; ni
 477:         rts     pc
 478: 3:
 479:         tst     nlflg
 480:         bne     4f
 481:         jsr     pc,atoi
 482:         beq     4f
 483:         jsr     pc,min
 484:         mov     r0,*(r5)
 485: 4:
 486:         tst     (r5)+
 487:         rts     r5
 488: 
 489: casenn:
 490:         jsr     r5,number; 0
 491:         jsr     pc,min
 492:         mov     r0,nn
 493:         rts     pc
 494: 
 495: casear:
 496:         clr     ro
 497:         rts     pc
 498: 
 499: caseroc:
 500:         mov     $2,ro
 501:         rts     pc
 502: casero:
 503:         mov     $1,ro
 504:         rts     pc
 505: 
 506: casenx:
 507:         jsr     pc,skipcont
 508:         jsr     r5,getname; nextf
 509:         inc     nx
 510:         jsr     pc,nextfile
 511:         inc     nlflg
 512:         clr     ip
 513:         clr     ap
 514:         clr     nspace
 515:         clr     pendt
 516:         mov     $ilist,ilistp
 517:         rts     pc
 518: 
 519: casepo:
 520:         jsr     pc,skipcont
 521:         tst     nlflg
 522:         beq     1f
 523:         mov     po1,r0
 524:         br      2f
 525: 1:
 526:         jsr     r5,number1; po
 527:         jsr     pc,min
 528: 2:
 529:         mov     r0,-(sp)
 530: /	jsr	pc,rbreak
 531:         mov     po,po1
 532:         mov     (sp)+,po
 533:         rts     pc
 534: 
 535: caseig:
 536:         inc     skp
 537:         jsr     pc,copyb
 538:         rts     pc
 539: 
 540: casern:
 541: /	inc	lgf
 542:         jsr     pc,skipcont
 543:         jsr     r5,getname;bname
 544:         beq     2f
 545:         jsr     pc,findmn
 546:         beq     2f
 547:         mov     oldptr,-(sp)
 548: /	inc	lgf
 549:         jsr     pc,skipcont
 550:         jsr     r5,getname;bname
 551:         beq     1f
 552:         jsr     pc,findmn
 553:         jsr     pc,clrold
 554:         mov     (sp),r1
 555:         tst     -(r1)
 556:         mov     (r1),(sp)
 557:         bic     $77777,(sp)
 558:         mov     bname,(r1)
 559:         bis     (sp),(r1)
 560: 1:
 561:         tst     (sp)+
 562: 2:
 563:         rts     pc
 564: 
 565: caserm:
 566: /	inc	lgf
 567:         jsr     pc,skipcont
 568:         jsr     r5,getname;bname
 569:         beq     1f
 570:         jsr     pc,findmn
 571:         jsr     pc,clrold
 572: 1:
 573:         rts     pc
 574: 
 575: caseas:
 576:         inc     app
 577: caseds:
 578:         inc     ds
 579:         br      casede
 580: caseam:
 581:         inc     app
 582: casede:
 583:         tst     op
 584:         beq     1f
 585:         jsr     pc,wbfl
 586: 1:
 587: /	inc	lgf
 588:         jsr     pc,skipcont
 589:         jsr     r5,getname; bname
 590:         bne     1f
 591:         clr     r1
 592:         br      6f
 593: 1:
 594:         clr     skp
 595:         jsr     pc,finds
 596:         beq     7f
 597:         tst     ds
 598:         beq     0f
 599:         tst     skp
 600:         bne     5f
 601:         jsr     pc,copys
 602:         br      5f
 603: 0:
 604:         jsr     pc,copyb
 605: 5:
 606:         jsr     pc,wbfl
 607:         jsr     pc,clrold
 608:         tst     newptr
 609:         beq     0f
 610:         bis     $100000,bname
 611:         mov     bname,*newptr
 612: 0:
 613:         mov     r1,-(sp)
 614:         mov     apptr,r1
 615:         beq     0f
 616:         mov     $004,r0
 617:         jsr     pc,wbt
 618: 0:
 619:         mov     (sp)+,r1
 620: 6:
 621:         clr     app
 622:         clr     ds
 623:         rts     pc
 624: 7:
 625:         tst     macerr
 626:         bne     0f
 627:         jsr     r5,stringfl; 8f
 628: 0:
 629:         inc     macerr
 630:         cmp     macerr,$1
 631:         jeq     edone
 632:         jmp     done2
 633: /	br	6b
 634: 8: <Too many string/macro names.\n\0>
 635:         .even
 636: 
 637: findmn:
 638:         mov     $contab,r1
 639: 1:
 640:         mov     (r1)+,r0
 641:         bic     $100000,r0
 642:         cmp     bname,r0
 643:         beq     2f
 644:         cmp     (r1)+,$-1
 645:         bne     1b
 646:         clr     r1
 647: 2:
 648:         mov     r1,oldptr
 649:         rts     pc
 650: 
 651: finds:
 652:         jsr     pc,findmn
 653:         clr     newptr
 654:         clr     apptr
 655:         clr     aplnk
 656:         tst     app
 657:         beq     0f
 658:         tst     oldptr
 659:         bne     5f
 660: 0:
 661:         mov     $contab,r1
 662: 1:
 663:         tst     (r1)+
 664:         beq     2f
 665:         cmp     (r1)+,$-1
 666:         bne     1b
 667: 1:
 668:         inc     skp
 669:         clr     r1
 670:         rts     pc
 671: 2:
 672:         jsr     pc,alloc
 673:         beq     1b
 674:         tst     oldptr
 675:         bne     3f
 676: 4:
 677:         tst     -(r1)
 678:         bis     $100000,bname
 679:         mov     bname,(r1)+
 680:         mov     nextb,(r1)
 681:         br      6f
 682: 3:
 683:         tst     diflg
 684:         bne     4b
 685:         mov     nextb,(r1)
 686:         tst     -(r1)
 687:         mov     r1,newptr
 688:         br      6f
 689: 5:
 690:         tst     -(r1)
 691:         bmi     1f
 692:         clr     app
 693:         br      0b
 694: 1:
 695:         tst     (r1)+
 696:         clr     oldptr
 697:         mov     ip,-(sp)
 698:         mov     (r1),ip
 699: 1:
 700:         jsr     pc,rbf
 701:         tst     r0
 702:         bne     1b
 703:         mov     ip,r1
 704:         mov     r1,apptr
 705:         tst     diflg
 706:         bne     0f
 707:         jsr     pc,incoff
 708: 0:
 709:         mov     r1,nextb
 710:         mov     (sp)+,ip
 711: 6:
 712:         clr     app
 713:         mov     nextb,r1
 714:         rts     pc
 715: 
 716: clrold:
 717:         mov     oldptr,r0
 718:         beq     1f
 719:         mov     (r0),-(sp)
 720:         clr     (r0)
 721:         tst     -(r0)
 722:         bmi     0f
 723:         clr     (sp)
 724: 0:
 725:         clr     (r0)
 726:         mov     (sp)+,r0
 727:         beq     1f
 728:         jsr     pc,free
 729: 1:
 730:         rts     pc
 731: 
 732: caseda:
 733:         inc     app
 734: casedi:
 735: /	inc	lgf
 736:         clr     ditf
 737:         jsr     pc,skipcont
 738:         jsr     r5,getname; bname
 739:         beq     1f
 740:         tst     op
 741:         bne     3f
 742:         inc     diflg
 743:         jsr     pc,finds
 744:         beq     3f
 745:         mov     r1,op
 746:         jsr     pc,clrold
 747: /	mov	blss,sblss
 748: /	mov	alss,salss
 749: /	clr	blss
 750: /	clr	alss
 751:         clr     dnl
 752:         br      3f
 753: 1:
 754:         tst     op
 755:         beq     3f
 756:         clr     r0
 757:         jsr     pc,pchar1
 758:         jsr     pc,wbfl
 759: /	mov	sblss,blss
 760: /	mov	salss,alss
 761:         clr     op
 762: 3:
 763:         clr     app
 764:         clr     diflg
 765:         rts     pc
 766: 
 767: caseev:
 768:         jsr     pc,skipcont
 769:         tst     nlflg
 770:         beq     2f
 771:         cmp     evp,$elist
 772:         ble     5f
 773: 1:
 774:         sub     $2,evp
 775:         mov     *evp,-(sp)
 776:         br      3f
 777: 2:
 778:         jsr     pc,atoi
 779:         beq     6f
 780:         cmp     r0,nev
 781:         bgt     6f
 782:         tst     r0
 783:         blt     6f
 784:         cmp     evp,$eliste
 785:         bgt     6f
 786:         mov     r0,-(sp)
 787:         mov     ev,*evp
 788:         add     $2,evp
 789: 3:
 790:         cmp     (sp),ev
 791:         beq     4f
 792:         mov     $1024.,r3
 793:         mpy     ev,r3
 794:         mov     r3,8f
 795:         mov     $1024.,r3
 796:         mpy     (sp),r3
 797:         mov     r3,9f
 798:         mov     ibf,r0
 799:         sys     0;7f
 800: .data
 801: 7:      sys     seek; 8:.. ; 0
 802: .text
 803:         mov     ibf,r0
 804:         sys     write; block; 1024.
 805:         mov     ibf1,r0
 806:         sys     0;7f
 807: .data
 808: 7:      sys     seek; 9:.. ; 0
 809: .text
 810:         mov     blocksize,0f
 811:         mov     ibf1,r0
 812:         sys     0;7f
 813: .data
 814: 7:      sys     read; block; 0:..
 815: .text
 816: 4:
 817:         mov     (sp)+,ev
 818: 5:
 819:         rts     pc
 820: 6:
 821:         jsr     r5,string;9f
 822:         rts     pc
 823: 9: <Cannot do "ev".\n\0>
 824: .even
 825: 
 826: caseif:
 827:         clr     -(sp)
 828:         jsr     pc,skipcont
 829:         jsr     pc,getchar
 830:         cmp     r0,$'!
 831:         bne     1f
 832:         inc     (sp)
 833:         br      2f
 834: 1:
 835:         mov     r0,ch
 836: 2:
 837:         jsr     pc,atoi
 838:         beq     1f
 839:         tst     r0
 840:         bgt     5f /true
 841:         br      6f /false
 842: 1:
 843:         jsr     pc,getchar
 844:         cmp     r0,$'e
 845:         bne     1f
 846:         bit     $1,pn
 847:         bne     6f
 848:         br      5f
 849: 1:
 850:         cmp     r0,$'o
 851:         bne     1f
 852:         bit     $1,pn
 853:         beq     6f
 854:         br      5f
 855: 1:
 856:         cmpb    r0,$'n
 857:         beq     5f
 858: 1:
 859:         tst     (sp)+
 860:         rts     pc
 861: 5:
 862:         tst     (sp)
 863:         bne     1b
 864: 2:
 865:         clr     column
 866:         jsr     pc,getchar
 867:         bmi     0f
 868:         cmpb    r0,$' /
 869:         beq     2b
 870: 0:
 871:         mov     r0,ch
 872:         inc     nflush
 873:         br      1b
 874: 6:
 875:         tst     (sp)
 876:         beq     1b
 877:         br      2b
 878: 
 879: casewh:
 880:         clr     -(sp)
 881:         jsr     pc,skipcont
 882:         jsr     pc,getchar
 883:         cmp     r0,$'x
 884:         bne     1f
 885:         mov     $-1,r0
 886:         jsr     pc,findt
 887:         add     nl,r1
 888:         sub     dnl,r1
 889:         mov     r1,r0
 890:         br      2f
 891: 1:
 892:         mov     r0,ch
 893:         jsr     pc,atoi
 894:         beq     4f
 895: 2:
 896:         mov     r0,(sp)
 897:         jsr     pc,skipcont
 898:         jsr     r5,getname; bname
 899:         tstb    bname
 900:         bne     1f
 901:         clr     bname
 902: 1:
 903:         mov     (sp),r0
 904:         jsr     pc,findn
 905:         tst     r1
 906:         beq     1f
 907:         mov     bname,[mlist-nlist](r1)
 908:         br      4f
 909: 1:
 910:         mov     $mlist,r1
 911: 2:
 912:         tst     (r1)+
 913:         beq     3f
 914:         cmp     r1,$mliste
 915:         bgt     4f
 916:         br      2b
 917: 3:
 918:         mov     bname,-2(r1)
 919:         mov     (sp),[nlist-mlist-2](r1)
 920: 4:
 921:         tst     (sp)+
 922:         rts     pc
 923: 
 924: findn:
 925:         mov     $nlist,r1
 926: 1:
 927:         cmp     (r1),r0
 928:         beq     3f
 929: 2:
 930:         tst     (r1)+
 931:         cmp     r1,$nliste
 932:         bne     1b
 933:         clr     r1
 934:         rts     pc
 935: 3:
 936:         tst     [mlist-nlist](r1)
 937:         beq     2b
 938:         rts     pc
 939: 
 940: findm:
 941:         mov     $mlist,r1
 942: 1:
 943:         cmp     (r1),bname
 944:         beq     3f
 945: 2:
 946:         tst     (r1)+
 947:         cmp     r1,$mliste
 948:         bne     1b
 949:         clr     r1
 950:         rts     pc
 951: 3:
 952:         sub     $[mlist-nlist],r1
 953:         rts     pc
 954: 
 955: casech:
 956:         clr     -(sp)
 957:         jsr     pc,skipcont
 958:         jsr     pc,atoi
 959:         beq     2f
 960:         jsr     pc,findn
 961:         br      3f
 962: 2:
 963:         jsr     r5,getname; bname
 964:         tstb    bname
 965:         beq     1f
 966:         jsr     pc,findm
 967: 3:
 968:         tst     r1
 969:         beq     1f
 970:         mov     r1,(sp)
 971:         jsr     pc,skipcont
 972:         jsr     pc,atoi
 973:         beq     2f
 974:         mov     r0,*(sp)
 975: 1:
 976:         tst     (sp)+
 977:         rts     pc
 978: 2:
 979:         jsr     pc,getchar
 980:         tst     nlflg
 981:         bne     1b
 982:         mov     *(sp),r0
 983:         beq     1b
 984:         bgt     0f
 985:         add     pl,r0
 986:         inc     r0
 987: 0:
 988:         sub     nl,r0
 989:         ble     1b
 990:         dec     r0
 991:         ble     1b
 992:         cmp     dnl,r0
 993:         bge     0f
 994:         mov     dnl,r0
 995: 0:
 996:         sub     r0,*(sp)
 997:         br      1b
 998: 
 999: casemk:
1000:         jsr     pc,skipcont
1001:         beq     1f
1002:         mov     nl,markline
1003:         rts     pc
1004: 1:
1005:         jsr     r5,getname; bname
1006:         mov     bname,r0
1007:         beq     2f
1008:         jsr     pc,findr
1009:         beq     2f
1010:         mov     nl,(r1)
1011: 2:
1012:         rts     pc
1013: 
1014: casetm:
1015:         inc     copyf
1016:         jsr     pc,skipcont
1017:         mov     $bname,r1
1018: 1:
1019:         jsr     pc,getchar
1020:         bmi     1b
1021:         movb    r0,(r1)+
1022:         tst     nlflg
1023:         bne     2f
1024:         cmp     r1,$ename
1025:         blo     1b
1026:         movb    $'\n,-1(r1)
1027: 2:
1028:         clrb    (r1)
1029:         jsr     r5,stringfl; bname
1030:         clr     copyf
1031:         rts     pc
1032: 
1033: caserd:
1034:         jsr     pc,skipcont
1035:         jsr     r5,getname; bname
1036:         tst     iflg
1037:         bne     1f
1038:         tst     quiet
1039:         bne     2f
1040:         tstb    bname
1041:         beq     5f
1042:         jsr     r5,string; bname
1043:         jsr     r5,string; 3f
1044: 1:
1045:         jsr     pc,collect
1046:         inc     tty
1047:         jsr     pc,pushi
1048:         beq     6f
1049:         mov     $-1,ip
1050:         rts     pc
1051: 2:
1052:         bic     $10,ttym
1053:         mov     ttyid,r0
1054:         sys     stty; ttys
1055:         jsr     pc,flush
1056: 5:
1057:         jsr     r5,string;4f
1058:         br      1b
1059: 6:
1060:         jmp     rdtty2
1061: 3:      <: \0>
1062: 4:      <\0> /bell
1063:         .even
1064: 
1065: caseaf:
1066:         jsr     pc,skipcont
1067:         bne     3f
1068:         jsr     r5,getname;bname
1069:         mov     bname,r0
1070:         beq     3f
1071:         jsr     pc,findr
1072:         jsr     pc,skipcont
1073:         jsr     pc,getchar
1074:         mov     $4f,r2
1075: 1:
1076:         cmpb    r0,(r2)+
1077:         beq     2f
1078:         inc     r2
1079:         tstb    (r2)
1080:         bne     1b
1081: 2:
1082:         movb    (r2),[flist-vlist](r1)
1083: 3:
1084:         rts     pc
1085: 4:
1086: .byte '1,1
1087: .byte 'i,2
1088: .byte 'I,3
1089: .byte 'a,4
1090: .byte 'A,5
1091: .byte 0,0
1092: 
1093: casenr:
1094:         jsr     pc,skipcont
1095:         bne     5f
1096:         jsr     r5,getname; bname
1097:         mov     bname,r0
1098:         jsr     pc,findr
1099:         mov     r1,0f
1100:         beq     5f
1101:         jsr     pc,skipcont
1102:         bne     5f
1103:         jmp     7f
1104: .data
1105: 7:      jsr     r5,number1; 0:..
1106:         jmp     8f
1107: .text
1108: 8:
1109:         bne     1f
1110:         clr     r0
1111: 1:
1112:         mov     r0,*0b
1113:         jsr     pc,skipcont
1114:         bne     5f
1115:         jsr     pc,atoi
1116:         beq     5f
1117:         mov     r0,[inclist-vlist](r1)
1118: 5:
1119:         rts     pc
1120: 
1121: casefl:
1122:         jsr     pc,rbreak
1123:         jsr     pc,flush
1124:         rts     pc
1125: 
1126: casexh:
1127: /	tst	x.5
1128: /	bne	1f
1129:         inc     x.5
1130:         rts     pc
1131: /1:
1132: /	clr	x.5
1133: /	rts	pc
1134: 
1135: caseso:
1136:         jsr     pc,skipcont
1137:         tst     nlflg
1138:         bne     1f
1139:         jsr     r5,getname; nextf
1140:         tstb    nextf
1141:         beq     1f
1142:         sys     open; nextf; 0
1143:         bes     1f
1144:         mov     ifp,r1
1145:         cmp     r1,$ifle
1146:         bhi     1f
1147:         mov     r0,-(sp)
1148:         jsr     pc,flushi
1149:         mov     ifile,(r1)
1150:         mov     (sp)+,ifile
1151:         mov     ioff,[offl-ifl](r1)
1152:         add     $2,ifp
1153:         clr     ioff
1154:         inc     nx
1155:         inc     nflush
1156:         tst     (r1)
1157:         bne     1f
1158:         jsr     pc,savebuf
1159: 1:
1160:         rts     pc
1161: 
1162: caseeo:
1163:         clr     r0
1164:         br      1f
1165: caseec:
1166:         jsr     pc,skipcont
1167:         jsr     pc,getchar
1168:         cmpb    r0,$'\n
1169:         bne     1f
1170:         movb    $'\\,r0
1171: 1:
1172:         movb    r0,eschar
1173:         movb    r0,eschar+1
1174:         rts     pc
1175: 
1176: casest:
1177:         4
1178: 
1179: caseem:
1180:         clr     em
1181:         jsr     pc,skipcont
1182:         bne     1f
1183:         jsr     r5,getname;bname
1184:         beq     1f
1185:         mov     bname,em
1186: 1:
1187:         rts     pc
1188: 
1189: casefc:
1190:         mov     $4,fc
1191:         mov     $' ,padc
1192:         jsr     pc,skipcont
1193:         bne     1f
1194:         jsr     pc,getchar
1195:         bmi     1f
1196:         movb    r0,fc
1197:         jsr     pc,skipcont
1198:         bne     1f
1199:         mov     ch,r0
1200:         bmi     1f
1201:         cmpb    r0,fc
1202:         beq     1f
1203:         movb    r0,padc
1204: 1:
1205:         rts     pc
1206: 
1207: casepi:
1208:         tst     toolate
1209:         bne     1f
1210:         jsr     pc,skipcont
1211:         jsr     r5,getname;bname
1212:         beq     1f
1213:         sys     42. /pipe
1214:         jes     place
1215:         mov     r0,pipin
1216:         mov     r1,outid
1217:         sys     fork
1218:         br      2f
1219:         jes     place
1220:         mov     $1,r0
1221:         sys     close
1222:         mov     pipin,r0
1223:         sys     close
1224: 1:
1225:         inc     toolate
1226:         rts     pc
1227: 2:
1228:         clr     r0
1229:         sys     close
1230:         mov     pipin,r0
1231:         sys     41. /dup
1232:         mov     outid,r0
1233:         sys     close
1234:         sys     exec;bname;args
1235:         jsr     r5,string;9f
1236:         sys     exit
1237: args: bname;0
1238: 9: <exec failed\n\0>
1239: .even

Defined functions

args defined in line 1237; used 1 times
casead defined in line 6; never used
caseaf defined in line 1065; never used
caseam defined in line 580; never used
casear defined in line 495; never used
caseas defined in line 575; never used
casebp defined in line 168; never used
casebr defined in line 33; never used
casec2 defined in line 40; never used
casecc defined in line 37; never used
casece defined in line 58; never used
casech defined in line 955; never used
caseda defined in line 732; never used
casede defined in line 582; used 1 times
casedi defined in line 734; never used
caseds defined in line 577; never used
caseec defined in line 1165; never used
caseem defined in line 1179; never used
caseeo defined in line 1162; never used
caseev defined in line 767; never used
casefc defined in line 1189; never used
casefi defined in line 66; never used
casefl defined in line 1121; never used
casehc defined in line 391; never used
casehy defined in line 431; never used
caseif defined in line 826; never used
caseig defined in line 535; never used
casein defined in line 71; never used
caselc defined in line 411; never used
caseli defined in line 92; never used
casell defined in line 103; never used
casels defined in line 119; never used
caselt defined in line 376; never used
casemk defined in line 999; never used
casena defined in line 145; never used
casenc defined in line 421; never used
casene defined in line 149; never used
casenf defined in line 155; never used
casenh defined in line 442; never used
casenm defined in line 454; never used
casenn defined in line 489; never used
casenp defined in line 446; never used
casenr defined in line 1093; never used
casens defined in line 137; never used
casenx defined in line 506; never used
caseos defined in line 281; never used
casepi defined in line 1207; never used
casepl defined in line 192; never used
casepn defined in line 160; never used
casepo defined in line 519; never used
caserd defined in line 1033; never used
caserm defined in line 565; never used
casern defined in line 540; never used
casero defined in line 502; never used
caseroc defined in line 499; never used
casers defined in line 141; never used
casert defined in line 243; never used
casert1 defined in line 248; used 1 times
caseso defined in line 1135; never used
casesp defined in line 203; never used
casesp1 defined in line 206; never used
casest defined in line 1176; never used
casesv defined in line 269; never used
caseta defined in line 313; never used
casetc defined in line 401; never used
caseti defined in line 357; never used
casetl defined in line 372; never used
casetm defined in line 1014; never used
casetr defined in line 296; never used
caseul defined in line 366; never used
casewh defined in line 879; never used
casexh defined in line 1126; never used
clrold defined in line 716; used 4 times
findm defined in line 940; used 1 times
findmn defined in line 637; used 4 times
findn defined in line 924; used 2 times
finds defined in line 651; used 2 times
Last modified: 1975-07-17
Generated: 2016-12-26
Generated by src2html V0.67
page hit count: 1853
Valid CSS Valid XHTML 1.0 Strict