         nam   RAM
         ttl   os9 device driver    

* Disassembled 98/08/24 08:59:51 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   6
u0006    rmb   5
u000B    rmb   2
u000D    rmb   2
u000F    rmb   1
u0010    rmb   37
u0035    rmb   1
u0036    rmb   2
u0038    rmb   8
u0040    rmb   6
u0046    rmb   10
u0050    rmb   112
u00C0    rmb   16
u00D0    rmb   48
size     equ   .
         fcb   $BF ?
name     equ   *
         fcs   /RAM/
         fcb   $01 
start    equ   *
         lbra  L0024
         lbra  L018B
         lbra  L019C
         lbra  L01EF
         lbra  L01EF
         lbra  L01F3
L0024    leax  u000F,u
         pshs  u,x
         ldd   #$0100
         os9   F$SRqMem 
         lbcs  L016C
         pshs  u
         ldu   $04,s
         ldb   #$01
         stb   u0006,u
         ldb   <$19,y
         stb   <u0035,u
         ldx   <u0050
         ldd   $08,x
         ldx   $02,s
         std   $0B,x
         ldd   #$0001
         std   $06,x
         ldd   #$0002
         std   $09,x
         lda   $0D,y
         sta   $0D,x
         ldd   <$1B,y
         std   $01,x
         lsra  
         rorb  
         lsra  
         rorb  
         lsra  
         rorb  
         std   $04,x
         lsra  
         rorb  
         lsra  
         rorb  
         std   <u0036,u
         leax  >u00C0,u
         cmpd  #$0020
         bls   L0081
         lslb  
         rola  
         os9   F$SRqMem 
         lbcs  L0170
         leax  ,u
         ldu   $04,s
L0081    stx   <u0038,u
         ldy   <u0036,u
L0088    ldb   #$01
         os9   F$AllRAM 
         lbcs  L0170
         std   ,x++
         leay  -$01,y
         bne   L0088
         leax  <u0040,u
         ldd   [<u0038,u]
         std   <$40,x
         os9   F$AllTsk 
         lbcs  L0170
         lda   <u00D0
         ldb   $06,x
         ldx   $02,s
         ldy   #$0015
         ldu   #$0000
         os9   F$Move   
         leax  >L0174,pcr
         leau  ,y
         ldy   #$0017
         os9   F$Move   
         ldx   $02,s
         ldd   $04,x
         ldx   ,s
         leay  >$0100,x
         pshs  y
         leay  d,x
         pshs  y
         lda   #$FF
         sta   ,x+
L00D8    clr   ,x+
         cmpx  ,s
         bcs   L00D8
L00DE    sta   ,x+
         cmpx  $02,s
         bcs   L00DE
         lda   <u00D0
         ldu   $08,s
         ldb   <u0046,u
         ldx   $04,s
         ldy   #$0100
         ldu   #$0100
         os9   F$Move   
         puls  x
L00F9    clr   ,x+
         cmpx  ,s
         bcs   L00F9
         leas  $02,s
         ldx   ,s
         ldu   $02,s
         lda   u000D,u
         sta   ,x
         ldd   u000B,u
         std   $01,x
         ldb   #$01
         stb   $08,x
         ldd   #$0040
         std   $0B,x
         ldd   #$0003
         std   <$11,x
         ldd   #$0005
         std   <$13,x
         lda   <u00D0
         ldu   $04,s
         ldb   <u0046,u
         ldy   #$0100
         ldu   #$0200
         os9   F$Move   
         leay  <$16,x
         pshs  y
L0138    clr   ,x+
         cmpx  ,s
         bcs   L0138
         leas  $02,s
         ldx   ,s
         ldd   #$2EAE
         std   ,x
         stb   <$20,x
         ldd   #$0002
         std   <$1E,x
         std   <$3E,x
         lda   <u00D0
         ldu   $04,s
         ldb   <u0046,u
         ldy   #$0040
         ldu   #$0300
         os9   F$Move   
         ldd   #$0100
         puls  u
         os9   F$SRtMem 
L016C    leas  $02,s
         puls  pc,u
L0170    leas  $04,s
         puls  pc,u
L0174    fcb   $00,$00,$00,$00,$00,$00,$00,$00,$00,$00
         fcb   $4f,$53,$2d,$39,$20,$52,$41,$4d,$20,$44,$69,$73,$eb
L018B    pshs  u
         bsr   L01B6
         bcs   L01B4
         tfr   d,x
         lda   <u0046,u
         ldb   <u00D0
         ldu   $08,y
         bra   L01AD
L019C    pshs  u
         bsr   L01B6
         bcs   L01B4
         pshs  b,a
         lda   <u00D0
         ldb   <u0046,u
         ldx   $08,y
         puls  u
L01AD    ldy   #$0100
         os9   F$Move   
L01B4    puls  pc,u
L01B6    pshs  x
         tstb  
         bne   L01E5
L01BB    cmpx  <u0010,u
         bcc   L01E5
         tfr   x,d
         lsra  
         rorb  
         lsra  
         rorb  
         lsra  
         rorb  
         lsra  
         rorb  
         andb  #$FE
L01CC    ldx   <u0038,u
         beq   L01E9
         ldd   d,x
         beq   L01E9
         leax  <u0040,u
         std   <$40,x
         os9   F$SetTsk 
         lda   $01,s
         anda  #$1F
         clrb  
         puls  pc,x
L01E5    ldb   #$F1
         bra   L01EB
L01E9    ldb   #$F4
L01EB    orcc  #$01
         puls  pc,x
L01EF    comb  
         ldb   #$D0
         rts   
L01F3    pshs  u
         ldy   <u0036,u
         ldu   <u0038,u
         beq   L021E
L01FE    ldb   #$01
         ldx   ,u++
         beq   L0207
         os9   F$DelRAM 
L0207    leay  -$01,y
         bne   L01FE
         ldu   ,s
         ldd   <u0036,u
         cmpd  #$0020
         bls   L021E
         lslb  
         rola  
         ldu   <u0038,u
         os9   F$SRqMem 
L021E    clrb  
         puls  pc,u
         emod
eom      equ   *
