Browse Source

added DOS_1570

master
Michael Steil 6 months ago
parent
commit
b5ff5c6e88
100 changed files with 22386 additions and 0 deletions
  1. +104
    -0
      DOS_1570/addfil.src
  2. +178
    -0
      DOS_1570/addrel.src
  3. +443
    -0
      DOS_1570/block.src
  4. +109
    -0
      DOS_1570/burst.src
  5. +221
    -0
      DOS_1570/close.src
  6. +60
    -0
      DOS_1570/com.src
  7. +51
    -0
      DOS_1570/common.src
  8. +207
    -0
      DOS_1570/cond.src
  9. +104
    -0
      DOS_1570/copall.src
  10. +80
    -0
      DOS_1570/copset.src
  11. +62
    -0
      DOS_1570/d.src
  12. +300
    -0
      DOS_1570/dskintsf.src
  13. +36
    -0
      DOS_1570/duplct.src
  14. +73
    -0
      DOS_1570/duplct1.src
  15. +59
    -0
      DOS_1570/equatesf.src
  16. +439
    -0
      DOS_1570/erproc.src
  17. +3
    -0
      DOS_1570/f.src
  18. +309
    -0
      DOS_1570/fastld.src
  19. +233
    -0
      DOS_1570/fastldold.src
  20. +1352
    -0
      DOS_1570/fastutl.src
  21. +1031
    -0
      DOS_1570/fastutlold.src
  22. +185
    -0
      DOS_1570/fndrel.src
  23. +371
    -0
      DOS_1570/frets.src
  24. +193
    -0
      DOS_1570/fstload.src
  25. +209
    -0
      DOS_1570/fstloadnew.src
  26. +873
    -0
      DOS_1570/fstutl.src
  27. +861
    -0
      DOS_1570/fstutlnew.src
  28. +195
    -0
      DOS_1570/g.src
  29. +281
    -0
      DOS_1570/gcr.src
  30. +243
    -0
      DOS_1570/gcrcntrl.src
  31. +282
    -0
      DOS_1570/gcrtable1.src
  32. +281
    -0
      DOS_1570/gcrtable2.src
  33. +281
    -0
      DOS_1570/gcrtable3.src
  34. +282
    -0
      DOS_1570/gcrtable4.src
  35. +281
    -0
      DOS_1570/gcrtable5.src
  36. +282
    -0
      DOS_1570/gcrtable6.src
  37. +281
    -0
      DOS_1570/gcrtable7.src
  38. +281
    -0
      DOS_1570/gcrtable8.src
  39. +274
    -0
      DOS_1570/gcrtables.src
  40. +90
    -0
      DOS_1570/getact.src
  41. +197
    -0
      DOS_1570/h.src
  42. +33
    -0
      DOS_1570/i.src
  43. +138
    -0
      DOS_1570/idlesf.src
  44. +147
    -0
      DOS_1570/idlesfold.src
  45. +60
    -0
      DOS_1570/iodefsf.src
  46. +33
    -0
      DOS_1570/irq.src
  47. +45
    -0
      DOS_1570/irq1.src
  48. +55
    -0
      DOS_1570/irq1541.src
  49. +46
    -0
      DOS_1570/irq1571.src
  50. +6
    -0
      DOS_1570/j.src
  51. +360
    -0
      DOS_1570/jobssf.src
  52. +258
    -0
      DOS_1570/lccbingcr.src
  53. +254
    -0
      DOS_1570/lccbngcr1.src
  54. +50
    -0
      DOS_1570/lcccnhdr1.src
  55. +216
    -0
      DOS_1570/lcccntrl.src
  56. +244
    -0
      DOS_1570/lcccntrl1.src
  57. +245
    -0
      DOS_1570/lcccntrl2.src
  58. +58
    -0
      DOS_1570/lccconhdr.src
  59. +232
    -0
      DOS_1570/lccend.src
  60. +181
    -0
      DOS_1570/lccfin1.src
  61. +221
    -0
      DOS_1570/lccfmt1.src
  62. +307
    -0
      DOS_1570/lccfmt2.src
  63. +351
    -0
      DOS_1570/lccfmt2a.src
  64. +106
    -0
      DOS_1570/lccfmt3.src
  65. +89
    -0
      DOS_1570/lccfmt3a.src
  66. +171
    -0
      DOS_1570/lccfmt4.src
  67. +41
    -0
      DOS_1570/lccfmt4a.src
  68. +287
    -0
      DOS_1570/lccgcrbin.src
  69. +164
    -0
      DOS_1570/lccgcrbn1.src
  70. +66
    -0
      DOS_1570/lccinit.src
  71. +67
    -0
      DOS_1570/lccio.src
  72. +138
    -0
      DOS_1570/lccread.src
  73. +238
    -0
      DOS_1570/lccread1.src
  74. +168
    -0
      DOS_1570/lccreed.src
  75. +221
    -0
      DOS_1570/lccseek.src
  76. +197
    -0
      DOS_1570/lccseek1.src
  77. +58
    -0
      DOS_1570/lccutil.src
  78. +194
    -0
      DOS_1570/lccutil1.src
  79. +423
    -0
      DOS_1570/lccvar.src
  80. +312
    -0
      DOS_1570/lccwrt.src
  81. +288
    -0
      DOS_1570/lccwrt1.src
  82. +100
    -0
      DOS_1570/lcgcrbin.src
  83. +51
    -0
      DOS_1570/leds.src
  84. +409
    -0
      DOS_1570/lookup.src
  85. +116
    -0
      DOS_1570/lstdir.src
  86. +133
    -0
      DOS_1570/map.src
  87. +62
    -0
      DOS_1570/memrw.src
  88. +632
    -0
      DOS_1570/mfmcntrl.src
  89. +120
    -0
      DOS_1570/mfmsubr.src
  90. +494
    -0
      DOS_1570/mfmsubr1.src
  91. +224
    -0
      DOS_1570/mfmsubr2.src
  92. +216
    -0
      DOS_1570/mfmsubr2old.src
  93. +148
    -0
      DOS_1570/mfmsubr3.src
  94. +122
    -0
      DOS_1570/new.src
  95. +105
    -0
      DOS_1570/newss.src
  96. +52
    -0
      DOS_1570/newvec.src
  97. +61
    -0
      DOS_1570/nulbuf.src
  98. +425
    -0
      DOS_1570/open.src
  99. +209
    -0
      DOS_1570/opnchnl.src
  100. +262
    -0
      DOS_1570/par.src

