         nam   GrfInt
         ttl   os9 system module    

* Disassembled 98/08/23 22:37:01 by Disasm v1.6 (C) 1988 by RML

         ifp1
         use   defsfile
         endc
tylg     set   Systm+Objct   
atrv     set   ReEnt+rev
rev      set   $01
         mod   eom,name,tylg,atrv,start,size
u0000    rmb   0
size     equ   .
name     equ   *
         fcs   /GrfInt/
         fcb   $0E 
start    equ   *
         lbra  L0136
         lbra  L0302
         lbra  L09FB
         lbra  L0A8E
         lbra  L0282
         lbra  L0BCF

L0026    fdb   $0703,$8704,$0005,$0210,$0704
         fdb   $750a,$0004,$d50c,$0004,$1f08,$0405,$590e,$ff00
         fdb   $0000,$ff00,$0000,$ff00,$0000,$0407,$622c,$0205
         fdb   $e62e,$0907,$cf30,$0a07,$8434,$0607,$9636,$0205
         fdb   $d312,$0105,$8c1e,$0005,$ad1c,$0205,$b516,$0105
         fdb   $a020,$0105,$a022,$0105,$9614,$0105,$ee28,$0105
         fdb   $ee06,$ff00,$0000,$ff00,$0000,$0205,$7d1a,$0205
         fdb   $d318,$ff00,$0000,$0105,$ee24,$0105,$ee2a,$ff00
         fdb   $0000,$0105,$ee26,$0408,$7d00,$0408,$9b00,$0408
         fdb   $b248,$0408,$c748,$0408,$d74a,$0408,$f64a,$0409
         fdb   $0b4a,$0409,$294a,$0408,$d74c,$0408,$f64c,$0408
         fdb   $d74e,$0408,$f64e,$ff00,$0000,$ff00,$0000,$0408
         fdb   $6744,$0009,$3b56,$0209,$3b50,$0409,$3b52,$0c09
         fdb   $3b54,$ff00,$0000
L00F6    pshs  u
         ldu   >$100C
         ldb   <$37,u
         puls  u
L0100    ldx   <$6E,u
         orcc  #$80
         pshs  cc
         orcc  #$50
         leas  $01,s
         sts   >$1007
         lds   <$00A7
         leau  >$0100,u
         pshs  pc,u,y,x,dp,b,a,cc
         stx   $0A,s
         ldx   >$1007
         lda   -$01,x
         sta   ,s
         inc   >$1002
         jmp   [>$00AB]
L0128    fdb   $2e2e,$2f43,$4d44,$532f
L0130    fdb   $6772,$6664,$72f6
L0136    pshs  u,y
         ldu   <$00A5
         ldd   <$6E,u
         lbne  L01DA
         leax  <$71,u
         clra
         ldb   #$03
L0147    sta   ,x+
         decb  
         bne   L0147
         leax  <L0130,pcr
         lbsr  L01FA
         bcc   L0168
         cmpb  #$DD
         bne   L0165
L0158    leax  <L0128,pcr
         lbsr  L021E
         bcs   L0166
         lbsr  L020B
         bcc   L0168
L0165    coma  
L0166    puls  pc,u,y
L0168    pshs  u,y
         ldu   <$00A5
         leau  >$0100,u
         ldb   #$00
         jsr   ,y
         lda   #$C1
         leax  <L0130,pcr
         ldy   <$004A
         leay  <$40,y
         os9   F$FModul 
         inc   $07,u
         ldu   $02,s
         lbsr  L022E
         ldu   <$00A5
         puls  b,a
         anda  #$1F
         ora   #$40
         std   <$6E,u
         leas  $02,s
         ldb   <$24,u
         orb   #$80
         stb   <$24,u
         ldd   #$0240
         os9   F$SRqMem 
         bcs   L0165
         ldx   <$00A5
         stu   <$75,x
         tfr   d,y
         clra  
         clrb  
L01AF    std   ,u++
         leay  -$02,y
         bne   L01AF
         std   <$22,x
         leay  <$77,x
         clra  
         ldb   #$40
L01BE    sta   ,y+
         decb  
         bne   L01BE
         ldu   <$00A5
         leay  >$00C7,u
         sty   >$1019
         leax  >L02F2,pcr
         ldb   #$10
L01D3    lda   ,x+
         sta   ,y+
         decb  
         bne   L01D3
L01DA    ldu   $02,s
         ldy   ,s
         leax  <$38,u
         stx   <$2F,u
         stx   <$31,u
         ldb   <$2E,y
         stb   <$36,u
         bmi   L01F3
         clra  
         bsr   L0249
