1: /
   2: /
   3: 
   4: / hyp1 -- driver
   5: 
   6: hyphen:
   7:         tst     hypedf
   8:         bne     3f
   9:         tst     hyf
  10:         beq     3f
  11:         inc     hypedf
  12:         mov     wordp,r0
  13:         clr     nhyph
  14: 1:
  15:         jsr     pc,punct
  16:         bne     1f
  17:         inc     r0
  18:         br      1b
  19: 1:
  20:         jsr     pc,alph
  21:         bne     3f
  22:         mov     r0,wordstart
  23: 1:
  24:         inc     r0
  25:         jsr     pc,alph
  26:         beq     1b
  27:         dec     r0
  28:         mov     r0,hstart
  29: 1:
  30:         inc     r0
  31:         tstb    (r0)
  32:         beq     2f
  33:         jsr     pc,punct
  34:         bne     3f
  35:         br      1b
  36: 2:
  37:         mov     hstart,wordend
  38:         jsr     pc,exword
  39:         beq     0f
  40:         jsr     r5,suffix
  41:         tst     exf
  42:         bne     0f
  43:         jsr     r5,digram
  44: 0:
  45:         bit     $4,hyf
  46:         beq     0f
  47:         mov     wordend,r0
  48:         bicb    $!177,-1(r0)
  49: 0:
  50:         mov     wordstart,r0
  51:         bicb    $!177,1(r0)
  52:         bit     $10,hyf
  53:         beq     3f
  54:         bicb    $!177,2(r0)
  55: 3:
  56:         rts     pc
  57: 
  58: casehw:
  59:         jsr     pc,skipcont
  60:         bne     2f
  61:         mov     nexth,r1
  62:         cmp     r1,$ehbuf-2
  63:         bhis    3f
  64: 1:
  65:         jsr     pc,getchar
  66:         bmi     1f
  67:         cmpb    r0,$' /
  68:         beq     4f
  69:         cmpb    r0,$012
  70:         beq     1f
  71:         movb    r0,(r1)+
  72:         cmp     r1,$ehbuf-2
  73:         blo     1b
  74:         br      3f
  75: 1:
  76:         clrb    (r1)+
  77:         mov     r1,nexth
  78:         clrb    (r1)+
  79: 2:
  80:         rts     pc
  81: 3:
  82:         jsr     r5,string;hmess
  83:         clrb    *nexth
  84:         br      2b
  85: 4:
  86:         jsr     pc,1b
  87:         br      casehw
  88: hmess: <Exception word space full.\n\0>
  89: .even
  90: 
  91: exword:
  92:         clr     exf
  93:         clr     -(sp)
  94:         mov     r1,-(sp)
  95:         mov     r2,-(sp)
  96:         mov     r3,-(sp)
  97:         mov     r4,-(sp)
  98:         mov     $hbuf,r2
  99:         mov     hstart,r0
 100:         cmpb    (r0)+,(r0)+
 101: 0:
 102:         mov     r2,8(sp)
 103:         mov     wordstart,r1
 104:         tstb    (r2)
 105:         beq     4f
 106: 1:
 107:         movb    (r2)+,r4
 108:         cmpb    r4,$'-
 109:         beq     1b
 110:         movb    (r1)+,r3
 111: /	tstb	r3
 112: /	bne	2f
 113:         cmp     r1,r0
 114:         blo     2f
 115:         tstb    r4
 116:         beq     3f
 117: 2:
 118:         tstb    r4
 119:         bne     2f
 120: /	tstb	(r1)
 121:         tstb    -1(r0)
 122:         bne     2f
 123:         cmpb    r3,$'s
 124:         beq     3f
 125: 2:
 126:         tstb    r4
 127:         beq     0b
 128: /	tstb	r3
 129: /	beq	2f
 130:         cmp     r1,r0
 131:         bhis    2f
 132:         cmpb    r4,r3
 133:         beq     1b
 134: 2:
 135:         tstb    (r2)+
 136:         bne     2b
 137:         br      0b
 138: 3:
 139:         mov     wordstart,r1
 140:         mov     8(sp),r2
 141:         clr     8(sp)
 142:         inc     exf
 143: 1:
 144:         tstb    (r1)+
 145:         cmpb    (r2)+,$'-
 146:         bne     0f
 147:         bisb    $200,-1(r1)
 148:         tstb    (r2)+
 149: 0:
 150:         tstb    (r2)
 151:         bne     1b
 152: 4:
 153:         mov     (sp)+,r4
 154:         mov     (sp)+,r3
 155:         mov     (sp)+,r2
 156:         mov     (sp)+,r1
 157:         tst     (sp)+
 158:         rts     pc
 159: 
 160: punct:
 161:         tst     old
 162:         bne 4f
 163:         cmpb    (r0),$010
 164:         beq     0f
 165:         movb    (r0),r2
 166:         jsr     pc,alph2
 167:         beq     0f
 168:         sez
 169:         rts      pc
 170: 0:
 171:         clz
 172:         rts     pc
 173: 4:
 174:         mov      $3f,r2
 175: 1:
 176:         cmpb    (r0),(r2)+
 177:         beq     2f
 178:         tstb    (r2)
 179:         bne     1b
 180:         clz
 181: 2:
 182:         rts     pc
 183: 3: < .,()"\'`\0>        /should be more
 184: .even
 185: maplow:
 186:         cmp     r2,$'a
 187:         bhis    1f
 188:         add     $'a-'A,r2
 189: 1:
 190:         rts     pc
 191: 
 192: vowel:
 193:         cmpb    r2,$'a
 194:         beq     1f
 195:         cmpb    r2,$'e
 196:         beq     1f
 197:         cmpb    r2,$'i
 198:         beq     1f
 199:         cmpb    r2,$'o
 200:         beq     1f
 201:         cmpb    r2,$'u
 202:         beq     1f
 203:         cmpb    r2,$'y
 204:         beq     1f
 205:         cmpb    r2,$'A
 206:         beq     1f
 207:         cmpb    r2,$'E
 208:         beq     1f
 209:         cmpb    r2,$'I
 210:         beq     1f
 211:         cmpb    r2,$'O
 212:         beq     1f
 213:         cmpb    r2,$'U
 214:         beq     1f
 215:         cmpb    r2,$'Y
 216: 1:
 217:         rts     pc
 218: 
 219: checkvow:
 220:         mov     r0,-(sp)
 221: 1:
 222:         movb    -(r0),r2
 223:         jsr     pc,vowel
 224:         beq     1f
 225:         jsr     pc,alph
 226:         beq     1b
 227:         mov     (sp)+,r0
 228:         clz
 229:         rts     r5
 230: 1:
 231:         mov     (sp)+,r0
 232:         sez
 233:         rts     r5
 234: 
 235: / hyp2 -- suffix and digram
 236: 
 237: digram:
 238:         mov     hstart,r0
 239: 1:
 240:         jsr     pc,alph
 241:         bne     3f
 242:         jsr     pc,vowel
 243:         beq     1f
 244:         dec     r0
 245:         br      1b
 246: 1:
 247:         mov     r0,hstart
 248: 1:
 249:         movb    -(r0),r2
 250:         jsr     pc,alph2
 251:         bne     3f
 252:         jsr     pc,vowel
 253:         bne     1b
 254:         clr     maxdig
 255:         mov     r0,nhstart
 256: 1:
 257:         mov     $1,r3
 258:         movb    -1(r0),r2
 259:         jsr     pc,alph2
 260:         beq     2f
 261:         movb    (r0),r2
 262:         mov     $'a,r1
 263:         jsr     r5,dilook; bxh
 264:         br      4f
 265: 2:
 266:         movb    -2(r0),r2
 267:         mov     $xxh,0f
 268:         jsr     pc,alph2
 269:         beq     2f
 270:         mov     $bxxh,0f
 271: 2:
 272:         movb    -1(r0),r1
 273:         movb    (r0),r2
 274:         jmp     7f
 275: .data
 276: 7:
 277:         jsr     r5,dilook; 0:xxh
 278:         jmp     8f
 279: .text
 280: 8:
 281: 4:
 282:         movb    (r0)+,r1
 283:         movb    (r0),r2
 284:         jsr     r5,dilook; xhx
 285:         movb    (r0),r1
 286:         movb    1(r0),r2
 287:         jsr     r5,dilook; hxx
 288:         cmp     r3,maxdig
 289:         blos    2f
 290:         mov     r3,maxdig
 291:         mov     r0,maxloc
 292: 2:
 293:         cmp     r0,hstart
 294:         blo     1b
 295:         mov     nhstart,hstart
 296:         cmp     maxdig,thresh
 297:         blo     digram
 298:         bisb    $200,*maxloc
 299:         inc     nhyph
 300: /	mov	maxdig,*octbufp
 301: /	inc	octcnt
 302: /	add	$2,octbufp
 303:         br      digram
 304: 3:
 305:         rts     r5
 306: 
 307: dilook:
 308:         mov     r4,-(sp)
 309:         bic     $!177,r2
 310:         bic     $!177,r1
 311:         jsr     pc,maplow
 312:         sub     $'a,r2
 313:         cmp     r2,$'z-'a
 314:         bhi     3f
 315:         mov     r2,r4
 316:         mov     r1,r2
 317:         jsr     pc,maplow
 318:         sub     $'a,r2
 319:         cmp     r2,$'z-'a
 320:         bhi     3f
 321:         mov     r3,-(sp)
 322:         mov     r2,r3
 323:         mpy     $13.,r3
 324:         clr     r2
 325:         clc
 326:         ror     r4
 327:         adc     r2
 328:         add     r3,r4
 329:         add     (r5)+,r4
 330:         movb    (r4),r4
 331:         tst     r2
 332:         bne     1f
 333:         asr     r4
 334:         asr     r4
 335:         asr     r4
 336:         asr     r4
 337: 1:
 338:         bic     $!17,r4
 339:         mov     r4,r3
 340:         mpy     (sp)+,r3
 341:         br      4f
 342: 3:
 343:         clr     r3
 344:         tst     (r5)+
 345: 4:
 346:         mov     (sp)+,r4
 347:         rts     r5
 348: 
 349: suffix:
 350:         mov     hstart,r0
 351:         jsr     pc,alph
 352:         bne     4f
 353:         jsr     pc,maplow
 354:         sub     $'a,r2
 355:         asl     r2
 356:         mov     suftab(r2),-(sp)
 357:         bic     $!37777,(sp)
 358:         beq     3f
 359: 1:
 360:         mov     hstart,r0
 361:         mov     (sp),r1
 362:         jsr     pc,rdsuf
 363:         movb    (r1),r3
 364:         beq     3f
 365:         bic     $!17,r3
 366:         add     r3,(sp)
 367:         add     r1,r3
 368: 2:
 369:         movb    -(r3),r2
 370:         cmp     r3,r1
 371:         ble     2f
 372:         bic     $!177,r2
 373:         mov     r2,-(sp)
 374:         movb    -(r0),r2
 375:         jsr     pc,maplow
 376:         cmp     r2,(sp)+
 377:         bne     1b
 378:         br      2b
 379: 2:
 380:         mov     hstart,r0
 381:         tst     (sp)+
 382:         movb    (r1),r3
 383:         bic     $!17,r3
 384:         add     r1,r3
 385:         bitb    $200,(r1)+
 386:         bne     1f
 387: 2:
 388:         dec     r0
 389:         cmp     r3,r1
 390:         ble     2f
 391:         tstb    -(r3)
 392:         bpl     2b
 393: 1:
 394:         mov     r0,hstart
 395:         dec     hstart
 396:         bitb    $100,-1(r1)
 397:         bne     2b
 398:         jsr     r5,checkvow
 399:         bne     4f
 400:         bisb    $200,(r0)
 401:         br      2b
 402: 2:
 403:         bitb    $40,-(r1)
 404:         bne     4f
 405:         jsr     pc,exword
 406:         bne     suffix
 407:         br      4f
 408: /	beq	suffix
 409: /	br	4f
 410: 3:
 411:         tst     (sp)+
 412: 4:
 413:         rts     r5
 414: 
 415: rdsuf:
 416:         mov     r0,-(sp)
 417:         mov     suff,nfile
 418:         mov     4(sp),r1
 419:         jsr     pc,rdsufb
 420:         mov     $sufb,r2
 421:         movb    r0,(r2)+
 422:         mov     r0,r3
 423:         bic     $!17,r3
 424: 1:
 425:         dec     r3
 426:         blt     1f
 427:         inc     r1
 428:         jsr     pc,rdsufb
 429:         movb    r0,(r2)+
 430:         br      1b
 431: 1:
 432:         mov     $sufb,r1
 433:         mov     (sp)+,r0
 434:         rts     pc

Defined functions

casehw defined in line 58; used 1 times
  • in line 87
checkvow defined in line 219; used 1 times
digram defined in line 237; used 3 times
dilook defined in line 307; used 4 times
exword defined in line 91; used 2 times
hmess defined in line 88; used 1 times
  • in line 82
hyphen defined in line 6; never used
maplow defined in line 185; used 4 times
punct defined in line 160; used 2 times
rdsuf defined in line 415; used 1 times
suffix defined in line 349; used 2 times
vowel defined in line 192; used 3 times
Last modified: 1975-07-17
Generated: 2016-12-26
Generated by src2html V0.67
page hit count: 699
Valid CSS Valid XHTML 1.0 Strict