+ 104
- 0
DOS_1570/addfil.src View File

@@ -0,0 +1,104 @@
.page
.subttl 'addfil.src'
; add file to directory

addfil lda sa ; save variables
pha
lda lindx
pha
lda sector
pha
lda track
pha
lda #irsa
sta sa
jsr curblk ; use last accessed search
lda type
pha
lda fildrv
and #1
sta drvnum
ldx jobnum
eor lstjob,x
lsr a
bcc af08 ; same drive as required

ldx #1
stx delind ; look for deleted entry
jsr srchst
beq af15 ; all full, new sector
bne af20 ; found one

af08 lda delsec
beq af10 ; deleted entry not located
cmp sector
beq af20 ; sector is resident
sta sector
jsr drtrd ; read sector in
jmp af20

af10 lda #1 ; find deleted entry
sta delind
jsr search
bne af20
af15 jsr nxdrbk ; all full, new sector
lda sector
sta delsec
lda #2
sta delind
af20 lda delind
jsr setpnt
pla
sta type ; set type
cmp #reltyp
bne af25
ora #$80
af25
jsr putbyt
pla
sta filtrk ; ...table & entry
jsr putbyt
pla
sta filsec ; set sector link in...
jsr putbyt ; ...table & entry
jsr getact
tay
lda filtbl
tax
lda #16
jsr trname ; transfer name
ldy #16
lda #0 ; clear # of blocks &...
af30 sta (dirbuf),y ; ...& replace links
iny
cpy #27
bcc af30
lda type ; a relative file ?
cmp #reltyp
bne af50 ; no
ldy #16 ; yes
lda trkss ; get ss track
sta (dirbuf),y ; put in directory
iny
lda secss ; get ss sector
sta (dirbuf),y ; put in
iny
lda rec ; get record size
sta (dirbuf),y
af50 jsr drtwrt ; write it out
pla
sta lindx
tax
pla
sta sa
lda delsec
sta entsec
sta dsec,x
lda delind
sta entind
sta dind,x
lda type
sta pattyp
lda drvnum
sta fildrv
rts

+ 178
- 0
DOS_1570/addrel.src View File

@@ -0,0 +1,178 @@
.page
.subttl 'addrel.src'
;*********************************
;* addrel: add blocks to relative*
;* file. *
;* vars: *
;* regs: *
;* *
;*********************************

addrel
jsr setdrn
jsr ssend ; set up end of file
jsr posbuf
jsr dbset
lda ssind
sta r1 ; save ss index
lda ssnum
sta r0 ; save ss number
lda #0
sta r2 ; clear flag for one block

lda #0 ; clear for calculation...
sta recptr ; ...to 1st byte in record
jsr fndrel ; calc ss ptrs
addr1 ; entry for rel record fix
jsr numfre ; calc available...

ldy lindx ; record span?
ldx rs,y
dex
txa
clc
adc relptr
bcc ar10 ; no span

inc ssind ; inc ss ptrs & check
inc ssind ; inc ss ptrs & check
bne ar10
inc ssnum
lda #ssioff
sta ssind
ar10
lda r1
clc
adc #2
jsr setssp

lda ssnum
cmp #nssl
bcc ar25 ; valid range

ar20
lda #bigfil
jsr cmderr ; too many ss's
ar25
lda ssind ; calc # blocks needed...
sec ; ...& check against avail.
sbc r1
bcs ar30
sbc #ssioff-1
clc
ar30
sta t3 ; # ss indices
lda ssnum
sbc r0
sta t4 ; # ss needed

ldx #0 ; clear accum.
stx t1
stx t2
tax ; .x=# ss
jsr sscalc ; calc # of blocks needed

lda t2
bne ar35
ldx t1
dex
bne ar35

inc r2
ar35
cmp nbtemp+1
bcc ar40 ; ok!!
bne ar20
lda nbtemp
cmp t1
bcc ar20 ; not enuf blocks
ar40
lda #1
jsr drdbyt ; look at sector link
clc
adc #1 ; +1 is nr
ldx lindx
sta nr,x
jsr nxtts ; get next block...
jsr setlnk ; ...& set link.
lda r2
bne ar50 ; add one block

jsr wrtout ; write current last rec
ar45
jsr dblbuf ; switch bufs
jsr sethdr ; set hdr from t & s
jsr nxtts ; get another
jsr setlnk ; set up link
jsr nulbuf ; clean it out
jmp ar55
ar50
jsr dblbuf ; switch bufs
jsr sethdr ; set hdr from t & s
jsr nulbuf ; clean buffer
jsr nullnk ; last block =0,lstchr
ar55
jsr wrtout ; write buffer
jsr getlnk ; get t&s from link
lda track
pha ; save 'em
lda sector
pha
jsr gethdr ; now get hdr t&s
lda sector
pha ; save 'em
lda track
pha
jsr gsspnt ; check ss ptr
tax
bne ar60

jsr newss ; need another ss
lda #ssioff
jsr setssp ; .a=bt val
inc r0 ; advance ss count
ar60
pla
jsr putss ; record t&s...
pla
jsr putss ; ...in ss.
pla ; get t&s from link
sta sector
pla
sta track
beq ar65 ; t=0: that's all!!

lda r0
cmp ssnum
bne ar45 ; not even done yet

jsr gsspnt
cmp ssind
bcc ar45 ; almost done
beq ar50 ; one more block left
ar65
jsr gsspnt
pha
lda #0
jsr ssdir
lda #0
tay
sta (dirbuf),y
iny
pla
sec
sbc #1
sta (dirbuf),y
jsr wrtss ; write ss
jsr watjob
jsr mapout
jsr fndrel
jsr dblbuf ; get back to leading buffer
jsr sspos
bvs ar70
jmp positn
ar70
lda #lrf
jsr setflg
lda #norec
jsr cmderr

+ 443
- 0
DOS_1570/block.src View File

@@ -0,0 +1,443 @@
.page
.subttl 'block.src'

; rom 1.1 additions
; user commands

user ldy cmdbuf+1
cpy #'0
bne us10 ; 0 resets pntr

usrint jmp burst_routines
nop ; fill
nop ; fill
nop ; fill
nop ; fill
nop ; fill
nop ; fill

; lda #<ublock ; set default block add
; sta usrjmp
; lda #>ublock
; sta usrjmp+1
; rts

us10 jsr usrexc ; execute code by table
jmp endcmd

usrexc dey ; entry is(((index-1)and$f)*2)
tya
and #$f
asl a
tay