L01F3    lbsr  L0735
         puls  u,y
         clrb  
         rts   
L01FA    leas  -$02,s
         bsr   L0237
         lda   #$C1
         os9   F$Link   
         bsr   L0243
         bcs   L022B
         bsr   L020B
         bra   L022B
L020B    pshs  u
         tfr   u,d
         tstb  
         bne   L0216
         anda  #$1F
         beq   L021B
L0216    comb  
         ldb   #$D2
         bra   L021C
L021B    clrb  
L021C    puls  pc,u
L021E    leas  -$02,s
         bsr   L0237
         lda   #$C1
         ldu   <$0050
         os9   F$Load   
L0229    bsr   L0243
L022B    leas  $02,s
         rts   
L022E    leas  -$02,s
         bsr   L0237
         os9   F$UnLink 
         bra   L0229
L0237    pshs  u,b,a
         ldd   <$0050
         std   $06,s
         ldd   <$004A
L023F    std   <$0050
         puls  pc,u,b,a
L0243    pshs  u,b,a
         ldd   $06,s
         bra   L023F
L0249    pshs  u
         leas  -$02,s
         bsr   L0237
         bsr   L0278
         os9   F$AllBit 
L0254    bsr   L0243
         leas  $02,s
         puls  pc,u
L025A    pshs  u
         leas  -$02,s
         bsr   L0237
         bsr   L0278
         leau  $04,x
         os9   F$SchBit 
         bra   L0254
L0269    bmi   L0281
         pshs  u
         leas  -$02,s
         bsr   L0237
         bsr   L0278
         os9   F$DelBit 
         bra   L0254
L0278    ldu   <$00A5
         leax  <$71,u
         ldy   #$0001
L0281    rts   
L0282    clra  
         ldb   <$36,u
         pshs  u,y
         bsr   L0269
         lbsr  L0633
         lda   -$10,y
         cmpa  #$FF
         bne   L0297
         sta   -$0F,y
         bra   L02A4
L0297    ldy   ,s
         ldu   $02,s
         ldb   #$08
         stb   <$37,u
         lbsr  L0451
L02A4    puls  u,y
         leax  <$35,u
         ldb   #$CB
L02AB    clr   ,x+
         decb  
         bne   L02AB
         clr   <$1E,u
         lbsr  L0651
         ldb   #$20
L02B8    lda   -$10,y
         cmpa  #$FF
         bne   L02F0
         lda   -$0F,y
         cmpa  #$FF
         bne   L02F0
         leay  <$40,y
         decb  
         bne   L02B8
         pshs  u
         ldb   #$02
         lbsr  L0100
         ldu   ,s
         ldd   <$6E,u
         clrb  
         tfr   d,u
         os9   F$UnLink 
         puls  u
         bcs   L02F1
         clra  
         clrb  
         std   <$6E,u
         ldu   <$75,u
         ldd   #$0240
         os9   F$SRtMem 
         bcs   L02F1
L02F0    clrb  
L02F1    rts   
L02F2    fdb   $3f09,$0012,$2436,$2d1b,$3f09,$0012,$2436,$2d1b
L0302    cmpa  #$1B
         bne   L0346
         ldx   <$2F,u
         ldb   ,x
         cmpb  #$53
         lbhi  L0A0F
         subb  #$20
         lbmi  L0A0F
         lslb  
         lslb  
         leax  >L0026,pcr
L031D    abx   
         lda   $03,x
         sta   <$37,u
         lda   ,x+
         beq   L0338
         lbmi  L0A0F
         sta   <$2C,u
L032E    ldd   ,x++
         leax  >L0026,pcr
         leax  d,x
L0336    bra   L0364
L0338    ldd   ,x++
         leax  >L0026,pcr
         leax  d,x
         stx   <$2D,u
         jmp   [<$2D,u]
L0346    cmpa  #$1F
         bne   L034C
         bra   L038C
L034C    cmpa  #$02
         bne   L0355
         leax  <L036D,pcr
         bra   L0361
L0355    cmpa  #$05
         bne   L035B
         bra   L0395
L035B    cmpa  #$20
         bcc   L0369
         bra   L039E
L0361    sta   <$2C,u
L0364    stx   <$2D,u
         clra  
         rts   
L0369    ldb   #$3A
         bra   L03A0
L036D    pshs  u
         lbsr  L0625
         puls  u
         lbcs  L0622
         ldx   <$2F,u
         ldd   ,x++
         ldu   <$00A5
         sta   >$0147,u
         stb   >$0149,u
         ldb   #$42
