changeset 1471:5341d680da55

aciapak and modpak are now replaced by sacia
author boisy
date Mon, 15 Dec 2003 15:01:25 +0000
parents 7196ac520479
children 95c71c2a441f
files level1/modules/aciapak.asm level1/modules/m1.asm level1/modules/m2.asm level1/modules/modpak.asm
diffstat 4 files changed, 0 insertions(+), 1228 deletions(-) [+]
line wrap: on
line diff
--- a/level1/modules/aciapak.asm	Mon Dec 15 15:00:30 2003 +0000
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,561 +0,0 @@
-********************************************************************
-* ACIAPAK - RS-232 Pak driver
-*
-* $Id$
-*
-* Edt/Rev  YYYY/MM/DD  Modified by
-* Comment
-* ------------------------------------------------------------------
-*  10      1985/??/??
-* From Tandy OS-9 Level One VR 02.00.00
-
-         nam   ACIAPAK
-         ttl   RS-232 Pak driver
-
-* Disassembled 98/08/23 20:25:56 by Disasm v1.6 (C) 1988 by RML
-
-         IFP1
-         use   defsfile
-         use   scfdefs
-         ENDC
-
-tylg     set   Drivr+Objct   
-atrv     set   ReEnt+rev
-rev      set   $00
-edition  set   10
-
-         mod   eom,name,tylg,atrv,start,size
-
-         rmb   V.SCF		SCF storage requirements
-u001D    rmb   1
-u001E    rmb   1
-u001F    rmb   1
-u0020    rmb   1
-u0021    rmb   1
-u0022    rmb   1
-u0023    rmb   1
-u0024    rmb   1
-u0025    rmb   2
-u0027    rmb   1
-u0028    rmb   1
-u0029    rmb   1
-u002A    rmb   1
-u002B    rmb   1
-orgDFIRQ rmb   2
-u002E    rmb   2
-u0030    rmb   2
-u0032    rmb   25
-u004B    rmb   34
-u006D    rmb   17
-u007E    rmb   2
-u0080    rmb   128
-size     equ   .
-
-         fcb   UPDAT.
-
-name     fcs   /ACIAPAK/
-         fcb   edition
-
-start    lbra  Init
-         lbra  Read
-         lbra  Write
-         lbra  GetStat
-         lbra  SetStat
-         lbra  Term
-
-IRQPckt  fcb   $00,$80,$0A
-
-* Driver supplied D.FIRQ routine
-FIRQRtn  tst   ,s
-         bmi   L003B
-         leas  -$01,s
-         pshs  y,x,dp,b,a
-         lda   $08,s
-         stu   $07,s
-         ora   #$80
-         pshs  a
-L003B    jmp   [>D.SvcIRQ]
-
-* Init
-*
-* Entry:
-*    Y  = address of device descriptor
-*    U  = address of device memory area
-*
-* Exit:
-*    CC = carry set on error
-*    B  = error code
-*
-Init     ldx   V.PORT,u
-         stb   $01,x
-         ldd   <IT.COL,y		get column size
-         std   <u002A,u
-         ldd   <IT.PAR,y		get parity/baud rate
-         lbsr  L01CF
-         ldd   V.PORT,u
-         addd  #$0001
-         leax  >IRQPckt,pcr
-         leay  >L024E,pcr
-         os9   F$IRQ
-         bcs   L0085
-         pshs  cc
-         orcc  #IntMasks
-         ldd   <D.FIRQ			get current D.FIRQ vector
-         std   <orgDFIRQ,u		save it off locally
-         leax  >FIRQRtn,pcr		get our D.FIRQ routine
-         stx   <D.FIRQ			and put it in system global vector
-         lda   >PIA1Base+3
-         anda  #$FC
-         ora   #$01
-         sta   >PIA1Base+3
-         lda   >PIA1Base+2
-         puls  cc
-         lda   #$03
-         sta   >MPI.Slct
-         clrb
-L0085    rts
-
-L0086    orcc  #IntMasks
-         lda   ,x
-         lda   ,x
-         lda   $01,x
-         ldb   $01,x
-         ldb   >PIA1Base+2
-         ldb   $01,x
-         bmi   L00FB
-         lda   #$02
-         sta   <u0022,u
-         clra
-         andb  #$60
-         std   <u0023,u
-         clrb
-         std   <u001D,u
-         std   <u0020,u
-         sta   <u001F,u
-         std   <u0025,u
-         andcc #^IntMasks
-         rts
-
-* Read
-*
-* Entry:
-*    Y  = address of path descriptor
-*    U  = address of device memory area
-*
-* Exit:
-*    A  = character read
-*    CC = carry set on error
-*    B  = error code
-*
-L00B2    bsr   L00FF
-Read     lda   <u0023,u
-         ble   L00CC
-         ldb   <u001F,u
-         cmpb  #$0A
-         bhi   L00CC
-         ldb   V.XON,u
-         orb   #$80
-         stb   <u0023,u
-         ldb   #$05
-         lbsr  L037D
-L00CC    tst   <u0025,u
-         bne   L00FB
-         ldb   <u001E,u
-         leax  <u002E,u
-         orcc  #IntMasks
-         cmpb  <u001D,u
-         beq   L00B2
-         abx
-         lda   ,x
-         dec   <u001F,u
-         incb
-         cmpb  #$4F
-         bls   L00EA
-         clrb
-L00EA    stb   <u001E,u
-         ldb   V.ERR,u
-         beq   L015E
-         stb   <PD.ERR,y
-         clr   V.ERR,u
-         comb
-         ldb   #E$Read
-         bra   L015F
-L00FB    comb
-         ldb   #E$NotRdy
-         rts
-L00FF    pshs  x,b,a
-         lda   V.BUSY,u
-         sta   V.WAKE,u
-         andcc #^IntMasks
-         ldx   #$0000
-         os9   F$Sleep
-         ldx   <D.Proc
-         ldb   <P$Signal,x
-         beq   L0118
-         cmpb  #S$Intrpt
-         bls   L012E
-L0118    clra
-         lda   P$State,x
-         bita  #Condem
-         bne   L012E
-         ldb   #E$HangUp
-         lda   V.ERR,u
-         bita  #$20
-         bne   L0129
-         puls  pc,x,b,a
-L0129    inc   <PD.PST,y
-         clr   V.ERR,u
-L012E    leas  $06,s
-         coma
-         rts
-
-* Write
-*
-* Entry:
-*    A  = character to write
-*    Y  = address of path descriptor
-*    U  = address of device memory area
-*
-* Exit:
-*    CC = carry set on error
-*    B  = error code
-*
-L0132    bsr   L00FF
-Write    leax  <u007E,u
-         ldb   <u0020,u
-         abx
-         sta   ,x
-         incb
-         cmpb  #$81
-         bls   L0143
-         clrb
-L0143    orcc  #IntMasks
-         cmpb  <u0021,u
-         beq   L0132
-         stb   <u0020,u
-         lda   <u0022,u
-         beq   L015E
-         anda  #$FD
-         sta   <u0022,u
-         bne   L015E
-         ldb   #$05
-         lbsr  L037D
-L015E    clrb
-L015F    andcc #^IntMasks
-         rts
-
-* GetStat
-*
-* Entry:
-*    A  = function code
-*    Y  = address of path descriptor
-*    U  = address of device memory area
-*
-* Exit:
-*    CC = carry set on error
-*    B  = error code
-*
-GetStat  ldx   PD.RGS,y
-         cmpa  #SS.Ready
-         bne   L0171
-         ldb   <u001F,u
-         beq   L00FB
-         stb   R$B,x
-L016F    clrb
-         rts
-L0171    cmpa  #SS.EOF
-         beq   L016F
-         cmpa  #SS.ScSiz
-         beq   L0184
-         cmpa  #SS.ComSt
-         bne   L0191
-         ldd   <u0028,u
-         std   R$Y,x
-         bra   L016F
-L0184    clra
-         ldb   <u002A,u
-         std   R$X,x
-         ldb   <u002B,u
-         std   R$Y,x
-         bra   L016F
-L0191    comb
-         ldb   #E$UnkSvc
-         rts   
-
-* SetStat
-*
-* Entry:
-*    A  = function code
-*    Y  = address of path descriptor
-*    U  = address of device memory area
-*
-* Exit:
-*    CC = carry set on error
-*    B  = error code
-*
-SetStat  ldx   PD.RGS,y
-         cmpa  #SS.SSig
-         bne   L01B2
-         lda   PD.CPR,y
-         ldb   R$X+1,x
-         orcc  #IntMasks
-         tst   <u001F,u
-         bne   L01AB
-         std   <u0025,u
-         bra   L015E
-L01AB    andcc #^IntMasks
-         os9   F$Send
-         clrb
-         rts
-L01B2    cmpa  #SS.Open
-         beq   L01FA
-         cmpa  #SS.Close
-         beq   L020A
-         cmpa  #SS.Relea
-         bne   L01C9
-         lda   PD.CPR,y
-         cmpa  <u0025,u
-         bne   L016F
-         clr   <u0025,u
-         rts
-L01C9    cmpa  #SS.ComSt
-         bne   L0191
-         ldd   R$Y,x
-L01CF    std   <u0028,u
-         andb  #$E0
-         pshs  b
-         ldb   <u0029,u
-         andb  #$07
-         leax  <L01F2,pcr
-         ldb   b,x
-         orb   ,s+
-         anda  #$E0
-         sta   V.TYPE,u
-         ldx   V.PORT,u
-         lda   $02,x
-         anda  #$1F
-         ora   V.TYPE,u
-         std   $02,x
-         bra   L0227
-L01F2    fdb   $1316,$1718,$1a1c,$1e1f
-L01FA    ldb   #$09
-         lda   R$Y+1,x
-         cmpa  #$01
-         bne   L0227
-         orcc  #IntMasks
-         lbsr  L037D
-         lbra  L0086
-L020A    lda   R$Y+1,x
-         bne   L0227
-         ldb   #$0B
-         lda   <u0028,u
-         bita  #$10
-         beq   L0218
-L0217    clrb
-L0218    pshs  b
-         bsr   L022C
-         bcs   L0217
-         puls  b
-         orcc  #IntMasks
-         lbsr  L037D
-         andcc #^IntMasks
-L0227    clrb
-         rts
-
-L0229    lbsr  L00FF
-L022C    ldb   <u0020,u
-         orcc  #IntMasks
-         cmpb  <u0021,u
-         bne   L0229
-         rts
-
-* Term
-*
-* Entry:
-*    U  = address of device memory area
-*
-* Exit:
-*    CC = carry set on error
-*    B  = error code
-*
-Term     ldx   <D.Proc
-         lda   P$ID,x
-         sta   V.BUSY,u
-         sta   V.LPRC,u
-         bsr   L0217
-         ldd   <orgDFIRQ,u		get saved D.FIRQ vector
-         std   <D.FIRQ			and put it back in system global
-         ldx   #$0000
-         os9   F$IRQ    		deinstall IRQ svc routine
-         clrb
-         rts
-
-* ISR
-L024E    ldb   >PIA1Base+2
-         ldx   V.PORT,u
-         sta   <u0027,u
-         tfr   a,b
-         andb  #$60
-         cmpb  <u0024,u
-         beq   L0299
-         tfr   b,a
-         eorb  <u0024,u
-         sta   <u0024,u
-         lda   <u0027,u
-         bitb  #$20
-         beq   L028C
-         bita  #$20
-         beq   L028C
-         lda   <u0028,u
-         bita  #$10
-         beq   L02EC
-         ldx   <V.PDLHd,u
-         beq   L0286
-L027E    inc   <PD.PST,x
-         ldx   <PD.PLP,x
-         bne   L027E
-L0286    lda   #$20
-         bsr   L02F6
-         bra   L02E1
-L028C    bitb  #$40
-         beq   L02EC
-         bita  #$40
-         lbne  L03AF
-         lbra  L039E
-L0299    bita  #$08
-         bne   L02FB
-         bita  #$10
-         beq   L02EC
-         lda   <u0023,u
-         bpl   L02B6
-         anda  #$7F
-         sta   ,x
-         eora  V.XON,u
-         sta   <u0023,u
-         lda   <u0022,u
-         bne   L02DC
-         bra   L02EC
-L02B6    leay  <u007E,u
-         ldb   <u0021,u
-         cmpb  <u0020,u
-         beq   L02D4
-         clra
-         lda   d,y
-         incb
-         cmpb  #$81
-         bls   L02CA
-         clrb
-L02CA    stb   <u0021,u
-         sta   ,x
-         cmpb  <u0020,u
-         bne   L02E1
-L02D4    lda   <u0022,u
-         ora   #$02
-         sta   <u0022,u
-L02DC    ldb   #$09
-         lbsr  L037F
-L02E1    ldb   #$01
-         lda   V.WAKE,u
-L02E5    beq   L02EC
-         clr   V.WAKE,u
-L02E9    os9   F$Send   
-L02EC    ldx   V.PORT,u
-         lda   $01,x
-         lbmi  L024E
-         clrb  
-         rts   
-L02F6    ora   V.ERR,u
-         sta   V.ERR,u
-         rts   
-L02FB    bita  #$07
-         beq   L030F
-         tfr   a,b
-         tst   ,x
-         anda  #$07
-         bsr   L02F6
-         lda   $02,x
-         sta   $01,x
-         sta   $02,x
-         bra   L02EC
-L030F    lda   ,x
-         beq   L032A
-         cmpa  V.INTR,u
-         beq   L038D
-         cmpa  V.QUIT,u
-         beq   L0391
-         cmpa  V.PCHR,u
-         beq   L0385
-         cmpa  V.XON,u
-         beq   L039E
-         cmpa  <V.XOFF,u
-         lbeq  L03AF
-L032A    leax  <u002E,u
-         ldb   <u001D,u
-         abx   
-         sta   ,x
-         incb  
-         cmpb  #$4F
-         bls   L0339
-         clrb  
-L0339    cmpb  <u001E,u
-         bne   L0344
-         lda   #$04
-         bsr   L02F6
-         bra   L02E1
-L0344    stb   <u001D,u
-         inc   <u001F,u
-         tst   <u0025,u
-         beq   L0357
-         ldd   <u0025,u
-         clr   <u0025,u
-         bra   L02E9
-L0357    lda   <V.XOFF,u
-         beq   L02E1
-         ldb   <u001F,u
-         cmpb  #$46
-         lbcs  L02E1
-         ldb   <u0023,u
-         lbne  L02E1
-         anda  #$7F
-         sta   <V.XOFF,u
-         ora   #$80
-         sta   <u0023,u
-         ldb   #$05
-         bsr   L037D
-         lbra  L02E1
-L037D    ldx   V.PORT,u
-L037F    orb   V.TYPE,u
-         stb   $02,x
-         clrb  
-         rts   
-L0385    ldx   V.DEV2,u
-         beq   L032A
-         sta   V.PAUS,x
-         bra   L032A
-L038D    ldb   #S$Intrpt
-         bra   L0393
-L0391    ldb   #S$Abort
-L0393    pshs  a
-         lda   V.LPRC,u
-         lbsr  L02E5
-         puls  a
-         bra   L032A
-L039E    lda   <u0022,u
-         anda  #$FE
-         sta   <u0022,u
-         bne   L03AC
-         ldb   #$05
-         bsr   L037F
-L03AC    lbra  L02EC
-L03AF    lda   <u0022,u
-         bne   L03B8
-         ldb   #$09
-         bsr   L037F
-L03B8    ora   #$01
-         sta   <u0022,u
-         bra   L03AC
-
-	 emod
-eom      equ   *
-         end
-
--- a/level1/modules/m1.asm	Mon Dec 15 15:00:30 2003 +0000
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,66 +0,0 @@
-********************************************************************
-* M1 - Tandy DC Modem Pak device descriptor
-*
-* $Id$
-*
-* Ed.    Comments                                       Who YY/MM/DD
-* ------------------------------------------------------------------
-*        From Tandy OS-9 Level One VR 02.00.00
-
-         nam   M1
-         ttl   Tandy DC Modem Pak device descriptor
-
-* Disassembled 98/08/23 21:15:12 by Disasm v1.6 (C) 1988 by RML
-
-         ifp1  
-         use   defsfile
-         use   scfdefs
-         endc  
-
-tylg     set   Devic+Objct
-atrv     set   ReEnt+rev
-rev      set   $00
-
-         mod   eom,name,tylg,atrv,mgrnam,drvnam
-
-         fcb   READ.+WRITE. mode byte
-         fcb   HW.Page    extended controller address
-         fdb   $FF6C      physical controller address
-         fcb   initsize-*-1 initilization table size
-         fcb   DT.SCF     device type:0=scf,1=rbf,2=pipe,3=scf
-         fcb   $00        case:0=up&lower,1=upper only
-         fcb   $01        backspace:0=bsp,1=bsp then sp & bsp
-         fcb   $00        delete:0=bsp over line,1=return
-         fcb   $01        echo:0=no echo
-         fcb   $01        auto line feed:0=off
-         fcb   $00        end of line null count
-         fcb   $01        pause:0=no end of page pause
-         fcb   24         lines per page
-         fcb   C$BSP      backspace character
-         fcb   C$DEL      delete line character
-         fcb   C$CR       end of record character
-         fcb   C$EOF      end of file character
-         fcb   C$RPRT     reprint line character
-         fcb   C$RPET     duplicate last line character
-         fcb   C$PAUS     pause character
-         fcb   C$INTR     interrupt character
-         fcb   C$QUIT     quit character
-         fcb   C$BSP      backspace echo character
-         fcb   C$BELL     line overflow character (bell)
-         fcb   PARNONE    init value for dev ctl reg
-         fcb   B300+WORD8+STOP1       baud rate
-         fdb   name       copy of descriptor name address
-         fcb   C$XON      acia xon char
-         fcb   C$XOFF     acia xoff char
-         fcb   80         (szx) number of columns for display
-         fcb   24         (szy) number of rows for display
-initsize equ   *
-
-name     fcs   /M1/
-mgrnam   fcs   /SCF/
-drvnam   fcs   /ACIAPAK/
-
-         emod  
-eom      equ   *
-         end   
-
--- a/level1/modules/m2.asm	Mon Dec 15 15:00:30 2003 +0000
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,66 +0,0 @@
-********************************************************************
-* M2 - Tandy DC Modem Pak device descriptor
-*
-* $Id$
-*
-* Ed.    Comments                                       Who YY/MM/DD
-* ------------------------------------------------------------------
-*        From Tandy OS-9 Level One VR 02.00.00
-
-         nam   M2
-         ttl   Tandy DC Modem Pak device descriptor
-
-* Disassembled 98/08/23 21:15:12 by Disasm v1.6 (C) 1988 by RML
-
-         ifp1  
-         use   defsfile
-         use   scfdefs
-         endc  
-
-tylg     set   Devic+Objct
-atrv     set   ReEnt+rev
-rev      set   $00
-
-         mod   eom,name,tylg,atrv,mgrnam,drvnam
-
-         fcb   READ.+WRITE. mode byte
-         fcb   HW.Page    extended controller address
-         fdb   $FF6C      physical controller address
-         fcb   initsize-*-1 initilization table size
-         fcb   DT.SCF     device type:0=scf,1=rbf,2=pipe,3=scf
-         fcb   $00        case:0=up&lower,1=upper only
-         fcb   $01        backspace:0=bsp,1=bsp then sp & bsp
-         fcb   $00        delete:0=bsp over line,1=return
-         fcb   $01        echo:0=no echo
-         fcb   $01        auto line feed:0=off
-         fcb   $00        end of line null count
-         fcb   $01        pause:0=no end of page pause
-         fcb   24         lines per page
-         fcb   C$BSP      backspace character
-         fcb   C$DEL      delete line character
-         fcb   C$CR       end of record character
-         fcb   C$EOF      end of file character
-         fcb   C$RPRT     reprint line character
-         fcb   C$RPET     duplicate last line character
-         fcb   C$PAUS     pause character
-         fcb   C$INTR     interrupt character
-         fcb   C$QUIT     quit character
-         fcb   C$BSP      backspace echo character
-         fcb   C$BELL     line overflow character (bell)
-         fcb   PARNONE    init value for dev ctl reg
-         fcb   B300+WORD8+STOP1       baud rate
-         fdb   name       copy of descriptor name address
-         fcb   C$XON      acia xon char
-         fcb   C$XOFF     acia xoff char
-         fcb   80         (szx) number of columns for display
-         fcb   24         (szy) number of rows for display
-initsize equ   *
-
-name     fcs   /M2/
-mgrnam   fcs   /SCF/
-drvnam   fcs   /MODPAK/
-
-         emod  
-eom      equ   *
-         end   
-
--- a/level1/modules/modpak.asm	Mon Dec 15 15:00:30 2003 +0000
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,535 +0,0 @@
-********************************************************************
-* MODPAK - DC Modem Pak device driver
-*
-* $Id$
-*
-* Ed.    Comments                                       Who YY/MM/DD
-* ------------------------------------------------------------------
-*  10    From Tandy OS-9 Level One VR 02.00.00
-
-         nam   MODPAK
-         ttl   DC Modem Pak device driver
-
-* Disassembled 98/08/23 17:41:18 by Disasm v1.6 (C) 1988 by RML
-
-         ifp1
-         use   defsfile
-         use   scfdefs
-         endc
-
-tylg     set   Drivr+Objct   
-atrv     set   ReEnt+rev
-rev      set   $00
-edition  set   $0A
-
-         mod   eom,name,tylg,atrv,start,size
-
-         rmb   V.SCF		SCF storage requirements
-u001D    rmb   1
-u001E    rmb   1
-u001F    rmb   1
-u0020    rmb   1
-u0021    rmb   1
-u0022    rmb   1
-u0023    rmb   1
-u0024    rmb   1
-u0025    rmb   2
-u0027    rmb   1
-u0028    rmb   1
-u0029    rmb   1
-u002A    rmb   1
-u002B    rmb   1
-u002C    rmb   5
-u0031    rmb   26
-u004B    rmb   53
-u0080    rmb   1
-u0081    rmb   45
-u00AE    rmb   82
-size     equ   .
-
-         fcb   UPDAT.
-
-name     fcs   /MODPAK/
-         fcb   edition
-
-start    lbra  Init
-         lbra  Read
-         lbra  Write
-         lbra  GetStat
-         lbra  SetStat
-         lbra  Term
-
-IRQPckt  fcb   $00,$80,$0a
-
-* Init
-*
-* Entry:
-*    Y  = address of device descriptor
-*    U  = address of device memory area
-*
-* Exit:
-*    CC = carry set on error
-*    B  = error code
-*
-Init     ldx   V.PORT,u
-         stb   $01,x
-         ldd   <IT.COL,y		get column size
-         std   <u002A,u
-         ldd   <IT.PAR,y		get parity/baud
-         lbsr  L01A9
-         ldd   V.PORT,u
-         addd  #$0001
-         leax  >IRQPckt,pcr
-         leay  >L022C,pcr
-         os9   F$IRQ    
-         bcs   L0061
-         leay  <u002C,u
-         lda   #$80
-         sta   $04,y
-         ldd   #$0001
-         std   $02,y
-         ldx   #$0001
-         os9   F$VIRQ   
-         bcs   L0061
-         clrb  
-L0061    rts   
-L0062    orcc  #IntMasks
-         lda   ,x
-         lda   ,x
-         lda   $01,x
-         ldb   $01,x
-         ldb   $01,x
-         bmi   L00D4
-         lda   #$02
-         sta   <u0022,u
-         clra  
-         andb  #$60
-         std   <u0023,u
-         clrb  
-         std   <u001D,u
-         std   <u0020,u
-         sta   <u001F,u
-         std   <u0025,u
-         andcc #^IntMasks
-         rts   
-
-* Read
-*
-* Entry:
-*    Y  = address of path descriptor
-*    U  = address of device memory area
-*
-* Exit:
-*    A  = character read
-*    CC = carry set on error
-*    B  = error code
-*
-L008B    bsr   L00D8
-Read     lda   <u0023,u
-         ble   L00A5
-         ldb   <u001F,u
-         cmpb  #$0A
-         bhi   L00A5
-         ldb   V.XON,u
-         orb   #$80
-         stb   <u0023,u
-         ldb   #$05
-         lbsr  L0359
-L00A5    tst   <u0025,u
-         bne   L00D4
-         ldb   <u001E,u
-         leax  <u0031,u
-         orcc  #IntMasks
-         cmpb  <u001D,u
-         beq   L008B
-         abx   
-         lda   ,x
-         dec   <u001F,u
-         incb  
-         cmpb  #$4F
-         bls   L00C3
-         clrb  
-L00C3    stb   <u001E,u
-         ldb   V.ERR,u
-         beq   L0138
-         stb   <$3A,y
-         clr   V.ERR,u
-         comb  
-         ldb   #E$Read
-         bra   L0139
-L00D4    comb  
-         ldb   #E$NotRdy
-         rts   
-L00D8    pshs  x,b,a
-         lda   V.BUSY,u
-         sta   V.WAKE,u
-         andcc #^IntMasks
-         ldx   #$0000
-         os9   F$Sleep  
-         ldx   <D.Proc
-         ldb   <P$Signal,x
-         beq   L00F1
-         cmpb  #S$Intrpt
-         bls   L0107
-L00F1    clra  
-         lda   P$State,x
-         bita  #Condem
-         bne   L0107
-         ldb   #$DC
-         lda   V.ERR,u
-         bita  #TimOut
-         bne   L0102
-         puls  pc,x,b,a
-L0102    inc   <$3F,y
-         clr   V.ERR,u
-L0107    leas  $06,s
-         coma  
-         rts   
-
-* Write
-*
-* Entry:
-*    A  = character to write
-*    Y  = address of path descriptor
-*    U  = address of device memory area
-*
-* Exit:
-*    CC = carry set on error
-*    B  = error code
-*
-L010B    bsr   L00D8
-Write    leax  >u0081,u
-         ldb   <u0020,u
-         abx   
-         sta   ,x
-         incb  
-         cmpb  #$7E
-         bls   L011D
-         clrb  
-L011D    orcc  #IntMasks
-         cmpb  <u0021,u
-         beq   L010B
-         stb   <u0020,u
-         lda   <u0022,u
-         beq   L0138
-         anda  #$FD
-         sta   <u0022,u
-         bne   L0138
-         ldb   #$05
-         lbsr  L0359
-L0138    clrb  
-L0139    andcc #^IntMasks
-         rts   
-
-* GetStat
-*
-* Entry:
-*    A  = function code
-*    Y  = address of path descriptor
-*    U  = address of device memory area
-*
-* Exit:
-*    CC = carry set on error
-*    B  = error code
-*
-GetStat  ldx   $06,y
-         cmpa  #$01
-         bne   L014B
-         ldb   <u001F,u
-         beq   L00D4
-         stb   $02,x
-L0149    clrb  
-         rts   
-L014B    cmpa  #$06
-         beq   L0149
-         cmpa  #$26
-         beq   L015E
-         cmpa  #$28
-         bne   L016B
-         ldd   <u0028,u
-         std   $06,x
-         bra   L0149
-L015E    clra  
-         ldb   <u002A,u
-         std   $04,x
-         ldb   <u002B,u
-         std   $06,x
-         bra   L0149
-L016B    comb  
-         ldb   #E$UnkSvc
-         rts   
-
-* SetStat
-*
-* Entry:
-*    A  = function code
-*    Y  = address of path descriptor
-*    U  = address of device memory area
-*
-* Exit:
-*    CC = carry set on error
-*    B  = error code
-*
-SetStat  ldx   $06,y
-         cmpa  #$1A
-         bne   L018C
-         lda   $05,y
-         ldb   $05,x
-         orcc  #IntMasks
-         tst   <u001F,u
-         bne   L0185
-         std   <u0025,u
-         bra   L0138
-L0185    andcc #^IntMasks
-         os9   F$Send   
-         clrb  
-         rts   
-L018C    cmpa  #$29
-         beq   L01D4
-         cmpa  #$2A
-         beq   L01E4
-         cmpa  #$1B
-         bne   L01A3
-         lda   $05,y
-         cmpa  <u0025,u
-         bne   L0149
-         clr   <u0025,u
-         rts   
-L01A3    cmpa  #$28
-         bne   L016B
-         ldd   $06,x
-L01A9    std   <u0028,u
-         andb  #$E0
-         pshs  b
-         ldb   <u0029,u
-         andb  #$07
-         leax  <L01CC,pcr
-         ldb   b,x
-         orb   ,s+
-         anda  #$E0
-         sta   V.TYPE,u
-         ldx   V.PORT,u
-         lda   $02,x
-         anda  #$1F
-         ora   V.TYPE,u
-         std   $02,x
-         bra   L0201
-L01CC    fcb   $13,$16,$17,$18,$1a,$1c,$1e,$1f
-L01D4    ldb   #$09
-         lda   $07,x
-         cmpa  #$01
-         bne   L0201
-         orcc  #IntMasks
-         lbsr  L0359
-         lbra  L0062
-L01E4    lda   $07,x
-         bne   L0201
-         ldb   #$0B
-         lda   <u0028,u
-         bita  #$10
-         beq   L01F2
-L01F1    clrb  
-L01F2    pshs  b
-         bsr   L0206
-         bcs   L01F1
-         puls  b
-         orcc  #IntMasks
-         lbsr  L0359
-         andcc #^IntMasks
-L0201    clrb  
-         rts   
-L0203    lbsr  L00D8
-L0206    ldb   <u0020,u
-         orcc  #IntMasks
-         cmpb  <u0021,u
-         bne   L0203
-         rts   
-
-* Term
-*
-* Entry:
-*    U  = address of device memory area
-*
-* Exit:
-*    CC = carry set on error
-*    B  = error code
-*
-Term     ldx   <D.Proc
-         lda   P$ID,x
-         sta   V.BUSY,u
-         sta   V.LPRC,u
-         bsr   L01F1
-         ldx   #$0000
-         leay  <u002C,u
-         os9   F$VIRQ   
-         ldx   #$0000
-         os9   F$IRQ    
-         clrb  
-         rts   
-L022C    ldx   V.PORT,u
-         sta   <u0027,u
-         tfr   a,b
-         andb  #$60
-         cmpb  <u0024,u
-         beq   L0274
-         tfr   b,a
-         eorb  <u0024,u
-         sta   <u0024,u
-         lda   <u0027,u
-         bitb  #$20
-         beq   L0267
-         bita  #$20
-         beq   L0267
-         lda   <u0028,u
-         bita  #$10
-         beq   L02C8
-         ldx   <V.PDLHd,u
-         beq   L0261
-L0259    inc   <$3F,x
-         ldx   <$3D,x
-         bne   L0259
-L0261    lda   #$20
-         bsr   L02D2
-         bra   L02BD
-L0267    bitb  #$40
-         beq   L02C8
-         bita  #$40
-         lbne  L038B
-         lbra  L037A
-L0274    bita  #$08
-         bne   L02D7
-         bita  #$10
-         beq   L02C8
-         lda   <u0023,u
-         bpl   L0291
-         anda  #$7F
-         sta   ,x
-         eora  V.XON,u
-         sta   <u0023,u
-         lda   <u0022,u
-         bne   L02B8
-         bra   L02C8
-L0291    leay  >u0081,u
-         ldb   <u0021,u
-         cmpb  <u0020,u
-         beq   L02B0
-         clra  
-         lda   d,y
-         incb  
-         cmpb  #$7E
-         bls   L02A6
-         clrb  
-L02A6    stb   <u0021,u
-         sta   ,x
-         cmpb  <u0020,u
-         bne   L02BD
-L02B0    lda   <u0022,u
-         ora   #$02
-         sta   <u0022,u
-L02B8    ldb   #$09
-         lbsr  L035B
-L02BD    ldb   #$01
-         lda   V.WAKE,u
-L02C1    beq   L02C8
-         clr   V.WAKE,u
-L02C5    os9   F$Send   
-L02C8    ldx   V.PORT,u
-         lda   $01,x
-         lbmi  L022C
-         clrb  
-         rts   
-L02D2    ora   V.ERR,u
-         sta   V.ERR,u
-         rts   
-L02D7    bita  #$07
-         beq   L02EB
-         tfr   a,b
-         tst   ,x
-         anda  #$07
-         bsr   L02D2
-         lda   $02,x
-         sta   $01,x
-         sta   $02,x
-         bra   L02C8
-L02EB    lda   ,x
-         beq   L0306
-         cmpa  V.INTR,u
-         beq   L0369
-         cmpa  V.QUIT,u
-         beq   L036D
-         cmpa  V.PCHR,u
-         beq   L0361
-         cmpa  V.XON,u
-         beq   L037A
-         cmpa  <V.XOFF,u
-         lbeq  L038B
-L0306    leax  <u0031,u
-         ldb   <u001D,u
-         abx   
-         sta   ,x
-         incb  
-         cmpb  #$4F
-         bls   L0315
-         clrb  
-L0315    cmpb  <u001E,u
-         bne   L0320
-         lda   #$04
-         bsr   L02D2
-         bra   L02BD
-L0320    stb   <u001D,u
-         inc   <u001F,u
-         tst   <u0025,u
-         beq   L0333
-         ldd   <u0025,u
-         clr   <u0025,u
-         bra   L02C5
-L0333    lda   <V.XOFF,u
-         beq   L02BD
-         ldb   <u001F,u
-         cmpb  #$46
-         lbcs  L02BD
-         ldb   <u0023,u
-         lbne  L02BD
-         anda  #$7F
-         sta   <V.XOFF,u
-         ora   #$80
-         sta   <u0023,u
-         ldb   #$05
-         bsr   L0359
-         lbra  L02BD
-L0359    ldx   V.PORT,u
-L035B    orb   V.TYPE,u
-         stb   $02,x
-         clrb  
-         rts   
-L0361    ldx   V.DEV2,u
-         beq   L0306
-         sta   $08,x
-         bra   L0306
-L0369    ldb   #$03
-         bra   L036F
-L036D    ldb   #$02
-L036F    pshs  a
-         lda   V.LPRC,u
-         lbsr  L02C1
-         puls  a
-         bra   L0306
-L037A    lda   <u0022,u
-         anda  #$FE
-         sta   <u0022,u
-         bne   L0388
-         ldb   #$05
-         bsr   L035B
-L0388    lbra  L02C8
-L038B    lda   <u0022,u
-         bne   L0394
-         ldb   #$09
-         bsr   L035B
-L0394    ora   #$01
-         sta   <u0022,u
-         bra   L0388
-
-         emod
-eom      equ   *
-         end
-