lda (usrjmp),y
sta ip
iny
lda (usrjmp),y
sta ip+1

;<><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><>

jmp ptch53 ; *** rom ds 05/21/85 ***
; jmp (ip)

;<><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><>
.page
; open direct access buffer
; from open "#"

opnblk lda lstdrv
sta drvnum
lda sa ; sa is destroyed by this patch
pha
jsr autoi ; init disk for proper channel assignment
pla ; restore sa
sta sa
ldx cmdsiz
dex
bne ob10

lda #1 ; get any buffer
jsr getrch
jmp ob30

ob05 lda #nochnl
jmp cmderr

ob10 ldy #1 ; buffer # is requested
jsr bp05
ldx filsec
cpx #bfcnt ; must be less than 6.
bcs ob05

lda #0
sta temp
sta temp+1
sec

ob15
rol temp
rol temp+1
dex
bpl ob15

lda temp
and bufuse
bne ob05 ; buffer is used
lda temp+1
and bufuse+1
bne ob05 ; buf is used

lda temp
ora bufuse ; set buffer as used
sta bufuse
lda temp+1
ora bufuse+1
sta bufuse+1

lda #0 ; set up channel
jsr getrch
ldx lindx
lda filsec
sta buf0,x
tax
lda drvnum
sta jobs,x
sta lstjob,x

ob30 ldx sa
lda lintab,x ; set lindx table
ora #$40
sta lintab,x

ldy lindx
lda #$ff
sta lstchr,y

lda #rndrdy
sta chnrdy,y ; set channel ready

lda buf0,y
sta chndat,y ; buffer # as 1st char
asl a
tax
lda #1
sta buftab,x
lda #dirtyp+dirtyp
sta filtyp,y ; set direct file type
jmp endcmd
.page

; block commands

block ldy #0
ldx #0
lda #'- ; "-" separates cmd from subcmd
jsr parse ; locate sub-cmd
bne blk40

blk10 lda #badcmd
jmp cmderr

blk30 lda #badsyn
jmp cmderr

blk40 txa
bne blk30

ldx #nbcmds-1 ; find command
lda cmdbuf,y
blk50 cmp bctab,x
beq blk60
dex
bpl blk50
bmi blk10

blk60
txa
ora #$80
sta cmdnum
jsr blkpar ; parse parms

lda cmdnum
asl a
tax
lda bcjmp+1,x
sta temp+1
lda bcjmp,x
sta temp

jmp (temp) ; goto command

bctab .byte 'AFRWEP'
nbcmds =*-bctab

bcjmp .word blkalc ; block-allocate
.word blkfre ; block-free
.word blkrd ; block-read
.word blkwt ; block-write
.word blkexc ; block-execute
.word blkptr ; block-pointer

blkpar ldy #0 ; parse block parms
ldx #0
lda #':
jsr parse
bne bp05 ; found ":"

ldy #3 ; else char #3 is beginning
bp05 lda cmdbuf,y
cmp #'
beq bp10

cmp #29 ; skip character
beq bp10

cmp #',
bne bp20

bp10 iny
cpy cmdsiz
bcc bp05

rts ; that's all

bp20 jsr aschex
inc f1cnt
ldy f2ptr
cpx #mxfils-1
bcc bp10

bcs blk30 ; bad syntax

; convert ascii to hex (binary)
; & store conversion in tables
; .y= ptr into cmdbuf
aschex lda #0
sta temp
sta temp+1
sta temp+3

ldx #$ff
ah10 lda cmdbuf,y ; test for dec #
cmp #$40
bcs ah20 ; non-numeric terminates
cmp #$30
bcc ah20 ; non-numeric

and #$f
pha
lda temp+1 ; shift digits (*10)
sta temp+2
lda temp
sta temp+1
pla
sta temp
iny
cpy cmdsiz
bcc ah10 ; still in string

ah20 sty f2ptr ; convert digits to...
clc ; ...binary by dec table
lda #0

ah30 inx
cpx #3
bcs ah40

ldy temp,x
ah35 dey
bmi ah30

adc dectab,x
bcc ah35

clc
inc temp+3
bne ah35

ah40 pha
ldx f1cnt
lda temp+3
sta filtrk,x ; store result in table
pla
sta filsec,x
rts

dectab .byte 1,10,100 ; decimal table

;block-free
blkfre jsr blktst
jsr frets
jmp endcmd

;block-allocate

lda #1
sta wbam
blkalc
jsr blktst

ba10
lda sector
pha
jsr getsec
beq ba15 ; none greater on this track
pla
cmp sector
bne ba30 ; requested sector not avail
jsr wused
jmp endcmd

ba15
pla ; pop stack
ba20
lda #0
sta sector
inc track
lda track
cmp maxtrk
bcs ba40 ; gone all the way

jsr getsec
beq ba20
ba30
lda #noblk
jsr cmder2
ba40
lda #noblk
jsr cmderr ; t=0,s=0 :none left


; block read subs
blkrd2 jsr bkotst ; test parms
jmp drtrd

getsim jsr getpre ; get byte w/o inc
lda (buftab,x)
rts

; block read
blkrd3 jsr blkrd2
lda #0
jsr setpnt
jsr getsim ; y=lindx

sta lstchr,y
lda #rndrdy
sta chnrdy,y
rts
blkrd
jsr blkrd3
jsr rnget1
jmp endcmd

;user direct read, lstchr=$ff
ublkrd
jsr blkpar
jsr blkrd3
lda lstchr,y
sta chndat,y
lda #$ff
sta lstchr,y
jmp endcmd ; (rts)

;block-write
blkwt jsr bkotst

jsr getpnt
tay
dey
cmp #2
bcs bw10
ldy #1

bw10 lda #0 ; set record size
jsr setpnt
tya
jsr putbyt
txa
pha

bw20 jsr drtwrt ; write block
pla
tax

; jsr rnget2
jsr ptch15 ; fix for block read *rom ds 01/22/85*

jmp endcmd

;user dirct write, no lstchr
ublkwt jsr blkpar
jsr bkotst
jsr drtwrt
jmp endcmd

;block-execute
blkexc
jsr killp ; kill protect
jsr blkrd2 ; read block & execute
lda #0

be05 sta temp
ldx jobnum
lda bufind,x
sta temp+1
jsr be10 ; indirect jsr
jmp endcmd

be10 jmp (temp)

;buffer-pointer, set buffer pointer
blkptr jsr buftst
lda jobnum
asl a
tax
lda filsec+1
sta buftab,x
jsr getpre
jsr rnget2 ; set up get
jmp endcmd