L0389    lbra  L0100
L038C    ldx   <$2F,u
         lda   ,x
         ldb   #$40
         bra   L03A0
L0395    ldx   <$2F,u
         lda   ,x
         ldb   #$3E
         bra   L03A0
L039E    ldb   #$3C
L03A0    pshs  b,a
         lbsr  L0625
         lbcs  L0620
         puls  b,a
         bra   L0389
         pshs  u,y
         lbsr  L0633
         lda   -$10,y
         cmpa  #$FF
         beq   L03BE
         puls  u,y
         comb  
         ldb   #$B8
         rts   
L03BE    lda   ,x+
         lbsr  L0765
         bcc   L03CA
         puls  u,y
         lbra  L061C
L03CA    stb   >$0160,u
         bsr   L0412
         bcc   L03D6
         ldb   #$C3
         bra   L0407
L03D6    cmpb  #$FF
         beq   L03F1
         leax  <L03E4,pcr
         lda   #$01
         puls  u,y
         lbra  L0361
L03E4    pshs  u,y
         lbsr  L0633
         lda   ,x
         sta   >$015A,u
         bra   L03F8
L03F1    ldx   ,s
         lbsr  L06E1
         bcs   L0407
L03F8    lbsr  L00F6
         bcs   L0409
         ldu   $02,s
         inc   <$1E,u
         ldy   ,s
         bsr   L0435
L0407    puls  pc,u,y
L0409    pshs  b
         ldd   #$FFFF
         std   -$10,y
         puls  pc,u,y,b
L0412    pshs  b,a
         bsr   L0422
         bcs   L041E
         ldd   ,x++
         std   $06,y
L041C    puls  pc,b,a
L041E    stb   $01,s
         bra   L041C
L0422    ldd   ,x++
         std   -$0B,y
         lda   ,x+
         ble   L042E
         ldb   ,x+
         bgt   L0431
L042E    lbra  L061C
L0431    std   -$09,y
         clrb  
L0434    rts   
L0435    pshs  u,y
         lbsr  L0633
         ldb   -$08,y
         puls  u,y
         stb   $07,u
         stb   <$28,y
         clrb  
         rts   
         pshs  u
         bsr   L0451
         puls  u
         bcs   L0434
         clr   <$1E,u
         rts   
L0451    pshs  u
         lbsr  L0633
         lda   -$10,y
         puls  u
         bpl   L0460
         comb  
         lbra  L0622
L0460    lda   -$0E,y
         bmi   L0478
         pshs  u,a
         lbsr  L04E7
         ldb   #$0C
         lbsr  L0100
         puls  u,a
         sta   <$35,u
         lbsr  L0633
         bra   L0460
L0478    pshs  u
         bsr   L04E7
         puls  u
         lbsr  L063E
         clra  
         ldb   #$12
L0484    sta   ,x+
         decb  
         bne   L0484
         lda   >$100B
         bmi   L0498
         clra  
         clrb  
         std   >$012E,u
         std   >$0130,u
L0498    lbra  L00F6
         pshs  u,y
         lbsr  L0625
         puls  u,y
         lbcs  L0622
         pshs  u,y
         lbsr  L0735
         bcc   L04B5
         puls  u,y
         bra   L04E6
L04B1    puls  u,y
         bra   L04D4
L04B5    lda   ,x+
         sta   >$0159,u
         lbsr  L0412
         bcs   L04B1
         pshs  y
         lbsr  L00F6
         puls  y
         bcs   L04D0
         puls  u,y
         lbsr  L0435
         bra   L04E6
L04D0    leas  $02,s
         puls  u
L04D4    pshs  b
         lda   -$0E,y
         sta   <$35,u
         ldd   #$FFFF
         std   -$10,y
         comb  
         puls  b
         rts   
         ldb   #$C3
L04E6    rts   
L04E7    ldu   <$00A5
L04E9    clra  
         clrb  
         std   -$0B,y
         ldd   <$28,y
         std   -$09,y
         ldb   #$0E
         pshs  u,y
         lbsr  L0100
         puls  pc,u,y
         pshs  u,y
         lbsr  L0625
         bcc   L0507
         puls  u,y
         lbra  L0622
L0507    lda   -$0E,y
         bpl   L0510
         puls  u,y
         lbra  L061C
L0510    ldx   $02,s
         sta   <$35,x
         bsr   L04E9
         ldb   #$0C
         lbsr  L0100
         bcs   L0525
         puls  u,y
         lbsr  L0435
         bra   L0527
