         nam   PRINTER
         ttl   os9 device driver    

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

         ifp1
         use   defsfile
         endc
tylg     set   Drivr+Objct   
atrv     set   ReEnt+rev
rev      set   $01
         mod   eom,name,tylg,atrv,start,size
u0000    rmb   29
u001D    rmb   1
u001E    rmb   1
u001F    rmb   1
u0020    rmb   2
u0022    rmb   1
u0023    rmb   1
u0024    rmb   2
u0026    rmb   2
u0028    rmb   1
size     equ   .
         fcb   $03 
name     equ   *
         fcs   /PRINTER/
         fcb   $0C 
L0016    fcb   $09 
         fcb   $0C 
         fcb   $03 
         fcb   $4C L
         fcb   $01 
         fcb   $A2 "
         fcb   $00 
         fcb   $CE N
         fcb   $00 
         fcb   $62 b
         fcb   $00 
         fcb   $2E .
         fcb   $00 
         fcb   $12 
start    equ   *
         lbra  L0036
         lbra  L016F
         lbra  L008C
         lbra  L010C
         lbra  L0130
         lbra  L005E
L0036    pshs  cc
         orcc  #$50
         ldx   #$FF20
         clr   $01,x
         ldd   <$2C,y
         std   <u0022,u
         lda   #$FE
         sta   ,x
         lda   #$36
         sta   $01,x
         lda   ,x
         ldd   <$26,y
         lbsr  L0138
         puls  cc
         lbsr  L0104
         lbcs  L0100
L005E    rts   
L005F    pshs  a
         lda   <$35,y
         anda  #$0F
         cmpa  #$07
         bcc   L0076
         lsla  
         leax  <L0016,pcr
         ldd   a,x
         std   <u0024,u
         clrb  
         puls  pc,a
L0076    ldb   #$CB
         puls  a
L007A    orcc  #$01
         rts   
L007D    stb   >$FF20
L0080    pshs  b,a
         ldd   <u0024,u
L0085    subd  #$0001
         bne   L0085
         puls  pc,b,a
L008C    bsr   L005F
         bcs   L007A
         pshs  b,a
         bsr   L00CB
         puls  b,a
         bcs   L0100
         ldb   #$09
         pshs  b,cc
         orcc  #$50
         tst   <u001E,u
         beq   L00A5
         dec   $01,s
L00A5    andcc #$FE
L00A7    ldb   #$02
         bcs   L00AC
         clrb  
L00AC    bsr   L007D
         lsra  
         dec   $01,s
         bne   L00A7
         ldb   <u001D,u
         beq   L00BC
         andb  #$FE
         bsr   L007D
L00BC    ldb   #$02
         bsr   L007D
         tst   <u001F,u
         beq   L00C9
         ldb   #$02
         bsr   L007D
L00C9    puls  pc,b,cc
L00CB    clra  
         clrb  
         std   <u0026,u
L00D0    ldd   #$0303
L00D3    bsr   L0104
         bcs   L00DE
         bsr   L0080
         decb  
         bne   L00D3
         clrb  
         rts   
L00DE    bsr   L0080
         deca  
         bne   L00D3
         pshs  x
         ldx   #$0001
         os9   F$Sleep  
         puls  x
         ldd   <u0026,u
         addd  #$0001
         std   <u0026,u
         ldb   <u0028,u
         beq   L00D0
         cmpb  <u0026,u
         bhi   L00D0
L0100    comb  
         ldb   #$F6
         rts   
L0104    pshs  x,b,a
         ldb   >$FF22
         lsrb  
         puls  pc,x,b,a
L010C    cmpa  #$06
         bne   L0112
L0110    clrb  
         rts   
L0112    ldx   $06,y
         cmpa  #$26
         beq   L0123
         cmpa  #$28
         bne   L0173
         ldd   <u0020,u
         std   $06,x
         bra   L0110
L0123    clra  
         ldb   <u0022,u
         std   $04,x
         ldb   <u0023,u
         std   $06,x
         bra   L0110
L0130    cmpa  #$28
         bne   L0173
         ldx   $06,y
         ldd   $06,x
L0138    std   <u0020,u
         clra  
         clrb  
         std   <u001D,u
         sta   <u001F,u
         ldd   <u0020,u
         tstb  
         bpl   L014C
         inc   <u001F,u
L014C    bitb  #$40
         bne   L016F
         bitb  #$20
         beq   L0157
         inc   <u001E,u
L0157    bita  #$20
         beq   L0169
         bita  #$80
         beq   L016F
         inc   <u001D,u
         bita  #$40
         bne   L0169
         inc   <u001D,u
L0169    anda  #$0F
         sta   <u0028,u
         rts   
L016F    comb  
         ldb   <$00CB
         rts   
L0173    comb  
         ldb   #$D0
         rts   
         emod
eom      equ   *