;test for allocated buffer..
; ..related to sa
buftst ldx f1ptr
inc f1ptr
lda filsec,x
tay
dey
dey
cpy #$c ; set limit to # of sas
bcc bt20

bt15 lda #nochnl
jmp cmderr

bt20 sta sa
jsr fndrch
bcs bt15
jsr getact
sta jobnum
rts

;test block operation parms
bkotst jsr buftst
;
;test for legal block &..
; ..set up drv, trk, sec
blktst ldx f1ptr
lda filsec,x
and #1
sta drvnum
lda filsec+2,x
sta sector
lda filsec+1,x
sta track
bt05
jsr tschk
jmp setlds ; (rts)

; rsr 1/19/80 add autoi to #cmd

+ 109
- 0
DOS_1570/burst.src View File

@@ -0,0 +1,109 @@
.page
.subttl 'burst'
*=$8000

signature_lo .byte $FF ; <<<< TO BE DETERMINED
signature_hi .byte $FF ; <<<< TO BE DETERMINED


.byte 'S/W - DAVID G SIRACUSA',$0D,"H/W - GREG BERLIN",$0D,'1985',$0D

burst_routines

lda cmdsiz ; check command size
cmp #3
bcc realus

lda cmdbuf+2 ; get command
sta switch ; save info
and #$1f
tax ; command info
asl a
tay
lda cmdtbb,y
sta ip
lda cmdtbb+1,y
sta ip+1
cpx #30 ; utload ok for 1541 mode
beq 1$

lda pota1
and #$20 ; 1/2 Mhz ?
beq realus ; 1541 mode...ignore

1$ lda fastsr ; clear clock & error return
and #$be
sta fastsr

lda cmdctl,x ; most sig bit set set error recover
sta cmdbuf+2 ; save info here

;<><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><>

jmp ptch63 ; *** rom ds 05/15/86 ***
; jmp (ip)

;<><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><>

realus lda #<ublock ; set default block add
sta usrjmp
lda #>ublock
sta usrjmp+1
unused rts

.page

; command tables and information

cmdctl .byte $80,$81,$90,$91,$b0,$b1,$f0,$f1,$00,$01,$B0,$01,$00,$01,$00,$01
.byte $80,$81,$90,$91,$b0,$b1,$f0,$f1,$00,$01,$B0,$01,$00,$01,$00,$80

cmdtbb .word fstrd ; fast read drv #0 - 0000
.word ndkrd ; fast read drv #1 - 0001

.word fstwrt ; fast write drv #0 - 0010
.word ndkwrt ; fast write drv #1 - 0011

.word fstsek ; seek disk drv #0 - 0100
.word ndkrd ; seek disk drv #1 - 0101

.word fstfmt ; format disk drv #0 - 0110
.word fstfmt ; format disk drv #1 - 0111

.word cpmint ; interleave disk drv #0 - 1000
.word cpmint ; interleave disk drv #1 - 1001

.word querdk ; query disk format - 1010
.word ndkrd ; seek disk drv #1 - 1011

.word inqst ; return disk status - 1100
.word ndkrd ; return disk status - 1101

.word duplc1 ; backup drv0 to drv1 - 1110
.word duplc1 ; backup drv1 to drv0 - 1111

; *****************************************************************
.word fstrd ; fast read drv #0 - 0000
.word ndkrd ; fast read drv #1 - 0001

.word fstwrt ; fast write drv #0 - 0010
.word ndkwrt ; fast write drv #1 - 0011

.word fstsek ; seek disk drv #0 - 0100
.word ndkrd ; seek disk drv #1 - 0101

.word fstfmt
.word fstfmt

.word unused
.word unused

.word querdk ; query disk format - 1010
.word ndkrd ; seek disk drv #1 - 1011

.word unused
.word unused

.word chgutl
.word fstload

+ 221
- 0
DOS_1570/close.src View File

@@ -0,0 +1,221 @@
.page
.subttl 'close.src'
; close the file associated with sa

close
lda #0
sta wbam
lda sa
bne cls10 ; directory close
lda #0
sta dirlst ; clear dir list
jsr frechn
cls05
jmp freich
cls10
cmp #$f
beq clsall ; close cmd chanl
jsr clschn ; close channel
lda sa
cmp #2
bcc cls05

lda erword
bne cls15 ; last command had an error
jmp endcmd
cls15
jmp scren1

clsall
lda #14
sta sa
cls20
jsr clschn
dec sa
bpl cls20
lda erword
bne cls25 ; last command had an error
jmp endcmd
cls25
jmp scren1

clschn
ldx sa
lda lintab,x
cmp #$ff
bne clsc28
rts
clsc28
and #$f
sta lindx

jsr typfil
cmp #dirtyp
beq clsc30 ; direct channel
cmp #reltyp
beq clsrel

jsr fndwch ; look for write channel
bcs clsc31

jsr clswrt ; close seq write
jsr clsdir ; close directory
clsc30
jsr mapout ; write bam
clsc31
jmp frechn

clsrel
jsr scrub
jsr dblbuf
jsr ssend
ldx ssnum
stx t4
inc t4
lda #0
sta t1
sta t2
lda ssind
sec
sbc #ssioff-2
sta t3
jsr sscalc
ldx lindx
lda t1
sta nbkl,x
lda t2
sta nbkh,x
lda #dyfile
jsr tstflg
beq clsr1
jsr clsdir
clsr1 jmp frechn

; close a write chanl

clswrt ; close seq write file
ldx lindx
lda nbkl,x
ora nbkh,x
bne clsw10 ; at least 1 block written

jsr getpnt
cmp #2
bne clsw10 ; at least 1 byte written

lda #cr
jsr putbyt
clsw10
jsr getpnt
cmp #2
bne clsw20 ; not mt buffer

jsr dblbuf ; switch bufs

ldx lindx
lda nbkl,x
bne clsw15
dec nbkh,x
clsw15
dec nbkl,x

lda #0
clsw20
sec
sbc #1 ; back up 1
pha ; save it
lda #0
jsr setpnt
jsr putbyt ; tlink=0
pla ; lstchr count
jsr putbyt

jsr wrtbuf ; write out last buffer
jsr watjob ; finish job up
jmp dblbuf ; make sure both bufs ok

; directory close on open write file