L0525    puls  u,y
L0527    rts   
         ldx   $06,y
         lda   $01,x
         ldx   <$0050
         cmpa  >$00AC,x
         beq   L0570
         ldb   >$00AC,x
         sta   >$00AC,x
         pshs  y
         bsr   L0571
         ldy   $02,y
         ldx   <$00A5
         cmpy  <$20,x
         puls  y
         bne   L056F
         pshs  b
         leax  ,u
         lbsr  L0625
         puls  b
         bcc   L0561
         ldx   <$0050
         stb   >$00AC,x
         lbra  L0622
L0561    inc   <$23,x
         ldy   <$20,u
         sty   <$22,u
         stx   <$20,u
L056F    clrb  
L0570    rts   
L0571    leax  <$30,x
         lda   b,x
         ldx   <$0088
         os9   F$Find64 
         ldy   $03,y
         rts   
         leas  -$04,s
         sty   ,s
         stu   $02,s
         lbsr  L0625
         lbsr  L0422
         bcs   L05A0
         lbsr  L00F6
         bcs   L05A0
         ldu   $02,s
         ldy   ,s
         lbsr  L0435
         bra   L05A0
         comb  
         ldb   #$BD
L05A0    leas  $04,s
         rts   
         lbsr  L0625
         lbcs  L0622
         ldd   ,x
         lbsr  L07C9
         lbra  L00F6
         bsr   L0625
         bcs   L0622
         lda   ,x
         sta   $0A,y
         bra   L05D0
         pshs  u
         bsr   L0625
         bcs   L0622
         lda   ,x
         bra   L05E7
         bsr   L0625
         bcs   L0622
         lda   ,x
         sta   >$015A,u
L05D0    lbra  L00F6
         pshs  u
         bsr   L0625
         bcs   L0622
         bra   L05EB
         pshs  u
         bsr   L0625
         bcs   L0622
         ldd   ,x
         stb   >$0186,u
L05E7    sta   >$015A,u
L05EB    lbsr  L00F6
         puls  u
         tst   >$100A
         beq   L05F8
         inc   <$23,u
L05F8    rts   
         bsr   L0625
         bcs   L0622
         ldd   ,x
         beq   L0607
         cmpb  #$00
         lbeq  L0797
L0607    lbsr  L07C9
         bra   L05D0
         bsr   L0625
         bcs   L0622
         ldd   ,x
         bra   L0607
         bsr   L0625
         bcs   L0622
         lda   ,x
         bra   L05D0
L061C    comb  
         ldb   #$C3
         rts   
L0620    leas  $02,s
L0622    ldb   #$C4
         rts   
L0625    pshs  x
         tfr   y,x
         bsr   L0633
         pshs  u,y
         bsr   L0658
         puls  u,y
         puls  pc,x
L0633    ldb   <$35,u
         lda   #$40
         mul   
         bsr   L0651
         leay  d,y
         rts   
L063E    pshs  b,a
         lda   <$35,u
         ldb   #$12
         mul   
         ldu   <$00A5
         ldx   <$75,u
         leax  ,x
         leax  d,x
         puls  pc,b,a
L0651    ldu   <$00A5
         leay  >$0290,u
         rts   
L0658    ldd   -$10,y
         beq   L061C
         cmpa  #$FF
         beq   L0662
         clra  
         rts   
L0662    pshs  x
         ldx   $03,x
         pshs  x
         ldx   $04,x
         ldb   <$2F,x
         bne   L0673
         coma  
L0670    leas  $04,s
         rts   
L0673    lda   <$30,x
         lbsr  L0765
         bcc   L067F
         leas  $04,s
         bra   L061C
L067F    stb   >$0160,u
         cmpb  #$FF
         beq   L0690
         lda   <$35,x
         sta   >$015A,u
         bra   L0694
L0690    bsr   L06E1
         bcs   L0670
L0694    ldd   <$31,x
         std   -$0B,y
         ldd   <$2C,x
         std   -$09,y
         ldd   <$33,x
         std   $06,y
         ldb   #$04
         lbsr  L0100
         puls  x
         bcc   L06B5
         ldd   #$FFFF
         std   -$10,y
         leas  $02,s
         bra   L06E0
L06B5    ldx   $02,x
         inc   <$1E,x
         leau  ,x
         tfr   y,d
         puls  y
         pshs  b,a
         lbsr  L0435
         puls  y
         tst   >$100A
         beq   L06E0
         ldu   <$00A5
         pshs  y
         ldy   <$20,u
         sty   <$22,u
         puls  y
         stx   <$20,u
         lbsr  L0BE7
L06E0    rts   
L06E1    cmpa  #$FF
         bne   L06F2
         ldd   >$0130,u
         bne   L06EF
         comb  
         lbra  L0622
L06EF    std   -$10,y
         rts   
L06F2    pshs  y,x
         ldx   <$0050
         ldb   >$00AC,x
         lbsr  L0571
         ldx   ,s
         ldx   $03,x
         ldd   ,x
         cmpd  ,y
         bne   L0730
         ldy   $02,y
         lda   $06,y
         bpl   L0730
         lda   <$1D,y
         bne   L0730
         lda   <$1E,y
         beq   L0730
         leau  ,y
         lbsr  L0633
         lda   -$10,y
         cmpa  #$FF
         beq   L0730
         leas  $02,s
         puls  x
         ldd   -$10,y
         std   -$10,x
         tfr   x,y
         clra  
         rts   
L0730    puls  y,x
         lbra  L061C
L0735    pshs  x,b,a
         leax  ,u
         lbsr  L0651
         clrb  
L073D    lda   -$10,y
         bpl   L0754
         lda   -$0F,y
         cmpa  #$FF
         bne   L0754
         lda   <$35,x
         sta   -$0E,y
         stb   <$35,x
         dec   -$0F,y
         clrb  
         puls  pc,x,b,a
L0754    incb  
         cmpb  #$20
         bhi   L075E
         leay  <$40,y
         bra   L073D
L075E    comb  
         ldb   #$C1
         stb   $01,s
         puls  pc,x,b,a
L0765    pshs  y,a
         inca  
         bmi   L077A
         cmpa  #$09
         bhi   L077A
         leay  <L077E,pcr
         ldb   a,y
         cmpb  #$FE
         beq   L077A
         clra  
         puls  pc,y,a
L077A    puls  y,a
         comb  
         rts   
L077E    stu   >$FF86
         bita  #$FE
         ldu   >$0102
         com   <$0004
         lbsr  L0625
         lbcs  L0622
         lda   ,x+
         beq   L0797
         cmpa  #$FF
         bne   L079B
L0797    comb  
         ldb   #$C2
         rts   
L079B    ldb   ,x+
         beq   L0797
         bsr   L07C9
         ldd   ,x++
         std   >$0180,u
L07A7    lbra  L00F6
         lbsr  L0625
         lbcs  L0622
         bsr   L07CE
         bcs   L0797
         bsr   L07E1
         bcc   L07A7
         ldb   #$BF
         rts   
         lbsr  L0625
         lbcs  L0622
         bsr   L07CE
         bcs   L0797
         bra   L07A7
L07C9    std   >$0157,u
         rts   
L07CE    lda   ,x+
         beq   L07F3
         cmpa  #$FF
         beq   L07F3
         ldb   ,x+
         beq   L07F3
         bsr   L07C9
         lbsr  L09B7
         bra   L07F1
L07E1    ldd   ,x++
         beq   L07F3
         std   >$014F,u
         ldd   ,x++
         beq   L07F3
         std   >$0151,u
L07F1    clra  
         rts   
L07F3    coma  
         rts   
         pshs  u,y
         lbsr  L0633
         lda   ,x+
         beq   L0802
         cmpa  #$FF
         bne   L0806
L0802    puls  u,y
         bra   L0797
L0806    ldb   ,x+
         beq   L0802
         bsr   L07C9
         lda   ,x+
         lbsr  L0765
         tstb  
         bpl   L0819
         puls  u,y
         lbra  L061C
L0819    stb   >$0160,u
         bsr   L07E1
         ldd   ,x++
         std   <$1F,y
         pshs  u,y
         lbsr  L00F6
         puls  u,y
         bcs   L084F
L082D    ldd   <$1F,y
         cmpd  #$0048
         bgt   L0852
         stb   <$70,u
         tfr   b,a
         leax  <L0843,pcr
L083E    puls  u,y
         lbra  L0361
L0843    pshs  u,y
         lbsr  L0633
         bsr   L086F
         bsr   L0881
         bcs   L084F
         clrb  
L084F    leas  $04,s
         rts   
L0852    subd  #$0048
         std   <$1F,y
         lda   #$48
         sta   <$70,u
         leax  <L0862,pcr
         bra   L083E
L0862    pshs  u,y
         lbsr  L0633
         bsr   L086F
         bsr   L0881
         bcs   L084F
         bra   L082D
L086F    pshs  y,b,a
         leay  >$0200,u
         ldb   <$70,u
L0878    lda   ,x+
         sta   ,y+
         decb  
         bne   L0878
         puls  pc,y,b,a