clsdir ldx lindx ; save lindx
stx wlindx ; &sa
lda sa
pha
lda dsec,x ; get directory sector
sta sector
lda dind,x ; get sector offset
sta index
lda filtyp,x ; drv # in filtyp
and #1
sta drvnum
lda dirtrk
sta track
jsr getact ; allocate a buffer
pha
sta jobnum
jsr drtrd ; read directory sector
ldy #0
lda bufind,x ; .x is job#
sta r0+1
lda index
sta r0
lda (r0),y
and #$20
beq clsd5
jsr typfil
cmp #reltyp
beq clsd6

lda (r0),y
and #$8f ; replace file
sta (r0),y
iny
lda (r0),y
sta track
sty temp+2
ldy #27 ; extract replacement link
lda (r0),y ; to last sector
pha
dey
lda (r0),y
bne clsd4
sta track
pla
sta sector
lda #$67
jsr cmder2
clsd4
pha
lda #0
sta (r0),y
iny
sta (r0),y
pla
ldy temp+2
sta (r0),y
iny
lda (r0),y
sta sector
pla
sta (r0),y
jsr delfil ; delete old file
jmp clsd6 ; set close bit
clsd5
lda (r0),y
and #$f
ora #$80
sta (r0),y
clsd6 ldx wlindx
ldy #28 ; set # of blocks
lda nbkl,x
sta (r0),y
iny
lda nbkh,x
sta (r0),y
pla
tax
lda #write ; write directory sector
ora drvnum
jsr doit
pla
sta sa
jmp fndwch ; restore lindx

+ 60
- 0
DOS_1570/com.src View File

@@ -0,0 +1,60 @@
.subttl 'com.src'
.page
;**********************************************
;* *
;* COMMODORE BUSINESS MACHINES SOFTWARE *
;* *
;**********************************************
;* *
;* 11 55555 77777 000 *
;* 1 5 7 0 00 *
;* 1 5555 7 0 0 0 *
;* 1 5 7 00 0 *
;* 11111 5555 7 000 *
;* *
;* FFFFFF AAAAAA SSSSSS TTTTTT *
;* F A A S T *
;* FFFF AAAAAA SSSSSS T *
;* F A A S T *
;* F A A SSSSSS T *
;* *
;* SSSSS EEEEE RRRRR IIIII AAAAA L *
;* S E R R I A A L *
;* SSSSS EEEE RRR I AAAAA L *
;* S E R R I A A L *
;* SSSSS EEEEE R R IIIII. A A LLLLL *
;* *
;* DDDD IIIII SSSSS K K *
;* D D I S K K *
;* D D I SSSSS KKK *
;* D D I S K K *
;* DDDD IIIII SSSSS K K *
;* *
;* *
;**********************************************
;* *
;* DISK OPERATING SYSTEM AND CONTROLLER *
;* ROUTINES. *
;* *
;* COPYRIGHT (C) 1985 BY *
;* COMMODORE BUSINESS MACHINES (CBM) *
;* *
;* DS *
;* *
;**********************************************
;
;**********************************************
;* THIS SOFTWARE IS FURNISHED FOR USE IN *
;* THE 1571 FAST SERIAL FLOPPY DISK DRIVE. *
;* *
;* COPIES THEREOF MAY NOT BE PROVIDED OR *
;* MADE AVAILABLE FOR USE ON ANY OTHER *
;* SYSTEM. *
;* *
;* THE INFORMATION IN THIS DOCUMENT IS *
;* SUBJECT TO CHANGE WITHOUT NOTICE. *
;* *
;* NO RESPONSIBILITY IS ASSUMED FOR *
;* RELIABILITY OF THIS SOFTWARE. *
;* *
;**********************************************

+ 51
- 0
DOS_1570/common.src View File

@@ -0,0 +1,51 @@
;**********************************************
;* *
;* commodore business machines software *
;* *
;**********************************************
;
;**********************************************
;* *
;* disk operating system and *
;* controller routines *
;* for the following cbm models: *
;* 1541 serial disk *
;* with single sa390 compatable drive *
;* copyright (c) 1982 by *
;* commodore business machines (cbm) *
;* *
;**********************************************

; ****listing date 18 jan 1984 ****

;**********************************************
;* this software is furnished for use in *
;* the single drive floppy disk unit only. *
;* *
;* copies thereof may not be provided or *
;* made available for use on any other *
;* system. *
;* *
;* the information in this document is *
;* subject to change without notice. *
;* *
;* no responsibility is assumed for *
;* reliability of this software. rsr *
;* *
;**********************************************
.page
; common area defines

*=0
jobs *=*+6 ; job que
hdrs *=*+12 ; job headers
dskid *=*+4 ; master copy of disk id
header *=*+5 ; image of last header
actjob *=*+1 ; controller's active job
wpsw *=*+2 ; write protect change flag
lwpt *=*+2 ; last state of wp switch
;
;
; .end
; rsr
; 09/10/'84 add '0' track sensor (rom05-bc) h.a

+ 207
- 0
DOS_1570/cond.src View File

@@ -0,0 +1,207 @@
.ife *-*-<*
nop ; fill address error
.endif
.ife *-*-<*+$13
nop ; fill address error
.endif
.end
*=$9003
test
lda #4
shit=test->test
.ife shit-3
nop ; fill address error
.endif
.ife *->*-$7
nop ; fill address error
.endif
.ife *->*-$b
nop ; fill address error
.endif
.ife *->*-$f
nop ; fill address error
.endif
.ife *->*-$13
nop ; fill address error
.endif
.ife *->*-$17
nop ; fill address error
.endif
.ife *->*-$1b
nop ; fill address error
.endif
.ife *->*-$f
nop ; fill address error
.endif
.ife *->*-$23
nop ; fill address error
.endif
.ife *->*-$27
nop ; fill address error
.endif
.ife *->*-$2b
nop ; fill address error
.endif
.ife *->*-$2f
nop ; fill address error
.endif
.ife *->*-$33
nop ; fill address error
.endif
.ife *->*-$37
nop ; fill address error
.endif
.ife *->*-$3b
nop ; fill address error
.endif
.ife *->*-$3f
nop ; fill address error
.endif
.ife *->*-$43
nop ; fill address error
.endif
.ife *->*-$47
nop ; fill address error
.endif
.ife *->*-$4b
nop ; fill address error
.endif
.ife *->*-$4f
nop ; fill address error
.endif
.ife *->*-$53
nop ; fill address error
.endif
.ife *->*-$57
nop ; fill address error
.endif
.ife *->*-$5b
nop ; fill address error
.endif
.ife *->*-$5f
nop ; fill address error
.endif
.ife *->*-$63
nop ; fill address error
.endif
.ife *->*-$67
nop ; fill address error
.endif
.ife *->*-$6b
nop ; fill address error
.endif
.ife *->*-$6f
nop ; fill address error
.endif
.ife *->*-$73
nop ; fill address error
.endif
.ife *->*-$77
nop ; fill address error
.endif
.ife *->*-$7b
nop ; fill address error
.endif
.ife *->*-$7f
nop ; fill address error
.endif
.ife *->*-$83
nop ; fill address error
.endif
.ife *->*-$87
nop ; fill address error
.endif
.ife *->*-$8b
nop ; fill address error
.endif
.ife *->*-$8f
nop ; fill address error
.endif
.ife *->*-$93
nop ; fill address error
.endif
.ife *->*-$97
nop ; fill address error
.endif
.ife *->*-$9b
nop ; fill address error
.endif
.ife *->*-$9f
nop ; fill address error
.endif
.ife *->*-$a3
nop ; fill address error
.endif
.ife *->*-$a7
nop ; fill address error
.endif
.ife *->*-$ab
nop ; fill address error
.endif
.ife *->*-$af
nop ; fill address error
.endif
.ife *->*-$b3
nop ; fill address error
.endif
.ife *->*-$b7
nop ; fill address error
.endif
.ife *->*-$bb
nop ; fill address error
.endif
.ife *->*-$bf
nop ; fill address error
.endif
.ife *->*-$c3
nop ; fill address error
.endif
.ife *->*-$c7
nop ; fill address error
.endif
.ife *->*-$cb
nop ; fill address error
.endif
.ife *->*-$cf
nop ; fill address error
.endif
.ife *->*-$d3
nop ; fill address error
.endif
.ife *->*-$d7
nop ; fill address error
.endif
.ife *->*-$db
nop ; fill address error
.endif
.ife *->*-$df
nop ; fill address error
.endif
.ife *->*-$e3
nop ; fill address error
.endif
.ife *->*-$e7
nop ; fill address error
.endif
.ife *->*-$eb
nop ; fill address error
.endif
.ife *->*-$ef
nop ; fill address error
.endif
.ife *->*-$f3
nop ; fill address error
.endif
.ife *->*-$f7
nop ; fill address error
.endif
.ife *->*-$fb
nop ; fill address error
.endif
.ife *->*-$ff
nop ; fill address error
.endif
.endif

lda #4
.end

+ 104
- 0
DOS_1570/copall.src View File

@@ -0,0 +1,104 @@
.page
.subttl 'copall.src'

; set up subroutine

pups1 lda #0
sta rec
sta drvcnt
sta filtrk
sta filtrk+1
lda fildrv+1 ; get drive number
and #1 ; only
sta drvnum
ora #1
sta delsec ; nonzero
lda filtbl+1 ; fn1=fn2
sta filtbl
rts
.nlist
;.end
.page 'copy all'
;
; copy disk to disk routines
;
;cpydtd lda filtbl+1 ; save in temp
; sta temp
; ldy #40 ; 40 char buffer
; ldx cmdsiz ; prep to move
; sty cmdsiz ; end of filename2
;movlp1 dey
; dex
; lda cmdbuf,x ; mov fn lifo
; sta cmdbuf,y
; cpx temp ; actual f2 val
; bne movlp1
; sty filtbl+1 ; pointer to f2
;movlp2 jsr optsch
; jsr pups1 ; setup first pass
; jsr ffst ; first match
; bpl fixit ; entry found?
; bmi endit ; no
;;
;exlp0 pla ; pull needed vars
; sta dirsec
; pla
; sta filtbl+1
; pla
; sta lstbuf
; pla
; sta filcnt
; pla
; sta index
; pla
; sta found
; pla
; sta delind
; pla
; sta drvflg
;;
;exlp1 jsr pups1 ; set up vars
; jsr ffre ; next match
; bpl fixit ; found one?
;endit jmp endcmd ; no! so bye
;;
;fixit lda drvflg ; push needed vars
; pha
; lda delind
; pha
; lda found
; pha
; lda index
; pha
; lda filcnt
; pha
; lda lstbuf
; pha
; lda filtbl+1
; pha
; lda dirsec
; pha
;;
;exlp2 jsr trfnme ; transfer name
; lda #1 ; fake out lookup
; sta f1cnt
; sta f2cnt
; jsr lookup
; lda #1
; sta f1cnt
; lda #2 ; real
; sta f2cnt
; jsr cy ; copy it
; jmp exlp0 ; next one folks
;;
;; transfer name (dirbuf) to cmdbuf
;;
;trfnme ldy #3 ; both indexes
; sty filtbl ; begining of filename1
;trf0 lda (dirbuf),y ; move it
; sta cmdbuf,y
; iny
; cpy #19 ; all 16 chars passed?
; bne trf0
; rts
.list

+ 80
- 0
DOS_1570/copset.src View File

@@ -0,0 +1,80 @@
.page
.subttl 'copset.src'

; dskcpy check for type
; and parses special case

dskcpy
lda #$e0 ; kill bam buffer
sta bufuse
jsr clnbam ; clr tbam
jsr bam2x ; get bam lindx in .x
lda #$ff
sta buf0,x ; mark bam out-of-memory
lda #$0f
sta linuse ; free all lindxs
jsr prscln ; find ":"
bne dx0000
jmp duplct ; bad command error, cx=x not allowed
.nlist
;
;jsr prseq
;
;lda #'* ;cpy all
;ldx #39 ;put at buffer end
;stx filtbl+1
;sta cmdbuf,x ;place *
;inx
;stx cmdsiz
;ldx #1 ;set up cnt's
;stx f1cnt
;inx
;stx f2cnt
;jmp movlp2 ;enter routine
;
.list
dx0000 jsr tc30 ; normal parse
dx0005 jsr alldrs ; put drv's in filtbl
lda image ; get parse image
and #%01010101 ; val for patt copy
bne dx0020 ; must be concat or normal
ldx filtbl ; chk for *
lda cmdbuf,x
cmp #'*
bne dx0020
.nlist
;ldx #1 ;set cnt's
; no pattern matching allowed
;stx f1cnt
;inx
;stx f2cnt
;jmp cpydtd ;go copy
.list
dx0010 lda #badsyn ; syntax error
jmp cmderr
dx0020 lda image ; chk for normal
and #%11011001
bne dx0010
jmp copy
.nlist
;.end
;prseq
; lda #'= ; special case
; jsr parse
; bne x0020
;x0015 lda #badsyn
; jmp cmderr
;x0020 lda cmdbuf,y
; jsr tst0v1
; bmi x0015
; sta fildrv+1 ; src drv
; dey
; dey
; lda cmdbuf,y
; jsr tst0v1
; bmi x0015
; cmp fildrv+1 ; cannot be equal
; beq x0015
; sta fildrv ; dest drv
; rts
.list