L0881    lda   <$70,u
         pshs  u
         ldb   #$32
         lbsr  L0100
         puls  pc,u
         lbsr  L0625
         lbcs  L0622
         ldd   ,x++
         std   >$015B,u
         ldd   ,x++
         std   >$015D,u
         lbra  L00F6
         pshs  u,x
         lbsr  L0625
         bcc   L08AF
L08AA    puls  u,x
         lbra  L0622
L08AF    pshs  y
         bsr   L0912
         ldd   ,x++
         std   $01,y
         ldd   ,x++
L08B9    std   $03,y
         puls  y
         leas  $04,s
         clrb  
         rts   
         pshs  u,x
         lbsr  L0625
         bcs   L08AA
         pshs  y
         bsr   L0912
         ldd   ,x++
         addd  $01,y
         std   $01,y
         ldd   ,x++
         addd  $03,y
         bra   L08B9
         pshs  u,x
         lbsr  L0625
         bcs   L08AA
         pshs  y
         bsr   L0912
         lbsr  L09B7
L08E6    puls  y
         leas  $04,s
         lbra  L00F6
         pshs  u,x
         lbsr  L0625
         bcs   L08AA
         pshs  y
         bsr   L0912
         lbsr  L09C2
         bra   L08E6
         pshs  u,x
         lbsr  L0625
         bcc   L0909
         puls  u,x
         lbra  L0622
L0909    pshs  y
         bsr   L0912
         lbsr  L09D6
L0910    bra   L08E6
L0912    ldu   $06,s
         lbsr  L063E
         tfr   x,y
         ldx   $04,s
         rts   
         pshs  u,x
         lbsr  L0625
         bcc   L0928
         puls  u,x
         lbra  L0622
L0928    pshs  y
         bsr   L0912
         lbsr  L09E3
         bra   L0910
         pshs  u,x
         lbsr  L0625
         lbcs  L08AA
         pshs  y
         bsr   L0912
         lbsr  L09D6
L0941    ldx   >$014B,u
         ldd   >$014D,u
         stx   $01,y
         std   $03,y
         bra   L08E6
         pshs  u,x
         lbsr  L0625
         lbcs  L08AA
         pshs  y
         bsr   L0912
         lbsr  L09E3
         bra   L0941
         pshs  u,x
         lbsr  L0625
         lbcs  L08AA
         pshs  y
         ldu   $04,s
         ldb   <$37,u
         pshs  b
         lbsr  L063E
         tfr   x,y
         ldx   $03,s
         bsr   L09CE
         ldb   ,s
         cmpb  #$56
         beq   L09B2
         ldd   ,x++
         std   >$0153,u
         ldb   ,s
         cmpb  #$50
         beq   L09B2
         ldd   ,x++
         std   >$0155,u
         ldb   ,s
         cmpb  #$52
         beq   L09B2
         ldd   ,x++
         std   >$0120,u
         ldd   ,x++
         std   >$0122,u
         ldd   ,x++
         std   >$0124,u
         ldd   ,x++
         std   >$0126,u
L09B2    puls  b
         lbra  L08E6
L09B7    ldd   ,x++
         bsr   L09F1
         ldd   ,x++
L09BD    std   >$0149,u
         rts   
L09C2    ldd   ,x++
         addd  $01,y
         bsr   L09F1
         ldd   ,x++
         addd  $03,y
         bra   L09BD
L09CE    ldd   $01,y
         bsr   L09F1
         ldd   $03,y
         bra   L09BD
L09D6    bsr   L09CE
         ldd   ,x++
         bsr   L09F6
         ldd   ,x++
L09DE    std   >$014D,u
         rts   
L09E3    bsr   L09CE
         ldd   ,x++
         addd  $01,y
         bsr   L09F6
         ldd   ,x++
         addd  $03,y
         bra   L09DE
L09F1    std   >$0147,u
         rts   
L09F6    std   >$014B,u
         rts   
L09FB    cmpa  #$26
         beq   L0A13
         cmpa  #$91
         beq   L0A20
         cmpa  #$93
         beq   L0A4E
         cmpa  #$96
         beq   L0A6D
         cmpa  #$97
         beq   L0A3C
L0A0F    comb  
         ldb   #$D0
         rts   
L0A13    bsr   L0A44
         clra  
         ldb   -$09,y
         std   $04,x
         ldb   -$08,y
         std   $06,x
         clrb  
         rts   
L0A20    bsr   L0A44
         ldy   -$10,y
         leay  <$10,y
L0A28    ldu   $04,x
         ldx   <$0050
         ldb   $06,x
         ldx   <$004A
         lda   $06,x
         tfr   y,x