+ 62
- 0
DOS_1570/d.src View File

@@ -0,0 +1,62 @@
.page
.subttl 'duplct1.src'

; controller format disk

jformat lda #3
jsr seth
ldx #3 ; job #3
lda #0
sta fmtsid ; side zero first
lda #$f0 ; format cmd
sta tsttrk ; init speed var
sta jobs,x ; give job to controller
jsr stbctl ; wake him up
cmp #2 ; error?
bcs 1$ ; br, error

;read track one sector zero

lda #1 ; track 1
sta hdrs+6 ; *
lda #0 ; sector 0
sta hdrs+7 ; *
lda #$80 ; read
sta jobs,x ; give job to controller
jsr stbctl ; wake him up
cmp #2 ; error?
bcs 1$ ; br, ok...

lda #1
sta fmtsid ; side one second
lda #$f0 ; format cmd
sta tsttrk ; init speed var
sta jobs,x ; give job to controller
jsr stbctl ; wake him up
cmp #2 ; error?
bcs 1$ ; br, error

;read track thirty-six sector zero

lda #36 ; track 36
sta hdrs+6 ; *
lda #0 ; sector 0
sta hdrs+7 ; *
lda #$80 ; read
sta jobs,x ; give job to controller
jsr stbctl ; wake him up
cmp #2 ; error?
bcc 3$ ; br, ok...

1$ pha ; save .a
lda fastsr ; return from error ?
bmi 2$

pla ; restore .a
ldx #0 ; set for offset for buffer to det. trk & sect.
jmp jerror ; show error

2$ pla ; restore stack
lda jobs,x ; retrieve status
3$ rts ; good return

+ 300
- 0
DOS_1570/dskintsf.src View File

@@ -0,0 +1,300 @@
.page
.subttl 'dskintsf.src'