L0A34    ldy   #$0010
         os9   F$Move   
         rts   
L0A3C    ldx   $06,y
         ldy   >$1019
         bra   L0A28
L0A44    ldx   $06,y
         lbsr  L0625
         lbcs  L0620
         rts   
L0A4E    bsr   L0A44
         ldy   -$10,y
         ldb   ,y
         bmi   L0A5B
         addb  #$04
         bra   L0A65
L0A5B    cmpa  #$86
         bne   L0A63
         ldb   #$01
         bra   L0A65
L0A63    ldb   #$02
L0A65    stb   $01,x
         clrb  
         rts   
L0A69    fcb   $01,$03,$03,$0f
L0A6D    bsr   L0A44
         bsr   L0A7A
         std   $01,x
         ldb   $05,u
         clra
         std   $04,x
         clrb
         rts
L0A7A    ldu   -$10,y
         pshs  u
         ldb   ,u
         decb
         leau  <L0A69,pcr
         leau  b,u
         ldd   $06,y
         anda  ,u
         andb  ,u
         puls  pc,u
L0A8E    cmpa  #$29
         beq   L0AB2
         cmpa  #$84
         lbeq  L0B38
         cmpa  #$97
         beq   L0A9F
         lbra  L0A0F
L0A9F    ldx   $06,y
         ldx   $04,x
         ldu   <$0050
         lda   $06,u
         ldu   <$004A
         ldb   $06,u
         ldu   >$1019
         lbra  L0A34
L0AB1    fcb   $77
L0AB2    pshs  u,y
         ldx   $03,y
         ldx   $04,x
         ldb   <$2E,x
         bpl   L0B34
         pshs  x
L0ABF    clra  
         clrb  
         lbsr  L025A
         bcc   L0ACC
         puls  u,y,x
         comb  
         ldb   #$DD
         rts   
L0ACC    pshs  b
         ldu   <$00A5
         lbsr  L0249
         leax  <L0AB1,pcr
         leay  >$0200,u
         ldb   ,x
         stb   ,y+
         ldb   ,s
         clra  
L0AE1    subb  #$0A
         bpl   L0AF6
         addb  #$0A
         tsta  
         beq   L0AEE
         ora   #$30
         sta   ,y+
L0AEE    orb   #$30
         orb   #$80
         stb   ,y+
         bra   L0AF9
L0AF6    inca  
         bra   L0AE1
L0AF9    leas  -$02,s
         lbsr  L0237
         leax  >$0200,u
         lda   #$F1
         os9   F$Link   
         lbsr  L0243
         leas  $02,s
         bcc   L0B12
         leas  $01,s
         bra   L0ABF
L0B12    lda   <$26,u
         bpl   L0ABF
         tfr   u,d
         ldy   $03,s
         ldx   $03,y
         std   $04,x
         ldb   ,s
         ldu   $05,s
         stb   <$36,u
         ldu   $01,s
         os9   F$UnLink 
         ldu   $05,s
         leas  $07,s
         bcs   L0B37
         bra   L0B36
L0B34    puls  u,y
L0B36    clrb  
L0B37    rts   
L0B38    ldx   $06,y
         pshs  x
         lbsr  L0625
         ldd   $04,x
         std   >$0157,u
         ldb   #$38
         lbsr  L0100
         ldu   <$00A5
         ldb   >$0197,u
         lda   >$0199,u
         puls  x
         tst   $07,x
         beq   L0B86
         pshs  u,x,b,a
         bsr   L0B98
         bcc   L0B82
         clra  
         ldb   $01,s
         tfr   d,x
         ldb   ,s
         os9   F$MapBlk 
         stb   $01,s
         bcs   L0B80
         tfr   u,d
         ldu   <$00A5
         ldx   $02,s
         addd  >$019D,u
         std   $04,x
         ldd   >$019B,u
         std   $06,x
L0B80    puls  pc,u,x,b,a
L0B82    leas  $02,s
         puls  pc,u,x
L0B86    pshs  y,x,a
         bsr   L0B98
         bcs   L0B95
         ldd   #$333E
L0B8F    std   ,x++
         dec   ,s
         bne   L0B8F
L0B95    puls  y,x,a
         rts   
L0B98    pshs  b,a
         lda   #$08
         sta   $01,s
         ldx   <$0050
         leax  <$50,x
         clra  
         addb  ,s
         decb  
L0BA7    cmpd  ,--x
         beq   L0BB2
         dec   $01,s
         bne   L0BA7
         bra   L0BC9