; error display routine
; blinks the (error #)+1 in all three leds

pezro ldx #0 ; error #1 for zero page
.byte skip2 ; skip next two bytes
perr ldx temp ; get error #
txs ; use stack as storage reg.
pe20 tsx ; restore error #
pe30 lda #led0+led1
ora ledprt
jmp pea7a

; turn on led !!!!patch so ddrb led is output!!!!

rea7d tya ; clear inner ctr !!!!patch return!!!!
pd10 clc
pd20 adc #1 ; count inner ctr
bne pd20
dey ; done ?
bne pd10 ; no

lda ledprt
and #$ff-led0-led1
sta ledprt ; turn off all leds
pe40 ; wait
tya ; clear inner ctr
pd11 clc
pd21 adc #1 ; count inner ctr
bne pd21
dey ; done ?
bne pd11 ; no

dex ; blinked # ?
bpl pe30 ; no - blink again
cpx #$fc ; waited between counts ?
bne pe40 ; no
beq pe20 ; always - all again

dskint sei
cld
ldx #$66 ; *,atnout,clk,*,*,side,fsdir,trk0
jmp patch5 ; *** rom ds 8/18/83 ***
dkit10 inx ; fill

;*********************************
;
; power up diagnostic
;
;*********************************

ldy #0
ldx #0
pu10 txa ; fill z-page accend pattern
sta $0,x
inx
bne pu10
pu20 txa ; check pattern by inc...
cmp $0,x ; ...back to orig #
bne pezro ; bad bits
pu30
inc $0,x ; bump contents
iny
bne pu30 ; not done

cmp $0,x ; check for good count
bne pezro ; something's wrong

sty $0,x ; leave z-page zeroed
lda $0,x ; check it
bne pezro ; wrong

inx ; next!
bne pu20 ; not all done


; test 32k byte rom

; enter x=start page
; exit if ok

rm10 inc temp ; next error #
ldx #127 ; 128 pages
stx ip+1 ; save page, start x=0
inx ; *** rom ds 04/22/86 ***
lda #0
sta ip ; zero lo indirect
ldy #2 ; skip signature bytes
clc
rt10 inc ip+1 ; do it backwards
rt20 adc (ip),y ; total checksum in a
iny
bne rt20
dex
bne rt10
adc #255 ; add in last carry
sta ip+1
bne perr2 ; no - show error number
; nop ; /debug only
; nop

; **** rom ds 04/22/86 ***

nop ; fill
nop ; fill
nop ; fill

;----------------------------------

; test all common ram

cr20 lda #$01 ; start of 1st block
cr30 sta ip+1 ; save page #
inc temp ; bump error #

; enter x=# of pages in block
; ip ptr to first page in block
; exit if ok

ramtst ldx #7 ; save page count
ra10 tya ; fill with adr sensitive pattern
clc
adc ip+1
sta (ip),y
iny
bne ra10
inc ip+1
dex
bne ra10
ldx #7 ; restore page count
ra30 dec ip+1 ; check pattern backwards
ra40 dey
tya ; gen pattern again
clc
adc ip+1
cmp (ip),y ; ok ?
bne perr2 ; no - show error #
eor #$ff ; yes - test inverse pattern
sta (ip),y
eor (ip),y ; ok ?
sta (ip),y ; leave memory zero
bne perr2 ; no - show error #
tya
bne ra40
dex
bne ra30

beq diagok

perr2 jmp perr

diagok
;<><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><>

jmp ptch31 ; *** rom ds 05/01/85 ***
; ldx #topwrt
; txs

;<><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><>

rtch31 lda ledprt ; clear leds
and #$ff-led0-led1
sta ledprt

lda #3 ; neg edge of atn & edge on wp
sta pcr1
lda #%10000010 ; set,_t1,_t2,_cb1,_cb2,_sr,ca1,_ca2(wps)
sta ifr1
sta ier1
lda pb ; compute primary addr
and #%01100000 ; pb5 and pb6 are unused lines
asl a ; shift to lower
rol a
rol a
rol a
ora #$48 ; talk address
sta tlkadr
eor #$60 ; listen address
sta lsnadr

; initialize buffer pntr table

inttab ldx #0
ldy #0
intt1 lda #0
sta buftab,x
inx
lda bufind,y
sta buftab,x
inx
iny
cpy #bfcnt
bne intt1

lda #<cmdbuf ; set pntr to cmdbuf
sta buftab,x
inx
lda #>cmdbuf
sta buftab,x
inx
lda #<errbuf ; set pntr to errbuf
sta buftab,x
inx
lda #>errbuf
sta buftab,x

lda #$ff
ldx #maxsa
dskin1 sta lintab,x
dex
bpl dskin1

ldx #mxchns-1
dskin2
sta buf0,x ; set buffers as unused
sta buf1,x
sta ss,x
dex
bpl dskin2

lda #bfcnt ; set buffer pointers
sta buf0+cmdchn
lda #bfcnt+1
sta buf0+errchn
lda #$ff
sta buf0+blindx
sta buf1+blindx

lda #errchn
sta lintab+errsa
lda #cmdchn+$80
sta lintab+cmdsa
lda #lxint ; lindx 0 to 5 free
sta linuse

lda #rdylst
sta chnrdy+cmdchn
lda #rdytlk
sta chnrdy+errchn
lda #$e0
sta bufuse
lda #$ff
sta bufuse+1
lda #1
sta wpsw
sta wpsw+1
jsr usrint ; init user jmp
jsr lruint

;**********************************
;
; controller initialization
;
;**********************************

jsr ptch10 ; *** rom ds 05/01/85 controller init ***
; jsr cntint

; set indirect vectors

lda #<diagok
sta vnmi
lda #>diagok
sta vnmi+1

lda #6 ; set up sector offset *** rom ds 01/22/85 ***
sta secinc
lda #5
sta revcnt ; set up recovery count

;*
;*******************************
;*
;* seterr
;* set up power on error msg
;*
;*******************************
;*
;*
seterr lda #$73
jsr errts0


;must be contiguous to .file idle

;********************************
; init the serial bus
;
;********************************

;-------rom -05 8/18/83-----------------
lda #$00 ; data hi, clock hi,atna hi
sta pb
lda #%00011010 ; atna,clkout,datout
sta ddrb1
;---------------------------------------
jsr ptch29 ; *rom ds 02/01/85*
; jsr boot

+ 36
- 0
DOS_1570/duplct.src View File

@@ -0,0 +1,36 @@
.page
.subttl 'duplct.src'

; duplicate disk

duplct
lda #badcmd
jmp cmderr

; transfer format code to buffer 0
; & start controller formatting

format
lda #$4c
sta bufs+$300

lda #<formt
sta bufs+$301
lda #>formt
sta bufs+$302

lda #3
jsr seth
lda drvnum
ora #exec
sta jobs+3
fmt105 lda jobs+3
bmi fmt105

cmp #2
bcc fmt110

lda #3
ldx #0
jmp error
fmt110 rts

+ 73
- 0
DOS_1570/duplct1.src View File

@@ -0,0 +1,73 @@
.page
.subttl 'duplct1.src'

; controller format disk

jformat lda #71
nop
nop
nop ; *** rom ds 05/15/86 ***
lda #3
jsr seth
ldx #3 ; job #3
lda #0
sta fmtsid ; side zero first
lda #$f0 ; format cmd
sta tsttrk ; init speed var
sta jobs,x ; give job to controller
jsr stbctl ; wake him up
cmp #2 ; error?
bcs 1$ ; br, error

;read track one sector zero

ldy #3 ; retries
4$ lda #1 ; track 1
sta hdrs+6 ; *
lda #0 ; sector 0
sta hdrs+7 ; *
lda #$80 ; read
sta jobs,x ; give job to controller
jsr stbctl ; wake him up
cmp #2 ; error?
bcc 5$ ; br, ok...
dey
bpl 4$ ; try 3 times
bcs 1$ ; bra

5$ rts ; no need to format side 1 * sl 8/23/85 *
nop
sta fmtsid ; side one second
lda #$f0 ; format cmd
sta tsttrk ; init speed var
sta jobs,x ; give job to controller
jsr stbctl ; wake him up
cmp #2 ; error?
bcs 1$ ; br, error

;read track thirty-six sector zero

ldy #3 ; retries
6$ lda #36 ; track 36
sta hdrs+6 ; *
lda #0 ; sector 0
sta hdrs+7 ; *
lda #$80 ; read
sta jobs,x ; give job to controller
jsr stbctl ; wake him up
cmp #2 ; error?
bcs 3$ ; br, bad

rts ; ok
3$ dey
bpl 6$ ; keep trying

1$ ldx #0 ; set for offset for buffer to det. trk & sect.
bit jobrtn ; return on error ?
stx jobrtn ; clr
bpl 7$

rts ; back to caller
7$ jmp error

+ 59
- 0
DOS_1570/equatesf.src View File

@@ -0,0 +1,59 @@
.page
.subttl 'equatesf.src''

;******************************
;* equates
;******************************
zp2 =* ; save zero page for dos
rom =$c000 ; first rom address

lrf =$80 ; last record flag
dyfile =$40 ; dirty flag for rr file
ovrflo =$20 ; rr print overflow
nssl =6 ; # of side-sector links
ssioff =4+nssl+nssl ; offset into ss for data block ptrs
nssp =120 ; # of ptrs in ss
mxchns =6 ; max # channels in system
maxsa =18 ; max sa # +1
vererr =7 ; controller verify error
cr =$0d ; carriage return
bfcnt =5 ; available buffer count
cbptr =bfcnt+bfcnt ; command buffer ptr
errchn =mxchns-1 ; error channel #
errsa =16 ; error channel sa #
cmdchn =mxchns-2 ; command channel #
lxint =%00001111 ; power up linuse (logical index usage
blindx =6 ; bam lindx for floating bams
cmdsa =15 ; command channel sa #
apmode =2 ; open append mode
mdmode =3 ; open modify mode
rdmode =0 ; open read mode
wtmode =1 ; open write mode
reltyp =4 ; open relative type
dirtyp =7 ; open direct type
seqtyp =1 ; open sequential type
prgtyp =2 ; open program type
usrtyp =3 ; open user type
typmsk =7 ; mask for type bits
irsa =17 ; internal read sa #
iwsa =18 ; internal write sa #
dosver =2 ; dos version
fm2030 =$42 ; 2030 format version
fm4040 =$41 ; 4040 format version

;controller job types

read =$80
write =$90
wverfy =$a0
seek =$b0
secsek =seek+8
bump =$c0
jumpc =$d0
exec =$e0

mxfils =5 ; max # filenames in string
dirlen =24 ; directory length used
nbsiz =27 ; nambuf text size
cmdlen =41 ; length of command buffer

+ 439