L0BB2    dec   $01,s
         dec   ,s
         beq   L0BBF
         decb  
         cmpb  ,--x
         beq   L0BB2
         bra   L0BC9
L0BBF    lda   $01,s
         lsla  
         lsla  
         lsla  
         lsla  
         clrb  
         leas  $02,s
         rts   
L0BC9    puls  b,a
         comb  
         ldb   #$D2
         rts   
L0BCF    cmpa  #$00
         beq   L0BE0
         cmpa  #$02
         beq   L0BF5
         cmpa  #$01
         lbeq  L0CBA
         lbra  L0A0F
L0BE0    lbsr  L0633
         ldd   -$10,y
         bmi   L0BFF
L0BE7    ldb   #$10
         lbsr  L0100
         ldx   <$00A5
         ldu   <$20,x
         jmp   [>$00C4,x]
L0BF5    lbsr  L0625
         bcs   L0BFF
         ldb   #$46
         lbra  L0100
L0BFF    rts   
L0C00    leas  -$06,s
         sty   ,s
         leay  <$26,y
         bsr   L0C6B
         bra   L0C15
L0C0C    leas  -$06,s
         sty   ,s
         leay  -$0B,y
         bsr   L0C4B
L0C15    ldb   $02,s
         lbsr  L0CAF
         cmpd  ,x
         bhi   L0C44
         ldb   $02,s
         addb  $04,s
         lbsr  L0CAF
         cmpd  ,x
         bls   L0C44
         ldb   $03,s
         lbsr  L0CAF
         cmpd  $02,x
         bhi   L0C44
         ldb   $03,s
         addb  $05,s
         lbsr  L0CAF
         cmpd  $02,x
         bls   L0C44
         clra  
         bra   L0C45
L0C44    coma  
L0C45    ldy   ,s
         leas  $06,s
         rts   
L0C4B    pshs  x
         pshs  y
         ldy   $06,s
         ldd   -$0B,y
         pshs  u
         ldu   <$24,y
         cmpu  -$0D,y
         puls  u
         beq   L0C67
         addd  <$26,y
         puls  y
         bra   L0C6F
L0C67    puls  y
         bra   L0C6D
L0C6B    pshs  x
L0C6D    ldd   ,y
L0C6F    std   $06,s
         ldd   $02,y
         std   $08,s
         ldx   $04,s
         lda   -$0E,x
         bmi   L0CA1
L0C7B    bsr   L0CA3
         lda   -$0E,x
         bpl   L0C7B
         ldd   $06,s
         pshs  b,a
         pshs  u
         ldu   <$24,x
         cmpu  -$0D,x
         puls  u
         bne   L0C98
         puls  b,a
         addd  <$26,x
         bra   L0C9F
L0C98    ldd   <$26,x
         addd  -$0B,x
         addd  ,s++
L0C9F    std   $06,s
L0CA1    puls  pc,x
L0CA3    ldb   #$40
         mul   
         ldu   <$00A5
         leax  >$0290,u
         leax  d,x
         rts   
L0CAF    clra  
         tstb  
         beq   L0CB9
         lslb  
         rola  
         lslb  
         rola  
         lslb  
         rola  
L0CB9    rts   
L0CBA    lbsr  L0625
         bsr   L0D16
         pshs  x
         leax  <$20,x
         lbsr  L0C0C
         bcs   L0CD4
         bsr   L0CEC
         lda   #$00
         puls  x
L0CCF    sta   <$16,x
         clrb  
         rts   
L0CD4    bsr   L0CE5
         lbsr  L0C00
         puls  x
         bcs   L0CE1
         lda   #$01
         bra   L0CCF
L0CE1    lda   #$02
         bra   L0CCF
L0CE5    clra  
         clrb  
         std   -$04,x
         std   -$02,x
         rts   
L0CEC    leas  -$06,s
         sty   ,s
         leay  -$0B,y
         lbsr  L0C4B
         ldb   $02,s
         lbsr  L0CAF
         pshs  b,a
         ldd   ,x
         subd  ,s++
         std   -$04,x
         ldb   $03,s
         lbsr  L0CAF
         pshs  b,a
         ldd   $02,x
         subd  ,s++
         std   -$02,x
         ldy   ,s
         leas  $06,s
         rts   
L0D16    leax  <$3C,u
         ldd   <$18,x
         std   <$20,x
         ldd   <$1A,x
         std   <$22,x
         pshs  x
         ldx   -$10,y
         lda   ,x
         puls  x
         bita  #$01
         bne   L0D39
         ldd   <$20,x
         lsra  
         rorb  
         std   <$20,x
L0D39    rts   
         emod
eom      equ   *
