mirror of
https://github.com/A2osX/A2osX.git
synced 2024-06-14 02:29:33 +00:00
Kernel 0.93+ ProDOS 2.0.3 src
This commit is contained in:
parent
e2d53a4911
commit
e353a91fc4
Binary file not shown.
|
@ -909,7 +909,7 @@ L59A6 lda iobpdn
|
||||||
L59BD rts
|
L59BD rts
|
||||||
rsetphse .EQ *-ofsD
|
rsetphse .EQ *-ofsD
|
||||||
lda unitnum get unit number.
|
lda unitnum get unit number.
|
||||||
and #$7F mask off high bit.
|
and #$7F mask off high bit.
|
||||||
tax
|
tax
|
||||||
|
|
||||||
* clear all the phases and force read mode
|
* clear all the phases and force read mode
|
||||||
|
@ -943,8 +943,8 @@ L59E8 clc
|
||||||
spstatlist .EQ *-ofsD ref pathbuf-$14
|
spstatlist .EQ *-ofsD ref pathbuf-$14
|
||||||
.HS 00000000 smartport status list buffer
|
.HS 00000000 smartport status list buffer
|
||||||
spunit .EQ *-ofsD ref pathbuf-$10
|
spunit .EQ *-ofsD ref pathbuf-$10
|
||||||
.HS 0000000000000000 smartport unit numbers
|
.HS 0000000000000000 smartport unit numbers
|
||||||
.HS 0000000000000000
|
.HS 0000000000000000
|
||||||
|
|
||||||
* pathname buffer starts at this page boundary (pathbuf = $D700)
|
* pathname buffer starts at this page boundary (pathbuf = $D700)
|
||||||
*--------------------------------------
|
*--------------------------------------
|
||||||
|
|
|
@ -3,17 +3,17 @@ NEW
|
||||||
* object code = mli_2
|
* object code = mli_2
|
||||||
* xdos mli system call processor
|
* xdos mli system call processor
|
||||||
|
|
||||||
ofsX .EQ *-xdosorg offset to xdos org
|
ofsX .EQ *-xdosorg offset to xdos org
|
||||||
xdosmli .EQ *-ofsX xdos MLI in aux ram
|
xdosmli .EQ *-ofsX xdos MLI in aux ram
|
||||||
|
|
||||||
xdosobj cld no decimal.
|
xdosobj cld no decimal.
|
||||||
pla get processor status
|
pla get processor status
|
||||||
sta spare1 save it temporarily
|
sta spare1 save it temporarily
|
||||||
sty mliy save x and y
|
sty mliy save x and y
|
||||||
stx mlix
|
stx mlix
|
||||||
pla find out the address of the caller
|
pla find out the address of the caller
|
||||||
sta A3L
|
sta A3L
|
||||||
clc preserve the address of the call spec.
|
clc preserve the address of the call spec.
|
||||||
adc #$04
|
adc #$04
|
||||||
sta mliretn last MLI call return address
|
sta mliretn last MLI call return address
|
||||||
pla
|
pla
|
||||||
|
@ -21,14 +21,14 @@ xdosobj cld no decimal.
|
||||||
adc #$00
|
adc #$00
|
||||||
sta mliretn+1
|
sta mliretn+1
|
||||||
lda spare1
|
lda spare1
|
||||||
pha pull processor status
|
pha pull processor status
|
||||||
plp to re-enable interrupts.
|
plp to re-enable interrupts.
|
||||||
cld still no decimal
|
cld still no decimal
|
||||||
ldy #$00
|
ldy #$00
|
||||||
sty p8error clear any previous errors.
|
sty p8error clear any previous errors.
|
||||||
iny find out if command is valid.
|
iny find out if command is valid.
|
||||||
lda (A3L),y get command #
|
lda (A3L),y get command #
|
||||||
lsr and hash it to a range of 0-$1F
|
lsr and hash it to a range of 0-$1F
|
||||||
lsr
|
lsr
|
||||||
lsr
|
lsr
|
||||||
lsr
|
lsr
|
||||||
|
@ -39,9 +39,9 @@ xdosobj cld no decimal.
|
||||||
lda (A3L),y check result to see if valid command #
|
lda (A3L),y check result to see if valid command #
|
||||||
cmp scnums,x
|
cmp scnums,x
|
||||||
bne scnerr
|
bne scnerr
|
||||||
iny index to call spec parm list.
|
iny index to call spec parm list.
|
||||||
lda (A3L),y make A3L point to parameter count byte
|
lda (A3L),y make A3L point to parameter count byte
|
||||||
pha in parameter block.
|
pha in parameter block.
|
||||||
iny
|
iny
|
||||||
lda (A3L),y
|
lda (A3L),y
|
||||||
sta A3L+1
|
sta A3L+1
|
||||||
|
@ -55,44 +55,45 @@ xdosobj cld no decimal.
|
||||||
lda scnums,x get call # again
|
lda scnums,x get call # again
|
||||||
cmp #$65 is it quit?
|
cmp #$65 is it quit?
|
||||||
beq special if so, then call quit dispatcher
|
beq special if so, then call quit dispatcher
|
||||||
asl carry set if bfm or dev mgr
|
asl carry set if bfm or dev mgr
|
||||||
bpl godevmgr
|
bpl godevmgr
|
||||||
bcs gobfmgr
|
bcs gobfmgr
|
||||||
lsr shift back down for interrupt manager
|
lsr shift back down for interrupt manager
|
||||||
and #$03 valid calls are 0 and 1
|
and #$03 valid calls are 0 and 1
|
||||||
jsr intmgr
|
jsr intmgr
|
||||||
bra exitmli
|
bra exitmli
|
||||||
special jmp jspare P8 system death vector
|
special jmp jspare P8 system death vector
|
||||||
goclock jsr clockv go read clock.
|
goclock jsr clockv go read clock.
|
||||||
bra exitmli no errors possible
|
bra exitmli no errors possible
|
||||||
godevmgr lsr shift back down for device manager.
|
godevmgr lsr shift back down for device manager.
|
||||||
adc #$01 valid commands are 1 and 2.
|
adc #$01 valid commands are 1 and 2.
|
||||||
sta A4L save command #.
|
sta A4L save command #.
|
||||||
jsr devmgr execute read or write request.
|
jsr devmgr execute read or write request.
|
||||||
bra exitmli
|
bra exitmli
|
||||||
gobfmgr lsr shift back down for block file manager.
|
gobfmgr lsr shift back down for block file manager.
|
||||||
and #$1F valid commands are 0-$13
|
and #$1F valid commands are 0-$13
|
||||||
tax
|
tax
|
||||||
jsr bfmgr
|
jsr bfmgr
|
||||||
exitmli stz bubit clear backup bit
|
exitmli stz bubit clear backup bit
|
||||||
ldy p8error P8 error code
|
ldy p8error P8 error code
|
||||||
cpy #$01 if > 0 then set carry
|
cpy #$01 if > 0 then set carry
|
||||||
tya and set z flag.
|
tya and set z flag.
|
||||||
php disable interrupts until exit complete.
|
php disable interrupts until exit complete.
|
||||||
sei
|
sei
|
||||||
lsr mliact indicate MLI done.
|
lsr mliact indicate MLI done.
|
||||||
plx save status register until return.
|
plx save status register until return.
|
||||||
lda mliretn+1 place last MLI call return address
|
lda mliretn+1 place last MLI call return address
|
||||||
pha on stack. return is done via 'rti'
|
pha on stack. return is done via 'rti'
|
||||||
lda mliretn so the status register is restored
|
lda mliretn so the status register is restored
|
||||||
pha at the same time, so
|
pha at the same time, so
|
||||||
phx place status back on stack
|
phx place status back on stack
|
||||||
tya return error, if any.
|
tya return error, if any.
|
||||||
ldx mlix MLI X register savearea
|
ldx mlix MLI X register savearea
|
||||||
ldy mliy MLI Y register savearea
|
ldy mliy MLI Y register savearea
|
||||||
pha
|
pha
|
||||||
lda bnkbyt1 restore language card status
|
lda bnkbyt1 restore language card status
|
||||||
jmp HBFA0 and return.
|
jmp HBFA0 and return.
|
||||||
|
|
||||||
nodevice .EQ *-ofsX
|
nodevice .EQ *-ofsX
|
||||||
lda #$28 no device connected.
|
lda #$28 no device connected.
|
||||||
jsr p8errv P8 error vector.
|
jsr p8errv P8 error vector.
|
||||||
|
@ -126,6 +127,7 @@ H30CC jsr vldbuf1 make sure user buffer is not
|
||||||
plp
|
plp
|
||||||
clc no error
|
clc no error
|
||||||
rts
|
rts
|
||||||
|
|
||||||
dvmgrerr plp restore interrupt status
|
dvmgrerr plp restore interrupt status
|
||||||
gosyserr .EQ *-ofsX
|
gosyserr .EQ *-ofsX
|
||||||
jsr p8errv P8 error vector
|
jsr p8errv P8 error vector
|
||||||
|
@ -133,7 +135,7 @@ dmgr .EQ *-ofsX interrupts must always be off.
|
||||||
lda unitnum get device # and
|
lda unitnum get device # and
|
||||||
and #$F0 strip misc lower nibble
|
and #$F0 strip misc lower nibble
|
||||||
sta unitnum then save it.
|
sta unitnum then save it.
|
||||||
lsr use as index to device table
|
lsr use as index to device table
|
||||||
lsr
|
lsr
|
||||||
lsr
|
lsr
|
||||||
tax
|
tax
|
||||||
|
@ -148,10 +150,10 @@ gocmd .EQ *-ofsX
|
||||||
|
|
||||||
intmgr .EQ *-ofsX
|
intmgr .EQ *-ofsX
|
||||||
sta A4L interrupt command
|
sta A4L interrupt command
|
||||||
lsr allocate interrupt or deallocate?
|
lsr allocate interrupt or deallocate?
|
||||||
bcs dealcint branch if deallocate.
|
bcs dealcint branch if deallocate.
|
||||||
ldx #$03 test for a free interrupt space in tbl.
|
ldx #$03 test for a free interrupt space in tbl.
|
||||||
alcint lda inttbl-2,x test high address for 0.
|
alcint lda inttbl-2,x test high address for 0.
|
||||||
bne H3118 branch if spot occupied.
|
bne H3118 branch if spot occupied.
|
||||||
ldy #$03 get address of routine.
|
ldy #$03 get address of routine.
|
||||||
lda (A3L),y must not be zero page.
|
lda (A3L),y must not be zero page.
|
||||||
|
@ -160,14 +162,15 @@ alcint lda inttbl-2,x test high address for 0.
|
||||||
dey
|
dey
|
||||||
lda (A3L),y
|
lda (A3L),y
|
||||||
sta inttbl-3,x and low address.
|
sta inttbl-3,x and low address.
|
||||||
txa return interrupt # in range 1-4
|
txa return interrupt # in range 1-4
|
||||||
lsr
|
lsr
|
||||||
dey
|
dey
|
||||||
sta (A3L),y pass back to user.
|
sta (A3L),y pass back to user.
|
||||||
clc no errors.
|
clc no errors.
|
||||||
rts
|
rts
|
||||||
H3118 inx
|
|
||||||
inx next lower priority spot
|
H3118 inx
|
||||||
|
inx next lower priority spot
|
||||||
cpx #$0B are all 4 already allocated?
|
cpx #$0B are all 4 already allocated?
|
||||||
bne alcint branch if not.
|
bne alcint branch if not.
|
||||||
lda #$25 interrupt table full
|
lda #$25 interrupt table full
|
||||||
|
@ -195,7 +198,7 @@ irqrecev .EQ *-ofsX
|
||||||
stx p8sreg
|
stx p8sreg
|
||||||
lda irqflag irq flag = 0 if old roms
|
lda irqflag irq flag = 0 if old roms
|
||||||
bne H315D and 1 if new roms.
|
bne H315D and 1 if new roms.
|
||||||
pla restore return address and p-reg.
|
pla restore return address and p-reg.
|
||||||
sta p8preg
|
sta p8preg
|
||||||
pla
|
pla
|
||||||
sta intadr interrupt return address
|
sta intadr interrupt return address
|
||||||
|
@ -204,7 +207,7 @@ irqrecev .EQ *-ofsX
|
||||||
H315D txs
|
H315D txs
|
||||||
lda mslot set up to re-enable $Cn00 rom
|
lda mslot set up to re-enable $Cn00 rom
|
||||||
sta irqdev+2
|
sta irqdev+2
|
||||||
tsx make sure stack has room for 16 bytes.
|
tsx make sure stack has room for 16 bytes.
|
||||||
bmi H3170 branch if stack ok
|
bmi H3170 branch if stack ok
|
||||||
ldy #$0F otherwise, make room and save it.
|
ldy #$0F otherwise, make room and save it.
|
||||||
H3169 pla
|
H3169 pla
|
||||||
|
@ -285,6 +288,7 @@ syserr1 .EQ *-ofsX
|
||||||
plx pop 1 level of return
|
plx pop 1 level of return
|
||||||
sec
|
sec
|
||||||
rts
|
rts
|
||||||
|
|
||||||
sysdeath1 .EQ *-ofsX
|
sysdeath1 .EQ *-ofsX
|
||||||
tax death error code.
|
tax death error code.
|
||||||
sta CLR80DISP disable 80 col hardware.
|
sta CLR80DISP disable 80 col hardware.
|
||||||
|
@ -301,7 +305,7 @@ H321F lda #$20 inverse space border
|
||||||
sta vline12+10,y 'RESTART SYSTEM-$0x'
|
sta vline12+10,y 'RESTART SYSTEM-$0x'
|
||||||
dey
|
dey
|
||||||
bpl H321F
|
bpl H321F
|
||||||
txa x = death error code
|
txa x = death error code
|
||||||
and #$0F convert to ascii
|
and #$0F convert to ascii
|
||||||
ora #$B0
|
ora #$B0
|
||||||
cmp #$BA
|
cmp #$BA
|
||||||
|
@ -314,7 +318,7 @@ H323E bra H323E end of xdos mli
|
||||||
|
|
||||||
bfmgr .EQ *-ofsX
|
bfmgr .EQ *-ofsX
|
||||||
lda disptch,x translate into command address.
|
lda disptch,x translate into command address.
|
||||||
asl bit 7 indicates pathname to process
|
asl bit 7 indicates pathname to process
|
||||||
sta cmdtemp
|
sta cmdtemp
|
||||||
and #$3F bit 6 is refnum, 5 is time to process
|
and #$3F bit 6 is refnum, 5 is time to process
|
||||||
tax
|
tax
|
||||||
|
@ -338,6 +342,7 @@ H3274 jsr gocmd execute command
|
||||||
bcc goodop
|
bcc goodop
|
||||||
errorsys jsr p8errv P8 error vector
|
errorsys jsr p8errv P8 error vector
|
||||||
goodop rts
|
goodop rts
|
||||||
|
|
||||||
setpath .EQ *-ofsX
|
setpath .EQ *-ofsX
|
||||||
ldy #$01 index to pathname pointer
|
ldy #$01 index to pathname pointer
|
||||||
lda (A3L),y low pointer address
|
lda (A3L),y low pointer address
|
||||||
|
@ -356,13 +361,13 @@ synpath .EQ *-ofsX entry used by rename for 2nd pathname.
|
||||||
bcs errsyn
|
bcs errsyn
|
||||||
sta pathcnt this is used to compare for
|
sta pathcnt this is used to compare for
|
||||||
inc pathcnt end of pathname processing.
|
inc pathcnt end of pathname processing.
|
||||||
iny now check for full pathname...
|
iny now check for full pathname...
|
||||||
lda (zpt),y (full name if starts with '/')
|
lda (zpt),y (full name if starts with '/')
|
||||||
ora #$80
|
ora #$80
|
||||||
cmp #$AF
|
cmp #$AF
|
||||||
bne H32AD branch if prefix appended.
|
bne H32AD branch if prefix appended.
|
||||||
sta prfxflg set prefix flag = prefix not used.
|
sta prfxflg set prefix flag = prefix not used.
|
||||||
iny index to 1st character of pathname.
|
iny index to 1st character of pathname.
|
||||||
H32AD lda #$FF set current position of pathbuf
|
H32AD lda #$FF set current position of pathbuf
|
||||||
sta pathbuf,x to indicate end of pathname.
|
sta pathbuf,x to indicate end of pathname.
|
||||||
sta namcnt $FF = no chars processed in local name.
|
sta namcnt $FF = no chars processed in local name.
|
||||||
|
@ -371,7 +376,7 @@ H32B8 cpy pathcnt done with pathname processing?
|
||||||
bcs endpath
|
bcs endpath
|
||||||
lda (zpt),y get character
|
lda (zpt),y get character
|
||||||
and #$7F
|
and #$7F
|
||||||
inx prepare for next char
|
inx prepare for next char
|
||||||
iny
|
iny
|
||||||
cmp #$2F is it delimiter '/' ?
|
cmp #$2F is it delimiter '/' ?
|
||||||
beq endname yes
|
beq endname yes
|
||||||
|
@ -393,7 +398,7 @@ H32E6 cmp #$41 at least an 'a' ?
|
||||||
bcc errsyn error if not
|
bcc errsyn error if not
|
||||||
cmp #$5B is it > 'z' ?
|
cmp #$5B is it > 'z' ?
|
||||||
bcc H32B8 branch if valid alpha to get next char
|
bcc H32B8 branch if valid alpha to get next char
|
||||||
errsyn sec bad pathname
|
errsyn sec bad pathname
|
||||||
lda #$40
|
lda #$40
|
||||||
rts
|
rts
|
||||||
endpath lda #$00 end pathname with a 0
|
endpath lda #$00 end pathname with a 0
|
||||||
|
@ -412,9 +417,9 @@ endname lda namcnt validate local name < 16
|
||||||
phx save pointer
|
phx save pointer
|
||||||
ldx namptr get index to beginning of local name
|
ldx namptr get index to beginning of local name
|
||||||
sta pathbuf,x save local name's length
|
sta pathbuf,x save local name's length
|
||||||
plx restore pointer
|
plx restore pointer
|
||||||
bne H32AD branch if more names to process
|
bne H32AD branch if more names to process
|
||||||
clc probably no error, but
|
clc probably no error, but
|
||||||
lda prfxflg make sure all pathnames are prefixed
|
lda prfxflg make sure all pathnames are prefixed
|
||||||
bne H3323 or begin with a '/'.
|
bne H3323 or begin with a '/'.
|
||||||
lda newpfxptr must be non-zero
|
lda newpfxptr must be non-zero
|
||||||
|
@ -443,7 +448,7 @@ H333C lda d_stor make sure last local name is dir type
|
||||||
bne H334D
|
bne H334D
|
||||||
lda newpfxptr append new prefix to old
|
lda newpfxptr append new prefix to old
|
||||||
H334D tay
|
H334D tay
|
||||||
sec find new beginning of prefix
|
sec find new beginning of prefix
|
||||||
sbc pathcnt
|
sbc pathcnt
|
||||||
cmp #$C0 too long?
|
cmp #$C0 too long?
|
||||||
bcc errsyn then error
|
bcc errsyn then error
|
||||||
|
@ -469,7 +474,7 @@ pfxerr sec
|
||||||
* get prefix command
|
* get prefix command
|
||||||
|
|
||||||
getprefx .EQ *-ofsX calc how big a buffer is needed.
|
getprefx .EQ *-ofsX calc how big a buffer is needed.
|
||||||
clc get index to users pathname buffer
|
clc get index to users pathname buffer
|
||||||
ldy #$01
|
ldy #$01
|
||||||
lda (A3L),y
|
lda (A3L),y
|
||||||
sta usrbuf user buffer ptr
|
sta usrbuf user buffer ptr
|
||||||
|
@ -489,7 +494,7 @@ getprefx .EQ *-ofsX calc how big a buffer is needed.
|
||||||
adc #$02 add 2 for leading and trailing slashes.
|
adc #$02 add 2 for leading and trailing slashes.
|
||||||
nulprfx sta (usrbuf),y store length in user's buffer.
|
nulprfx sta (usrbuf),y store length in user's buffer.
|
||||||
beq gotprfx branch if null prefix.
|
beq gotprfx branch if null prefix.
|
||||||
sendprfx iny inc to next user buffer location.
|
sendprfx iny inc to next user buffer location.
|
||||||
lda pathbuf,x get next char of prefix.
|
lda pathbuf,x get next char of prefix.
|
||||||
sndlimit sta (usrbuf),y give char to user.
|
sndlimit sta (usrbuf),y give char to user.
|
||||||
and #$F0 check for length descriptor.
|
and #$F0 check for length descriptor.
|
||||||
|
@ -501,7 +506,7 @@ H33B3 inx
|
||||||
iny
|
iny
|
||||||
lda #$2F end with '/'
|
lda #$2F end with '/'
|
||||||
sta (usrbuf),y
|
sta (usrbuf),y
|
||||||
gotprfx clc no error
|
gotprfx clc no error
|
||||||
rts
|
rts
|
||||||
findfcb .EQ *-ofsX
|
findfcb .EQ *-ofsX
|
||||||
ldy #$01 index to ref#
|
ldy #$01 index to ref#
|
||||||
|
@ -514,10 +519,10 @@ findfcb .EQ *-ofsX
|
||||||
lsr
|
lsr
|
||||||
ror
|
ror
|
||||||
ror
|
ror
|
||||||
ror multiply by 32.
|
ror multiply by 32.
|
||||||
sta fcbptr used as an index to fcb
|
sta fcbptr used as an index to fcb
|
||||||
tay
|
tay
|
||||||
pla restore ref# in acc
|
pla restore ref# in acc
|
||||||
cmp fcbbuf,y
|
cmp fcbbuf,y
|
||||||
bne errnoref
|
bne errnoref
|
||||||
fndfcbuf .EQ *-ofsX get page address of file buffer.
|
fndfcbuf .EQ *-ofsX get page address of file buffer.
|
||||||
|
@ -527,14 +532,14 @@ fndfcbuf .EQ *-ofsX get page address of file buffer.
|
||||||
beq fcbdead fcb corrupted
|
beq fcbdead fcb corrupted
|
||||||
stx datptr+1 save ptr to data area of buffer
|
stx datptr+1 save ptr to data area of buffer
|
||||||
inx
|
inx
|
||||||
inx index block always 2 pages after data
|
inx index block always 2 pages after data
|
||||||
stx zpt+1
|
stx zpt+1
|
||||||
lda fcbbuf+1,y also set up device #
|
lda fcbbuf+1,y also set up device #
|
||||||
sta devnum
|
sta devnum
|
||||||
lda bufaddrl
|
lda bufaddrl
|
||||||
sta datptr index and data buffers always on
|
sta datptr index and data buffers always on
|
||||||
sta zpt page boundaries.
|
sta zpt page boundaries.
|
||||||
fndfvol tax search for associated vcb
|
fndfvol tax search for associated vcb
|
||||||
lda vcbbuf+16,x
|
lda vcbbuf+16,x
|
||||||
cmp fcbbuf+1,y is this vcb the same device?
|
cmp fcbbuf+1,y is this vcb the same device?
|
||||||
beq tstvopen if it is, make sure volume is active.
|
beq tstvopen if it is, make sure volume is active.
|
||||||
|
@ -549,12 +554,12 @@ fcbdead lda #$0B fcb error so
|
||||||
tstvopen lda vcbbuf,x make sure this vcb is open.
|
tstvopen lda vcbbuf,x make sure this vcb is open.
|
||||||
beq nxtfvol branch if it is not active.
|
beq nxtfvol branch if it is not active.
|
||||||
stx vcbptr save ptr to good vcb.
|
stx vcbptr save ptr to good vcb.
|
||||||
clc no error
|
clc no error
|
||||||
rts
|
rts
|
||||||
errnoref lda #$00 put a zero into this fcb to
|
errnoref lda #$00 put a zero into this fcb to
|
||||||
sta fcbbuf,y show free fcb.
|
sta fcbbuf,y show free fcb.
|
||||||
badref lda #$43 requested refnum is
|
badref lda #$43 requested refnum is
|
||||||
sec illegal (out of range)
|
sec illegal (out of range)
|
||||||
rts
|
rts
|
||||||
|
|
||||||
* online command
|
* online command
|
||||||
|
@ -583,7 +588,7 @@ H3449 dey
|
||||||
lda devnum get device # again.
|
lda devnum get device # again.
|
||||||
bne H3474 branch if only 1 device to process.
|
bne H3474 branch if only 1 device to process.
|
||||||
jsr mvdevnums get list of currently recognized dev's.
|
jsr mvdevnums get list of currently recognized dev's.
|
||||||
H3459 phx save index to last item on list
|
H3459 phx save index to last item on list
|
||||||
lda loklst,x
|
lda loklst,x
|
||||||
sta devnum save desired device to look at.
|
sta devnum save desired device to look at.
|
||||||
jsr online1 log this volume and return it's name.
|
jsr online1 log this volume and return it's name.
|
||||||
|
@ -591,8 +596,8 @@ H3459 phx save index to last item on list
|
||||||
clc
|
clc
|
||||||
adc #$10
|
adc #$10
|
||||||
sta namptr
|
sta namptr
|
||||||
plx get index to device list.
|
plx get index to device list.
|
||||||
dex next device.
|
dex next device.
|
||||||
bpl H3459 branch if there is another device.
|
bpl H3459 branch if there is another device.
|
||||||
lda #$00 no errors for multiple on-line
|
lda #$00 no errors for multiple on-line
|
||||||
clc
|
clc
|
||||||
|
@ -605,12 +610,12 @@ H3474 jsr fnddvcb see if it has already been logged in.
|
||||||
jsr rdblk read it into general purpose buffer.
|
jsr rdblk read it into general purpose buffer.
|
||||||
ldx vcbptr index to the vcb entry.
|
ldx vcbptr index to the vcb entry.
|
||||||
bcc volfound branch if read was ok.
|
bcc volfound branch if read was ok.
|
||||||
tay error value.
|
tay error value.
|
||||||
lda vcbbuf+17,x don't take the vcb offline if
|
lda vcbbuf+17,x don't take the vcb offline if
|
||||||
bne rtrnerr there are active files present.
|
bne rtrnerr there are active files present.
|
||||||
sta vcbbuf,x now take the volume offline
|
sta vcbbuf,x now take the volume offline
|
||||||
sta vcbbuf+16,x
|
sta vcbbuf+16,x
|
||||||
rtrnerr tya error value.
|
rtrnerr tya error value.
|
||||||
bcs olinerr1 branch if unable to read.
|
bcs olinerr1 branch if unable to read.
|
||||||
volfound lda vcbbuf,x has it been logged in before?
|
volfound lda vcbbuf,x has it been logged in before?
|
||||||
beq H349E if not.
|
beq H349E if not.
|
||||||
|
@ -625,14 +630,14 @@ H34AA ldx vcbptr
|
||||||
jsr cmpvcb does vol read compare with logged vol?
|
jsr cmpvcb does vol read compare with logged vol?
|
||||||
lda #$2E anticipate wrong volume mounted.
|
lda #$2E anticipate wrong volume mounted.
|
||||||
bcc H34D0 branch if ok.
|
bcc H34D0 branch if ok.
|
||||||
olinerr1 pha save error code.
|
olinerr1 pha save error code.
|
||||||
jsr svdevn report what device has problem.
|
jsr svdevn report what device has problem.
|
||||||
pla error code.
|
pla error code.
|
||||||
iny tell what error was encountered.
|
iny tell what error was encountered.
|
||||||
sta (usrbuf),y
|
sta (usrbuf),y
|
||||||
cmp #$57 duplicate volume error?
|
cmp #$57 duplicate volume error?
|
||||||
bne H34CE no.
|
bne H34CE no.
|
||||||
iny report which other device has same name
|
iny report which other device has same name
|
||||||
ldx vcbentry
|
ldx vcbentry
|
||||||
lda vcbbuf+16,x
|
lda vcbbuf+16,x
|
||||||
sta (usrbuf),y
|
sta (usrbuf),y
|
||||||
|
@ -654,8 +659,8 @@ svdevn .EQ *-ofsX
|
||||||
lda devnum upper nibble = device# and
|
lda devnum upper nibble = device# and
|
||||||
ora (usrbuf),y lower nibble = name length.
|
ora (usrbuf),y lower nibble = name length.
|
||||||
sta (usrbuf),y
|
sta (usrbuf),y
|
||||||
clc no errors
|
clc no errors
|
||||||
rts end of block file manager
|
rts end of block file manager
|
||||||
|
|
||||||
MAN
|
MAN
|
||||||
SAVE USR/SRC/PRODOS.203/PRODOS.S.XDOS.A
|
SAVE USR/SRC/PRODOS.203/PRODOS.S.XDOS.A
|
||||||
|
|
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
|
@ -3,19 +3,19 @@ NEW
|
||||||
|
|
||||||
* read command
|
* read command
|
||||||
|
|
||||||
readf .EQ *-ofsX
|
readf .EQ *-ofsX
|
||||||
jsr mvdbufr xfer buffer address and request count
|
jsr mvdbufr xfer buffer address and request count
|
||||||
jsr mvcbytes to a more accessable location, also
|
jsr mvcbytes to a more accessable location, also
|
||||||
pha get fcb attributes and save on stack.
|
pha get fcb attributes and save on stack.
|
||||||
jsr calcmrk calc mark after read, test if mark > eof
|
jsr calcmrk calc mark after read, test if mark > eof
|
||||||
pla carry set means end mark > eof.
|
pla carry set means end mark > eof.
|
||||||
and #$01 test for read enabled.
|
and #$01 test for read enabled.
|
||||||
bne L41DE branch if ok to read.
|
bne L41DE branch if ok to read.
|
||||||
lda #$4E illegal access.
|
lda #$4E illegal access.
|
||||||
bne L4202 always.
|
bne L4202 always.
|
||||||
L41DE bcc L4205 branch if result mark < eof. adjust
|
L41DE bcc L4205 branch if result mark < eof. adjust
|
||||||
ldy fcbptr request to read until just before eof.
|
ldy fcbptr request to read until just before eof.
|
||||||
lda fcbbuf+21,y result = (eof-1) - position
|
lda fcbbuf+21,y result = (eof-1) - position
|
||||||
sbc tposll
|
sbc tposll
|
||||||
sta cbytes
|
sta cbytes
|
||||||
sta rwreql
|
sta rwreql
|
||||||
|
@ -23,102 +23,102 @@ L41DE bcc L4205 branch if result mark < eof. adjust
|
||||||
sbc tposlh
|
sbc tposlh
|
||||||
sta cbytes+1
|
sta cbytes+1
|
||||||
sta rwreqh
|
sta rwreqh
|
||||||
ora cbytes if both bytes = 0 then eof error
|
ora cbytes if both bytes = 0 then eof error
|
||||||
bne L4210
|
bne L4210
|
||||||
lda #$4C eof error
|
lda #$4C eof error
|
||||||
L4202 jmp errfix1
|
L4202 jmp errfix1
|
||||||
L4205 lda cbytes
|
L4205 lda cbytes
|
||||||
ora cbytes+1
|
ora cbytes+1
|
||||||
bne L4210 if read request definitely non-zero.
|
bne L4210 if read request definitely non-zero.
|
||||||
L420D jmp rwdone do nothing.
|
L420D jmp rwdone do nothing.
|
||||||
L4210 jsr valdbuf validate user's data buffer range.
|
L4210 jsr valdbuf validate user's data buffer range.
|
||||||
bcs L4202 branch if memory conflict.
|
bcs L4202 branch if memory conflict.
|
||||||
jsr gfcbstyp get storage type
|
jsr gfcbstyp get storage type
|
||||||
cmp #$04 and find out if it's a tree or other.
|
cmp #$04 and find out if it's a tree or other.
|
||||||
bcc L421F branch if a tree file
|
bcc L421F branch if a tree file
|
||||||
jmp dread otherwise assume it's a directory.
|
jmp dread otherwise assume it's a directory.
|
||||||
L421F jsr rdposn set up data pointer.
|
L421F jsr rdposn set up data pointer.
|
||||||
bcs L4202 errors.
|
bcs L4202 errors.
|
||||||
jsr preprw test for newline, setup for partial
|
jsr preprw test for newline, setup for partial
|
||||||
jsr readpart read. move current data buffer contents
|
jsr readpart read. move current data buffer contents
|
||||||
bvs L420D to user area. branch if satisfied.
|
bvs L420D to user area. branch if satisfied.
|
||||||
bcs L421F indicates newline is set.
|
bcs L421F indicates newline is set.
|
||||||
lda rwreqh how many blocks are to be read ?
|
lda rwreqh how many blocks are to be read ?
|
||||||
lsr if < 2 then use the slow way.
|
lsr if < 2 then use the slow way.
|
||||||
beq L421F
|
beq L421F
|
||||||
sta cmdtemp save bulk block count.
|
sta cmdtemp save bulk block count.
|
||||||
jsr gfcbstat make sure current data area doesn't
|
jsr gfcbstat make sure current data area doesn't
|
||||||
and #$40 need writing before resetting ptr to
|
and #$40 need writing before resetting ptr to
|
||||||
bne L421F read into user's area. branch if data
|
bne L421F read into user's area. branch if data
|
||||||
sta ioaccess needs to be written to force 1st call
|
sta ioaccess needs to be written to force 1st call
|
||||||
lda usrbuf thru all dev handler checking. make
|
lda usrbuf thru all dev handler checking. make
|
||||||
sta datptr the data buffer the user's space.
|
sta datptr the data buffer the user's space.
|
||||||
lda usrbuf+1
|
lda usrbuf+1
|
||||||
sta datptr+1
|
sta datptr+1
|
||||||
L4249 jsr rdposn get next block directly into user space.
|
L4249 jsr rdposn get next block directly into user space.
|
||||||
bcs L42B7 if error.
|
bcs L42B7 if error.
|
||||||
L424E inc datptr+1 incll ptrs by one block (512 bytes)
|
L424E inc datptr+1 incll ptrs by one block (512 bytes)
|
||||||
inc datptr+1
|
inc datptr+1
|
||||||
dec rwreqh
|
dec rwreqh
|
||||||
dec rwreqh
|
dec rwreqh
|
||||||
inc tposlh
|
inc tposlh
|
||||||
inc tposlh
|
inc tposlh
|
||||||
bne L4269 if pos'n doesn't get to a 64k boundary
|
bne L4269 if pos'n doesn't get to a 64k boundary
|
||||||
inc tposhi otherwise, must check for a 128k one.
|
inc tposhi otherwise, must check for a 128k one.
|
||||||
lda tposhi carry set if 128k boundary reached.
|
lda tposhi carry set if 128k boundary reached.
|
||||||
eor #$01
|
eor #$01
|
||||||
lsr
|
lsr
|
||||||
L4269 dec cmdtemp has all been read fast ?
|
L4269 dec cmdtemp has all been read fast ?
|
||||||
bne L427B branch if more to read.
|
bne L427B branch if more to read.
|
||||||
jsr fxdatptr go fix up data pointer to xdos buffer.
|
jsr fxdatptr go fix up data pointer to xdos buffer.
|
||||||
lda rwreql test for end of read.
|
lda rwreql test for end of read.
|
||||||
ora rwreqh are both 0 ?
|
ora rwreqh are both 0 ?
|
||||||
beq L42C3 yes, done.
|
beq L42C3 yes, done.
|
||||||
bne L421F no, read last partial block
|
bne L421F no, read last partial block
|
||||||
L427B bcs L4249
|
L427B bcs L4249
|
||||||
lda tposhi get index to next block address
|
lda tposhi get index to next block address
|
||||||
lsr
|
lsr
|
||||||
lda tposlh
|
lda tposlh
|
||||||
ror
|
ror
|
||||||
tay index to address = int(pos/512)
|
tay index to address = int(pos/512)
|
||||||
lda (zpt),y get low address
|
lda (zpt),y get low address
|
||||||
sta bloknml
|
sta bloknml
|
||||||
inc zpt+1
|
inc zpt+1
|
||||||
cmp (zpt),y are hi and low address the same?
|
cmp (zpt),y are hi and low address the same?
|
||||||
bne L4299 no, it's a real block address.
|
bne L4299 no, it's a real block address.
|
||||||
cmp #$00 are both bytes 0 ?
|
cmp #$00 are both bytes 0 ?
|
||||||
bne L4299 no, must be real data.
|
bne L4299 no, must be real data.
|
||||||
sta ioaccess don't do repeat io just after sparse.
|
sta ioaccess don't do repeat io just after sparse.
|
||||||
beq L429C branch always (carry set).
|
beq L429C branch always (carry set).
|
||||||
L4299 lda (zpt),y get high address
|
L4299 lda (zpt),y get high address
|
||||||
clc
|
clc
|
||||||
L429C dec zpt+1
|
L429C dec zpt+1
|
||||||
bcs L4249 if no block to read.
|
bcs L4249 if no block to read.
|
||||||
sta bloknml+1
|
sta bloknml+1
|
||||||
lda ioaccess has 1st call gone to device yet ?
|
lda ioaccess has 1st call gone to device yet ?
|
||||||
beq L4249 no, go thru normal route
|
beq L4249 no, go thru normal route
|
||||||
clc
|
clc
|
||||||
php interrupts can't occur during dmgr call
|
php interrupts can't occur during dmgr call
|
||||||
sei
|
sei
|
||||||
lda datptr+1 reset hi buffer address for dev handler
|
lda datptr+1 reset hi buffer address for dev handler
|
||||||
sta buf+1
|
sta buf+1
|
||||||
jsr dmgr
|
jsr dmgr
|
||||||
bcs L42B6 if error
|
bcs L42B6 if error
|
||||||
plp
|
plp
|
||||||
bcc L424E no errors, branch always.
|
bcc L424E no errors, branch always.
|
||||||
L42B6 plp restore interrupts.
|
L42B6 plp restore interrupts.
|
||||||
L42B7 pha save error code.
|
L42B7 pha save error code.
|
||||||
jsr fxdatptr go restore data pointers, etc.
|
jsr fxdatptr go restore data pointers, etc.
|
||||||
pla
|
pla
|
||||||
errfix1 .EQ *-ofsX
|
errfix1 .EQ *-ofsX
|
||||||
pha save error code
|
pha save error code
|
||||||
jsr rwdone pass back # of bytes actually read
|
jsr rwdone pass back # of bytes actually read
|
||||||
pla
|
pla
|
||||||
sec error
|
sec error
|
||||||
rts
|
rts
|
||||||
rwdone .EQ *-ofsX
|
rwdone .EQ *-ofsX
|
||||||
L42C3 ldy #$06 return total # of bytes actually read
|
L42C3 ldy #$06 return total # of bytes actually read
|
||||||
sec derived from cbytes-rwreq.
|
sec derived from cbytes-rwreq.
|
||||||
lda cbytes
|
lda cbytes
|
||||||
sbc rwreql
|
sbc rwreql
|
||||||
sta (A3L),y
|
sta (A3L),y
|
||||||
|
@ -126,125 +126,125 @@ L42C3 ldy #$06 return total # of bytes actually read
|
||||||
lda cbytes+1
|
lda cbytes+1
|
||||||
sbc rwreqh
|
sbc rwreqh
|
||||||
sta (A3L),y
|
sta (A3L),y
|
||||||
jmp rdposn leave with valid position in fcb.
|
jmp rdposn leave with valid position in fcb.
|
||||||
preprw .EQ *-ofsX
|
preprw .EQ *-ofsX
|
||||||
ldy fcbptr adj pointer to user's buffer to make
|
ldy fcbptr adj pointer to user's buffer to make
|
||||||
sec the transfer
|
sec the transfer
|
||||||
lda usrbuf
|
lda usrbuf
|
||||||
sbc tposll
|
sbc tposll
|
||||||
sta usrbuf
|
sta usrbuf
|
||||||
bcs L42E9 if no adjustment to hi address needed
|
bcs L42E9 if no adjustment to hi address needed
|
||||||
dec usrbuf+1
|
dec usrbuf+1
|
||||||
L42E9 lda fcbbuf+31,y test for new line enabled.
|
L42E9 lda fcbbuf+31,y test for new line enabled.
|
||||||
clc
|
clc
|
||||||
beq L42F9 if new line not enabled.
|
beq L42F9 if new line not enabled.
|
||||||
sec carry indicates new line enabled
|
sec carry indicates new line enabled
|
||||||
sta nlmask
|
sta nlmask
|
||||||
lda fcbbuf+10,y move newline character to more
|
lda fcbbuf+10,y move newline character to more
|
||||||
sta nlchar accesible spot.
|
sta nlchar accesible spot.
|
||||||
L42F9 ldy tposll index to 1st data.
|
L42F9 ldy tposll index to 1st data.
|
||||||
lda datptr reset low order of position pointer to
|
lda datptr reset low order of position pointer to
|
||||||
sta sos beginning of page.
|
sta sos beginning of page.
|
||||||
ldx rwreql get low order count of requested bytes.
|
ldx rwreql get low order count of requested bytes.
|
||||||
rts return statuses.
|
rts return statuses.
|
||||||
readpart .EQ *-ofsX
|
readpart .EQ *-ofsX
|
||||||
txa x = low count of bytes to move.
|
txa x = low count of bytes to move.
|
||||||
bne L430F branch if request is not an even page.
|
bne L430F branch if request is not an even page.
|
||||||
lda rwreqh a call of 0 bytes should never get here!
|
lda rwreqh a call of 0 bytes should never get here!
|
||||||
beq L435D branch if nothing to do.
|
beq L435D branch if nothing to do.
|
||||||
dec rwreqh
|
dec rwreqh
|
||||||
L430F dex
|
L430F dex
|
||||||
L4310 lda (sos),y move data to user's buffer
|
L4310 lda (sos),y move data to user's buffer
|
||||||
sta (usrbuf),y
|
sta (usrbuf),y
|
||||||
bcs tstnewl test for newline 1st !
|
bcs tstnewl test for newline 1st !
|
||||||
L4316 txa note: x must be unchanged from tstnewl !
|
L4316 txa note: x must be unchanged from tstnewl !
|
||||||
beq L4332 go see if read request is satified...
|
beq L4332 go see if read request is satified...
|
||||||
L4319 dex dec # of bytes left to move.
|
L4319 dex dec # of bytes left to move.
|
||||||
iny page crossed ?
|
iny page crossed ?
|
||||||
bne L4310 no, move next byte.
|
bne L4310 no, move next byte.
|
||||||
lda sos+1 test for end of buffer, but first
|
lda sos+1 test for end of buffer, but first
|
||||||
inc usrbuf+1 adjust user buffer pointer
|
inc usrbuf+1 adjust user buffer pointer
|
||||||
inc tposlh and position
|
inc tposlh and position
|
||||||
bne L4329
|
bne L4329
|
||||||
inc tposhi
|
inc tposhi
|
||||||
L4329 inc sos+1 and sos buffer high address.
|
L4329 inc sos+1 and sos buffer high address.
|
||||||
eor datptr+1 (carry is undisturbed)
|
eor datptr+1 (carry is undisturbed)
|
||||||
beq L4310 branch if more to read in buffer.
|
beq L4310 branch if more to read in buffer.
|
||||||
clv indicate not finished.
|
clv indicate not finished.
|
||||||
bvc L4360 always.
|
bvc L4360 always.
|
||||||
L4332 lda rwreqh
|
L4332 lda rwreqh
|
||||||
beq L4350 branch if request is satisfied.
|
beq L4350 branch if request is satisfied.
|
||||||
iny done with this block of data ?
|
iny done with this block of data ?
|
||||||
bne L4340 no, adjust high byte of request.
|
bne L4340 no, adjust high byte of request.
|
||||||
lda sos+1 maybe, check for end of block buffer.
|
lda sos+1 maybe, check for end of block buffer.
|
||||||
eor datptr+1 (don't disturb carry).
|
eor datptr+1 (don't disturb carry).
|
||||||
bne L4343 if hi count can be dealt with next time
|
bne L4343 if hi count can be dealt with next time
|
||||||
L4340 dec rwreqh
|
L4340 dec rwreqh
|
||||||
L4343 dey restore proper value
|
L4343 dey restore proper value
|
||||||
bra L4319
|
bra L4319
|
||||||
tstnewl lda (sos),y get last byte transferred again.
|
tstnewl lda (sos),y get last byte transferred again.
|
||||||
and nlmask only bits on in mask are significant.
|
and nlmask only bits on in mask are significant.
|
||||||
eor nlchar does it match newline character?
|
eor nlchar does it match newline character?
|
||||||
bne L4316 no, read next.
|
bne L4316 no, read next.
|
||||||
L4350 iny adjust position.
|
L4350 iny adjust position.
|
||||||
bne L435D
|
bne L435D
|
||||||
inc usrbuf+1 inc pointers
|
inc usrbuf+1 inc pointers
|
||||||
inc tposlh
|
inc tposlh
|
||||||
bne L435D
|
bne L435D
|
||||||
inc tposhi
|
inc tposhi
|
||||||
L435D bit setvflg (sets v flag)
|
L435D bit setvflg (sets v flag)
|
||||||
L4360 sty tposll save low position
|
L4360 sty tposll save low position
|
||||||
bvs L4366
|
bvs L4366
|
||||||
inx leave request as +1 for next call
|
inx leave request as +1 for next call
|
||||||
L4366 stx rwreql and remainder of request count.
|
L4366 stx rwreql and remainder of request count.
|
||||||
php save statuses
|
php save statuses
|
||||||
clc adjust user's low buffer address
|
clc adjust user's low buffer address
|
||||||
tya
|
tya
|
||||||
adc usrbuf
|
adc usrbuf
|
||||||
sta usrbuf
|
sta usrbuf
|
||||||
bcc L4374
|
bcc L4374
|
||||||
inc usrbuf+1 adjust hi address as needed.
|
inc usrbuf+1 adjust hi address as needed.
|
||||||
L4374 plp restore return statuses.
|
L4374 plp restore return statuses.
|
||||||
setvflg .EQ *-ofsX this byte ($60) is used to set v flag.
|
setvflg .EQ *-ofsX this byte ($60) is used to set v flag.
|
||||||
rts
|
rts
|
||||||
fxdatptr .EQ *-ofsX put current user buffer
|
fxdatptr .EQ *-ofsX put current user buffer
|
||||||
lda datptr address back to normal
|
lda datptr address back to normal
|
||||||
sta usrbuf
|
sta usrbuf
|
||||||
lda datptr+1
|
lda datptr+1
|
||||||
sta usrbuf+1 bank pair byte should be moved also.
|
sta usrbuf+1 bank pair byte should be moved also.
|
||||||
ldy fcbptr restore buffer address
|
ldy fcbptr restore buffer address
|
||||||
jmp fndfcbuf
|
jmp fndfcbuf
|
||||||
|
|
||||||
* read directory file
|
* read directory file
|
||||||
|
|
||||||
dread .EQ *-ofsX
|
dread .EQ *-ofsX
|
||||||
L4384 jsr rdposn
|
L4384 jsr rdposn
|
||||||
bcs L43B8 pass back any errors.
|
bcs L43B8 pass back any errors.
|
||||||
jsr preprw prepare for transfer.
|
jsr preprw prepare for transfer.
|
||||||
jsr readpart move data to user's buffer.
|
jsr readpart move data to user's buffer.
|
||||||
bvc L4384 repeat until request is satisfied.
|
bvc L4384 repeat until request is satisfied.
|
||||||
jsr rwdone update fcb as to new position.
|
jsr rwdone update fcb as to new position.
|
||||||
bcc L43B6 branch if done with no errors.
|
bcc L43B6 branch if done with no errors.
|
||||||
cmp #$4C was last read to end of file ?
|
cmp #$4C was last read to end of file ?
|
||||||
sec anticipate some other error.
|
sec anticipate some other error.
|
||||||
bne L43B7 branch if not eof error.
|
bne L43B7 branch if not eof error.
|
||||||
jsr svmark
|
jsr svmark
|
||||||
jsr zipdata clear out data block.
|
jsr zipdata clear out data block.
|
||||||
ldy #$00 provide dummy back pointer for future
|
ldy #$00 provide dummy back pointer for future
|
||||||
ldx fcbptr re-position. x = hi byte of last block
|
ldx fcbptr re-position. x = hi byte of last block
|
||||||
L43A6 lda fcbbuf+16,x
|
L43A6 lda fcbbuf+16,x
|
||||||
sta (datptr),y
|
sta (datptr),y
|
||||||
lda #$00 mark current block as impossible
|
lda #$00 mark current block as impossible
|
||||||
sta fcbbuf+16,x
|
sta fcbbuf+16,x
|
||||||
inx
|
inx
|
||||||
iny inc indexes to do both hi and low bytes
|
iny inc indexes to do both hi and low bytes
|
||||||
cpy #$02
|
cpy #$02
|
||||||
bne L43A6
|
bne L43A6
|
||||||
L43B6 clc no error
|
L43B6 clc no error
|
||||||
L43B7 rts
|
L43B7 rts
|
||||||
L43B8 jmp errfix1 report how much xfer'd before error.
|
L43B8 jmp errfix1 report how much xfer'd before error.
|
||||||
mvcbytes .EQ *-ofsX move request count to a more
|
mvcbytes .EQ *-ofsX move request count to a more
|
||||||
ldy #$04 accessable location
|
ldy #$04 accessable location
|
||||||
lda (A3L),y
|
lda (A3L),y
|
||||||
sta cbytes
|
sta cbytes
|
||||||
sta rwreql
|
sta rwreql
|
||||||
|
@ -252,19 +252,19 @@ mvcbytes .EQ *-ofsX move request count to a more
|
||||||
lda (A3L),y
|
lda (A3L),y
|
||||||
sta cbytes+1
|
sta cbytes+1
|
||||||
sta rwreqh
|
sta rwreqh
|
||||||
ldy fcbptr return y = val(fcbptr),
|
ldy fcbptr return y = val(fcbptr),
|
||||||
lda fcbbuf+9,y a = attributes
|
lda fcbbuf+9,y a = attributes
|
||||||
clc and carry clear...
|
clc and carry clear...
|
||||||
rts
|
rts
|
||||||
mvdbufr .EQ *-ofsX move the pointer to user's buffer
|
mvdbufr .EQ *-ofsX move the pointer to user's buffer
|
||||||
ldy #$02 to the block file manager
|
ldy #$02 to the block file manager
|
||||||
lda (A3L),y
|
lda (A3L),y
|
||||||
sta usrbuf z-page area
|
sta usrbuf z-page area
|
||||||
iny
|
iny
|
||||||
lda (A3L),y
|
lda (A3L),y
|
||||||
sta usrbuf+1
|
sta usrbuf+1
|
||||||
gfcbstyp .EQ *-ofsX
|
gfcbstyp .EQ *-ofsX
|
||||||
ldy fcbptr return storage type
|
ldy fcbptr return storage type
|
||||||
lda fcbbuf+7,y
|
lda fcbbuf+7,y
|
||||||
rts
|
rts
|
||||||
|
|
||||||
|
@ -275,224 +275,224 @@ gfcbstyp .EQ *-ofsX
|
||||||
* y,x,a is unknown
|
* y,x,a is unknown
|
||||||
* carry set indicates scrtch > eof
|
* carry set indicates scrtch > eof
|
||||||
|
|
||||||
calcmrk .EQ *-ofsX
|
calcmrk .EQ *-ofsX
|
||||||
ldx #$00
|
ldx #$00
|
||||||
ldy fcbptr
|
ldy fcbptr
|
||||||
clc
|
clc
|
||||||
L43EE lda fcbbuf+18,y
|
L43EE lda fcbbuf+18,y
|
||||||
sta tposll,x
|
sta tposll,x
|
||||||
sta oldmark,x
|
sta oldmark,x
|
||||||
adc cbytes,x
|
adc cbytes,x
|
||||||
sta scrtch,x
|
sta scrtch,x
|
||||||
txa
|
txa
|
||||||
eor #$02 cbytes+2 always=0
|
eor #$02 cbytes+2 always=0
|
||||||
beq L4406
|
beq L4406
|
||||||
iny
|
iny
|
||||||
inx
|
inx
|
||||||
bne L43EE always.
|
bne L43EE always.
|
||||||
eoftest .EQ *-ofsX
|
eoftest .EQ *-ofsX
|
||||||
L4406 lda scrtch,x new mark in scrtch.
|
L4406 lda scrtch,x new mark in scrtch.
|
||||||
cmp fcbbuf+21,y is new position > eof ?
|
cmp fcbbuf+21,y is new position > eof ?
|
||||||
bcc L4414 no, proceed.
|
bcc L4414 no, proceed.
|
||||||
bne L4414 yes, adjust 'cbytes' request
|
bne L4414 yes, adjust 'cbytes' request
|
||||||
dey
|
dey
|
||||||
dex all tree bytes compared ?
|
dex all tree bytes compared ?
|
||||||
bpl L4406 no, test next lowest
|
bpl L4406 no, test next lowest
|
||||||
L4414 rts
|
L4414 rts
|
||||||
werreof .EQ *-ofsX
|
werreof .EQ *-ofsX
|
||||||
jsr plus2fcb reset eof to pre-error position.
|
jsr plus2fcb reset eof to pre-error position.
|
||||||
L4418 lda oldeof,x place oldeof back into fcb
|
L4418 lda oldeof,x place oldeof back into fcb
|
||||||
sta fcbbuf+21,y
|
sta fcbbuf+21,y
|
||||||
lda oldmark,x also reset mark to last best
|
lda oldmark,x also reset mark to last best
|
||||||
sta fcbbuf+18,y write position
|
sta fcbbuf+18,y write position
|
||||||
sta scrtch,x and copy mark to scrtch for test of
|
sta scrtch,x and copy mark to scrtch for test of
|
||||||
dey eof less than mark.
|
dey eof less than mark.
|
||||||
dex
|
dex
|
||||||
bpl L4418
|
bpl L4418
|
||||||
jsr plus2fcb get pointers to test eof < mark.
|
jsr plus2fcb get pointers to test eof < mark.
|
||||||
jsr eoftest carry set means mark > eof !!
|
jsr eoftest carry set means mark > eof !!
|
||||||
|
|
||||||
* drop into wadjeof to adjust eof to mark if necessary
|
* drop into wadjeof to adjust eof to mark if necessary
|
||||||
|
|
||||||
wadjeof .EQ *-ofsX
|
wadjeof .EQ *-ofsX
|
||||||
jsr plus2fcb get y=fcbptr+2, x=2, a=y.
|
jsr plus2fcb get y=fcbptr+2, x=2, a=y.
|
||||||
L4434 lda fcbbuf+21,y copy eof to old eof
|
L4434 lda fcbbuf+21,y copy eof to old eof
|
||||||
sta oldeof,x
|
sta oldeof,x
|
||||||
bcc L4442 and if carry set...
|
bcc L4442 and if carry set...
|
||||||
lda scrtch,x then copy scrtch to fcb's eof.
|
lda scrtch,x then copy scrtch to fcb's eof.
|
||||||
sta fcbbuf+21,y
|
sta fcbbuf+21,y
|
||||||
L4442 dey
|
L4442 dey
|
||||||
dex copy all 3 bytes
|
dex copy all 3 bytes
|
||||||
bpl L4434
|
bpl L4434
|
||||||
rts
|
rts
|
||||||
plus2fcb .EQ *-ofsX
|
plus2fcb .EQ *-ofsX
|
||||||
lda #$02 on exit both a and y = fcbptr+2.
|
lda #$02 on exit both a and y = fcbptr+2.
|
||||||
tax x = 2
|
tax x = 2
|
||||||
ora fcbptr
|
ora fcbptr
|
||||||
tay
|
tay
|
||||||
rts
|
rts
|
||||||
|
|
||||||
* write command
|
* write command
|
||||||
|
|
||||||
writef .EQ *-ofsX first determine if requested
|
writef .EQ *-ofsX first determine if requested
|
||||||
jsr mvcbytes write is legal.
|
jsr mvcbytes write is legal.
|
||||||
pha
|
pha
|
||||||
jsr calcmrk save a copy of eof to old eof, set/clr
|
jsr calcmrk save a copy of eof to old eof, set/clr
|
||||||
jsr wadjeof carry to determine if new mark > eof.
|
jsr wadjeof carry to determine if new mark > eof.
|
||||||
pla get attributes again.
|
pla get attributes again.
|
||||||
and #$02 is write enabled ?
|
and #$02 is write enabled ?
|
||||||
bne L4462 yes, continue...
|
bne L4462 yes, continue...
|
||||||
L445E lda #$4E illegal access error.
|
L445E lda #$4E illegal access error.
|
||||||
bne L44A2
|
bne L44A2
|
||||||
L4462 jsr tstwprot otherwise, make sure device is not
|
L4462 jsr tstwprot otherwise, make sure device is not
|
||||||
bcs L44A2 write protected. if so, branch to abort.
|
bcs L44A2 write protected. if so, branch to abort.
|
||||||
lda cbytes
|
lda cbytes
|
||||||
ora cbytes+1 anything to write ?
|
ora cbytes+1 anything to write ?
|
||||||
bne L4472 branch if so,
|
bne L4472 branch if so,
|
||||||
jmp rwdone else do nothing.
|
jmp rwdone else do nothing.
|
||||||
L4472 jsr mvdbufr move the user's buffer ptr to bfm zero
|
L4472 jsr mvdbufr move the user's buffer ptr to bfm zero
|
||||||
cmp #$04 page area, also get storage type.
|
cmp #$04 page area, also get storage type.
|
||||||
bcs L445E if not tree, return an access error.
|
bcs L445E if not tree, return an access error.
|
||||||
L4479 jsr rdposn
|
L4479 jsr rdposn
|
||||||
bcs L44A2
|
bcs L44A2
|
||||||
jsr gfcbstat
|
jsr gfcbstat
|
||||||
and #$07
|
and #$07
|
||||||
beq L44E9
|
beq L44E9
|
||||||
ldy #$00 is enough disk space available for
|
ldy #$00 is enough disk space available for
|
||||||
L4487 iny indexes and data block ?
|
L4487 iny indexes and data block ?
|
||||||
lsr
|
lsr
|
||||||
bne L4487
|
bne L4487
|
||||||
sty reql
|
sty reql
|
||||||
sta reqh
|
sta reqh
|
||||||
jsr tstfrblk
|
jsr tstfrblk
|
||||||
bcs L44A2 pass back any errors.
|
bcs L44A2 pass back any errors.
|
||||||
jsr gfcbstat now get more specific.
|
jsr gfcbstat now get more specific.
|
||||||
and #$04 are we lacking a tree top ?
|
and #$04 are we lacking a tree top ?
|
||||||
beq L44AC no, test for lack of sapling level index
|
beq L44AC no, test for lack of sapling level index
|
||||||
jsr topdown go allocate tree top and adj file type.
|
jsr topdown go allocate tree top and adj file type.
|
||||||
bcc L44B8 continue with allocation of data block.
|
bcc L44B8 continue with allocation of data block.
|
||||||
L44A2 pha save error.
|
L44A2 pha save error.
|
||||||
jsr errfix1 error return.
|
jsr errfix1 error return.
|
||||||
jsr werreof adjust eof and mark to pre-error state.
|
jsr werreof adjust eof and mark to pre-error state.
|
||||||
pla restore error code.
|
pla restore error code.
|
||||||
sec
|
sec
|
||||||
rts
|
rts
|
||||||
L44AC jsr gfcbstat get status byte again.
|
L44AC jsr gfcbstat get status byte again.
|
||||||
and #$02 do we need a sapling level index block ?
|
and #$02 do we need a sapling level index block ?
|
||||||
beq L44B8 no, assume it's just a data block needed
|
beq L44B8 no, assume it's just a data block needed
|
||||||
jsr sapdown go alloc an indx blk and update tree top
|
jsr sapdown go alloc an indx blk and update tree top
|
||||||
bcs L44A2 if error.
|
bcs L44A2 if error.
|
||||||
L44B8 jsr alcwblk go allocate for data block.
|
L44B8 jsr alcwblk go allocate for data block.
|
||||||
bcs L44A2
|
bcs L44A2
|
||||||
jsr gfcbstat clear allocation required bits in status
|
jsr gfcbstat clear allocation required bits in status
|
||||||
ora #$80 but first indicate index block is dirty.
|
ora #$80 but first indicate index block is dirty.
|
||||||
and #$F8
|
and #$F8
|
||||||
sta fcbbuf+8,y
|
sta fcbbuf+8,y
|
||||||
lda tposhi calculate position within index block.
|
lda tposhi calculate position within index block.
|
||||||
lsr
|
lsr
|
||||||
lda tposlh
|
lda tposlh
|
||||||
ror
|
ror
|
||||||
tay now put block address into index block.
|
tay now put block address into index block.
|
||||||
inc zpt+1 high byte first.
|
inc zpt+1 high byte first.
|
||||||
lda scrtch+1
|
lda scrtch+1
|
||||||
tax
|
tax
|
||||||
sta (zpt),y
|
sta (zpt),y
|
||||||
dec zpt+1 restore pointer to lower page of index
|
dec zpt+1 restore pointer to lower page of index
|
||||||
lda scrtch block. get low block address.
|
lda scrtch block. get low block address.
|
||||||
sta (zpt),y store low address.
|
sta (zpt),y store low address.
|
||||||
ldy fcbptr update fcb to indicate that this block
|
ldy fcbptr update fcb to indicate that this block
|
||||||
sta fcbbuf+16,y is allocated.
|
sta fcbbuf+16,y is allocated.
|
||||||
txa get high address again.
|
txa get high address again.
|
||||||
sta fcbbuf+17,y
|
sta fcbbuf+17,y
|
||||||
L44E9 jsr preprw
|
L44E9 jsr preprw
|
||||||
jsr wrtpart
|
jsr wrtpart
|
||||||
bvc L4479
|
bvc L4479
|
||||||
jmp rwdone update fcb with new position
|
jmp rwdone update fcb with new position
|
||||||
wrtpart .EQ *-ofsX
|
wrtpart .EQ *-ofsX
|
||||||
txa
|
txa
|
||||||
bne L44FF branch if request is not even pages
|
bne L44FF branch if request is not even pages
|
||||||
lda rwreqh a call of 0 bytes should never get here!
|
lda rwreqh a call of 0 bytes should never get here!
|
||||||
beq L4546 do nothing
|
beq L4546 do nothing
|
||||||
dec rwreqh
|
dec rwreqh
|
||||||
L44FF dex
|
L44FF dex
|
||||||
lda (usrbuf),y move data from user's buffer
|
lda (usrbuf),y move data from user's buffer
|
||||||
sta (sos),y
|
sta (sos),y
|
||||||
txa
|
txa
|
||||||
beq L4525
|
beq L4525
|
||||||
L4507 iny page crossed ?
|
L4507 iny page crossed ?
|
||||||
bne L44FF no, keep moving.
|
bne L44FF no, keep moving.
|
||||||
lda sos+1 test for end of buffer
|
lda sos+1 test for end of buffer
|
||||||
inc usrbuf+1 but first adjust user buffer pointer
|
inc usrbuf+1 but first adjust user buffer pointer
|
||||||
inc tposlh and position
|
inc tposlh and position
|
||||||
bne L451C
|
bne L451C
|
||||||
inc tposhi
|
inc tposhi
|
||||||
bne L451C
|
bne L451C
|
||||||
lda #$4D out of range if > 32MB
|
lda #$4D out of range if > 32MB
|
||||||
bne L44A2
|
bne L44A2
|
||||||
L451C inc sos+1 adjust sos buffer high address
|
L451C inc sos+1 adjust sos buffer high address
|
||||||
eor datptr+1 (carry is undisturbed)
|
eor datptr+1 (carry is undisturbed)
|
||||||
beq L44FF branch if more to write to buffer.
|
beq L44FF branch if more to write to buffer.
|
||||||
clv indicates not finished.
|
clv indicates not finished.
|
||||||
bvc L4549 always.
|
bvc L4549 always.
|
||||||
L4525 lda rwreqh
|
L4525 lda rwreqh
|
||||||
beq L4539 branch if request satisfied.
|
beq L4539 branch if request satisfied.
|
||||||
iny done with this block of data ?
|
iny done with this block of data ?
|
||||||
bne L4533 if not.
|
bne L4533 if not.
|
||||||
lda sos+1 this is necessary for proper
|
lda sos+1 this is necessary for proper
|
||||||
eor datptr+1 adjustment of request count
|
eor datptr+1 adjustment of request count
|
||||||
bne L4536
|
bne L4536
|
||||||
L4533 dec rwreqh
|
L4533 dec rwreqh
|
||||||
L4536 dey reset modified y
|
L4536 dey reset modified y
|
||||||
bra L4507
|
bra L4507
|
||||||
L4539 iny and position
|
L4539 iny and position
|
||||||
bne L4546
|
bne L4546
|
||||||
inc usrbuf+1 inc pointers
|
inc usrbuf+1 inc pointers
|
||||||
inc tposlh
|
inc tposlh
|
||||||
bne L4546
|
bne L4546
|
||||||
inc tposhi
|
inc tposhi
|
||||||
L4546 bit setvflg set v flag
|
L4546 bit setvflg set v flag
|
||||||
L4549 sty tposll save low position
|
L4549 sty tposll save low position
|
||||||
stx rwreql and remainder of request count.
|
stx rwreql and remainder of request count.
|
||||||
php save statuses
|
php save statuses
|
||||||
jsr gfcbstat
|
jsr gfcbstat
|
||||||
ora #$50
|
ora #$50
|
||||||
sta fcbbuf+8,y
|
sta fcbbuf+8,y
|
||||||
clc adjust user's low buffer address
|
clc adjust user's low buffer address
|
||||||
lda tposll
|
lda tposll
|
||||||
adc usrbuf
|
adc usrbuf
|
||||||
sta usrbuf
|
sta usrbuf
|
||||||
bcc L4564
|
bcc L4564
|
||||||
inc usrbuf+1 adjust high address as needed.
|
inc usrbuf+1 adjust high address as needed.
|
||||||
L4564 jsr fcbused set directory flush bit.
|
L4564 jsr fcbused set directory flush bit.
|
||||||
plp restore return statuses
|
plp restore return statuses
|
||||||
rts
|
rts
|
||||||
topdown .EQ *-ofsX
|
topdown .EQ *-ofsX
|
||||||
jsr swapdown make current 1st block an entry in new
|
jsr swapdown make current 1st block an entry in new
|
||||||
bcs L45B1 top. branch if errors.
|
bcs L45B1 top. branch if errors.
|
||||||
jsr gfcbstyp get storage type
|
jsr gfcbstyp get storage type
|
||||||
|
|
||||||
* has storage type been changed to 'tree' ? if not, assume it was originally
|
* has storage type been changed to 'tree' ? if not, assume it was originally
|
||||||
* a seed and both levels need to be built. otherwise, only an index needs
|
* a seed and both levels need to be built. otherwise, only an index needs
|
||||||
* to be allocated.
|
* to be allocated.
|
||||||
|
|
||||||
cmp #$03 tree type
|
cmp #$03 tree type
|
||||||
beq L457A
|
beq L457A
|
||||||
jsr swapdown make previous swap a sap level index
|
jsr swapdown make previous swap a sap level index
|
||||||
bcs L45B1 block. branch if errors.
|
bcs L45B1 block. branch if errors.
|
||||||
L457A jsr alcwblk get another block address for the sap
|
L457A jsr alcwblk get another block address for the sap
|
||||||
bcs L45B1 level index. branch if errors.
|
bcs L45B1 level index. branch if errors.
|
||||||
lda tposhi calculate position of new index block
|
lda tposhi calculate position of new index block
|
||||||
lsr in the top of the tree.
|
lsr in the top of the tree.
|
||||||
tay
|
tay
|
||||||
lda scrtch get address of newly allocated index
|
lda scrtch get address of newly allocated index
|
||||||
tax block again.
|
tax block again.
|
||||||
sta (zpt),y
|
sta (zpt),y
|
||||||
inc zpt+1
|
inc zpt+1
|
||||||
lda scrtch+1
|
lda scrtch+1
|
||||||
sta (zpt),y save hi address
|
sta (zpt),y save hi address
|
||||||
dec zpt+1
|
dec zpt+1
|
||||||
ldy fcbptr make newly allocated block the current
|
ldy fcbptr make newly allocated block the current
|
||||||
sta fcbbuf+15,y index block.
|
sta fcbbuf+15,y index block.
|
||||||
txa
|
txa
|
||||||
sta fcbbuf+14,y
|
sta fcbbuf+14,y
|
||||||
jsr wfcbfst save new top of tree
|
jsr wfcbfst save new top of tree
|
||||||
|
@ -516,26 +516,26 @@ L45B2 jsr alcwblk allocate a block before swap.
|
||||||
sta fcbbuf+12,y
|
sta fcbbuf+12,y
|
||||||
lda fcbbuf+13,y
|
lda fcbbuf+13,y
|
||||||
pha
|
pha
|
||||||
lda scrtch+1 and high address too
|
lda scrtch+1 and high address too
|
||||||
sta fcbbuf+13,y
|
sta fcbbuf+13,y
|
||||||
sta fcbbuf+15,y make new top also the current index in
|
sta fcbbuf+15,y make new top also the current index in
|
||||||
txa memory. get low address again.
|
txa memory. get low address again.
|
||||||
sta fcbbuf+14,y
|
sta fcbbuf+14,y
|
||||||
inc zpt+1 make previous the 1st entry in sub index
|
inc zpt+1 make previous the 1st entry in sub index
|
||||||
pla
|
pla
|
||||||
sta (zpt)
|
sta (zpt)
|
||||||
dec zpt+1
|
dec zpt+1
|
||||||
pla
|
pla
|
||||||
sta (zpt)
|
sta (zpt)
|
||||||
jsr wfcbfst save new file top.
|
jsr wfcbfst save new file top.
|
||||||
bcs L45F6 if error.
|
bcs L45F6 if error.
|
||||||
jsr gfcbstyp now adjust storage type by adding 1
|
jsr gfcbstyp now adjust storage type by adding 1
|
||||||
adc #$01 (seed becomes sapling becomes tree)
|
adc #$01 (seed becomes sapling becomes tree)
|
||||||
sta fcbbuf+7,y
|
sta fcbbuf+7,y
|
||||||
lda fcbbuf+8,y mark storage type modified
|
lda fcbbuf+8,y mark storage type modified
|
||||||
ora #$08
|
ora #$08
|
||||||
sta fcbbuf+8,y
|
sta fcbbuf+8,y
|
||||||
clc no error
|
clc no error
|
||||||
L45F6 rts
|
L45F6 rts
|
||||||
alcwblk .EQ *-ofsX
|
alcwblk .EQ *-ofsX
|
||||||
jsr alc1blk
|
jsr alc1blk
|
||||||
|
|
|
@ -3,610 +3,610 @@ NEW
|
||||||
|
|
||||||
* close command
|
* close command
|
||||||
|
|
||||||
closef .EQ *-ofsX close all ?
|
closef .EQ *-ofsX close all ?
|
||||||
ldy #$01
|
ldy #$01
|
||||||
lda (A3L),y
|
lda (A3L),y
|
||||||
bne L4683 no, just one of them.
|
bne L4683 no, just one of them.
|
||||||
sta cferr clear global close error.
|
sta cferr clear global close error.
|
||||||
lda #$00 start at the beginning.
|
lda #$00 start at the beginning.
|
||||||
L4654 sta fcbptr save current low byte of pointer.
|
L4654 sta fcbptr save current low byte of pointer.
|
||||||
tay get the level at which the file
|
tay get the level at which the file
|
||||||
lda fcbbuf+27,y was opened.
|
lda fcbbuf+27,y was opened.
|
||||||
cmp flevel if file's level is < global level
|
cmp flevel if file's level is < global level
|
||||||
bcc L4675 then don't close.
|
bcc L4675 then don't close.
|
||||||
lda fcbbuf,y is this reference file open ?
|
lda fcbbuf,y is this reference file open ?
|
||||||
beq L4675 no, try next.
|
beq L4675 no, try next.
|
||||||
jsr flush2 clean it out...
|
jsr flush2 clean it out...
|
||||||
bcs L46B6 return flush errors.
|
bcs L46B6 return flush errors.
|
||||||
jsr close2 update fcb & vcb
|
jsr close2 update fcb & vcb
|
||||||
ldy #$01
|
ldy #$01
|
||||||
lda (A3L),y
|
lda (A3L),y
|
||||||
beq L4675 no error if close all.
|
beq L4675 no error if close all.
|
||||||
bcs L46B6 close error.
|
bcs L46B6 close error.
|
||||||
L4675 lda fcbptr inc pointer to next fcb
|
L4675 lda fcbptr inc pointer to next fcb
|
||||||
clc
|
clc
|
||||||
adc #$20
|
adc #$20
|
||||||
bcc L4654 branch if within same page.
|
bcc L4654 branch if within same page.
|
||||||
lda cferr on final close report logged errors.
|
lda cferr on final close report logged errors.
|
||||||
beq L46B4 branch if errors.
|
beq L46B4 branch if errors.
|
||||||
rts (carry already set).
|
rts (carry already set).
|
||||||
L4683 jsr flush1 flush file 1st (including updating
|
L4683 jsr flush1 flush file 1st (including updating
|
||||||
bcs L46B6 bitmap). branch if errors.
|
bcs L46B6 bitmap). branch if errors.
|
||||||
close2 .EQ *-ofsX
|
close2 .EQ *-ofsX
|
||||||
ldy fcbptr
|
ldy fcbptr
|
||||||
lda fcbbuf+11,y release file buffer
|
lda fcbbuf+11,y release file buffer
|
||||||
jsr relbuffr
|
jsr relbuffr
|
||||||
bcs L46B6
|
bcs L46B6
|
||||||
lda #$00
|
lda #$00
|
||||||
ldy fcbptr
|
ldy fcbptr
|
||||||
sta fcbbuf,y free fcb too
|
sta fcbbuf,y free fcb too
|
||||||
lda fcbbuf+1,y
|
lda fcbbuf+1,y
|
||||||
sta devnum go look for associated vcb
|
sta devnum go look for associated vcb
|
||||||
jsr fnddvcb
|
jsr fnddvcb
|
||||||
ldx vcbptr get vcb pointer.
|
ldx vcbptr get vcb pointer.
|
||||||
dec vcbbuf+30,x indicate one less file open.
|
dec vcbbuf+30,x indicate one less file open.
|
||||||
bne L46B4 branch if that wasn't the last...
|
bne L46B4 branch if that wasn't the last...
|
||||||
lda vcbbuf+17,x
|
lda vcbbuf+17,x
|
||||||
and #$7F strip 'files open' bit
|
and #$7F strip 'files open' bit
|
||||||
sta vcbbuf+17,x
|
sta vcbbuf+17,x
|
||||||
L46B4 clc
|
L46B4 clc
|
||||||
rts
|
rts
|
||||||
L46B6 bcs L46E6 don't report close all error now.
|
L46B6 bcs L46E6 don't report close all error now.
|
||||||
|
|
||||||
* flush command
|
* flush command
|
||||||
|
|
||||||
flushf .EQ *-ofsX
|
flushf .EQ *-ofsX
|
||||||
ldy #$01 flush all ?
|
ldy #$01 flush all ?
|
||||||
lda (A3L),y
|
lda (A3L),y
|
||||||
bne L46E9 no, just one of them.
|
bne L46E9 no, just one of them.
|
||||||
sta cferr clear global flush error.
|
sta cferr clear global flush error.
|
||||||
lda #$00 start at the beginning.
|
lda #$00 start at the beginning.
|
||||||
L46C3 sta fcbptr save current low byte of pointer.
|
L46C3 sta fcbptr save current low byte of pointer.
|
||||||
tay index to ref #.
|
tay index to ref #.
|
||||||
lda fcbbuf,y is this reference file open ?
|
lda fcbbuf,y is this reference file open ?
|
||||||
beq L46D1 no, try next.
|
beq L46D1 no, try next.
|
||||||
jsr flush2 clean it out...
|
jsr flush2 clean it out...
|
||||||
bcs L46E6 return anty errors.
|
bcs L46E6 return anty errors.
|
||||||
L46D1 lda fcbptr inc pointer to next fcb.
|
L46D1 lda fcbptr inc pointer to next fcb.
|
||||||
clc
|
clc
|
||||||
adc #$20
|
adc #$20
|
||||||
bcc L46C3 branch if within same page
|
bcc L46C3 branch if within same page
|
||||||
L46D9 clc
|
L46D9 clc
|
||||||
lda cferr on last flush,
|
lda cferr on last flush,
|
||||||
beq L46E0 branch if no logged errors.
|
beq L46E0 branch if no logged errors.
|
||||||
sec report error now
|
sec report error now
|
||||||
L46E0 rts
|
L46E0 rts
|
||||||
flush2 .EQ *-ofsX
|
flush2 .EQ *-ofsX
|
||||||
jsr fndfcbuf must set up vcb & buffer locations 1st.
|
jsr fndfcbuf must set up vcb & buffer locations 1st.
|
||||||
bcc L46F1 branch if no error.
|
bcc L46F1 branch if no error.
|
||||||
L46E6 jmp glberr error so check for close or flush all.
|
L46E6 jmp glberr error so check for close or flush all.
|
||||||
flush1 .EQ *-ofsX for normal refnum flush,
|
flush1 .EQ *-ofsX for normal refnum flush,
|
||||||
L46E9 stz cferr clear global error.
|
L46E9 stz cferr clear global error.
|
||||||
jsr findfcb setup pointer to fcb user references.
|
jsr findfcb setup pointer to fcb user references.
|
||||||
bcs L46E6 return any errors.
|
bcs L46E6 return any errors.
|
||||||
L46F1 lda fcbbuf+9,y test to see if file is modified.
|
L46F1 lda fcbbuf+9,y test to see if file is modified.
|
||||||
and #$02 is it write enabled ?
|
and #$02 is it write enabled ?
|
||||||
beq L46D9 branch if 'read only'
|
beq L46D9 branch if 'read only'
|
||||||
lda fcbbuf+28,y has eof been modified ?
|
lda fcbbuf+28,y has eof been modified ?
|
||||||
bmi L4704 if yes.
|
bmi L4704 if yes.
|
||||||
jsr gfcbstat has data been modified ?
|
jsr gfcbstat has data been modified ?
|
||||||
and #$70 (was written to while it's been open?)
|
and #$70 (was written to while it's been open?)
|
||||||
beq L46D9 if not.
|
beq L46D9 if not.
|
||||||
L4704 jsr gfcbstat
|
L4704 jsr gfcbstat
|
||||||
and #$40 does current data buffer need to be
|
and #$40 does current data buffer need to be
|
||||||
beq L4710 written ? branch if not.
|
beq L4710 written ? branch if not.
|
||||||
jsr wfcbdat if so, go write it.
|
jsr wfcbdat if so, go write it.
|
||||||
bcs L46E6 if error.
|
bcs L46E6 if error.
|
||||||
L4710 jsr gfcbstat check to see if the index block (tree
|
L4710 jsr gfcbstat check to see if the index block (tree
|
||||||
and #$80 files only) needs to be written.
|
and #$80 files only) needs to be written.
|
||||||
beq L471C branch if not.
|
beq L471C branch if not.
|
||||||
jsr wfcbidx
|
jsr wfcbidx
|
||||||
bcs L46E6 return any errors.
|
bcs L46E6 return any errors.
|
||||||
L471C lda #$06 prepare to update directory
|
L471C lda #$06 prepare to update directory
|
||||||
tax
|
tax
|
||||||
ora fcbptr
|
ora fcbptr
|
||||||
tay
|
tay
|
||||||
L4723 lda fcbbuf,y note: this code depends on the defined
|
L4723 lda fcbbuf,y note: this code depends on the defined
|
||||||
sta d_dev-1,x order of the file control block and the
|
sta d_dev-1,x order of the file control block and the
|
||||||
dey temporary directory area in 'work space'
|
dey temporary directory area in 'work space'
|
||||||
dex
|
dex
|
||||||
bne L4723
|
bne L4723
|
||||||
sta devnum
|
sta devnum
|
||||||
lda d_head read the directory header for this file
|
lda d_head read the directory header for this file
|
||||||
ldx d_head+1
|
ldx d_head+1
|
||||||
jsr rdblk into the general purpose buffer.
|
jsr rdblk into the general purpose buffer.
|
||||||
bcs L46E6 if error.
|
bcs L46E6 if error.
|
||||||
jsr movhed0 move header info.
|
jsr movhed0 move header info.
|
||||||
lda d_entblk get address of directory block that
|
lda d_entblk get address of directory block that
|
||||||
ldy d_entblk+1 contains the file entry.
|
ldy d_entblk+1 contains the file entry.
|
||||||
cmp d_head test to see if it's the same block the
|
cmp d_head test to see if it's the same block the
|
||||||
bne L474E header is in. branch if not.
|
bne L474E header is in. branch if not.
|
||||||
cpy d_head+1
|
cpy d_head+1
|
||||||
beq L4755 branch if header block = entry block
|
beq L4755 branch if header block = entry block
|
||||||
L474E sta bloknml
|
L474E sta bloknml
|
||||||
sty bloknml+1
|
sty bloknml+1
|
||||||
jsr rdgbuf get block with file entry in general
|
jsr rdgbuf get block with file entry in general
|
||||||
L4755 jsr entcalc buffer. set up pointer to entry.
|
L4755 jsr entcalc buffer. set up pointer to entry.
|
||||||
jsr moventry move entry to temp entry buffer in
|
jsr moventry move entry to temp entry buffer in
|
||||||
ldy fcbptr 'work space'. update 'blocks used' count
|
ldy fcbptr 'work space'. update 'blocks used' count
|
||||||
lda fcbbuf+24,y
|
lda fcbbuf+24,y
|
||||||
sta d_usage
|
sta d_usage
|
||||||
lda fcbbuf+25,y
|
lda fcbbuf+25,y
|
||||||
sta d_usage+1
|
sta d_usage+1
|
||||||
ldx #$00 and move in end of file mark whether
|
ldx #$00 and move in end of file mark whether
|
||||||
L476C lda fcbbuf+21,y needed or not.
|
L476C lda fcbbuf+21,y needed or not.
|
||||||
sta d_eof,x
|
sta d_eof,x
|
||||||
inx
|
inx
|
||||||
cpx #$03 move all 3 bytes
|
cpx #$03 move all 3 bytes
|
||||||
beq L4780
|
beq L4780
|
||||||
lda fcbbuf+12,y also move in the address of the file's
|
lda fcbbuf+12,y also move in the address of the file's
|
||||||
sta d_filid,x first block since it might have changed
|
sta d_filid,x first block since it might have changed
|
||||||
iny since the file first opened.
|
iny since the file first opened.
|
||||||
bne L476C branch always.
|
bne L476C branch always.
|
||||||
L4780 lda fcbbuf+5,y the last thing to update is storage
|
L4780 lda fcbbuf+5,y the last thing to update is storage
|
||||||
asl type (y=fcbptr+2). shift into high
|
asl type (y=fcbptr+2). shift into high
|
||||||
asl nibble.
|
asl nibble.
|
||||||
asl
|
asl
|
||||||
asl
|
asl
|
||||||
sta scrtch
|
sta scrtch
|
||||||
lda d_stor get old type byte (might be the same).
|
lda d_stor get old type byte (might be the same).
|
||||||
and #$0F strip off old type,
|
and #$0F strip off old type,
|
||||||
ora scrtch add in the new type
|
ora scrtch add in the new type
|
||||||
sta d_stor and put it away.
|
sta d_stor and put it away.
|
||||||
jsr drevise go update directory.
|
jsr drevise go update directory.
|
||||||
bcs L47B4 error.
|
bcs L47B4 error.
|
||||||
ldy fcbptr mark
|
ldy fcbptr mark
|
||||||
lda fcbbuf+28,y fcb/directory
|
lda fcbbuf+28,y fcb/directory
|
||||||
and #$7F as
|
and #$7F as
|
||||||
sta fcbbuf+28,y undirty.
|
sta fcbbuf+28,y undirty.
|
||||||
lda d_dev see if bitmap should be written.
|
lda d_dev see if bitmap should be written.
|
||||||
cmp bmadev is it in same as current file ?
|
cmp bmadev is it in same as current file ?
|
||||||
bne L47B2 yes, put it on the disk if necessary.
|
bne L47B2 yes, put it on the disk if necessary.
|
||||||
jsr upbmap go put it away.
|
jsr upbmap go put it away.
|
||||||
bcs L47B4 flush error
|
bcs L47B4 flush error
|
||||||
L47B2 clc
|
L47B2 clc
|
||||||
rts
|
rts
|
||||||
|
|
||||||
* report error only if not a close all or flush all
|
* report error only if not a close all or flush all
|
||||||
|
|
||||||
glberr .EQ *-ofsX
|
glberr .EQ *-ofsX
|
||||||
L47B4 ldy #$01
|
L47B4 ldy #$01
|
||||||
pha
|
pha
|
||||||
lda (A3L),y
|
lda (A3L),y
|
||||||
bne L47C1 not an 'all' so report now
|
bne L47C1 not an 'all' so report now
|
||||||
clc
|
clc
|
||||||
pla
|
pla
|
||||||
sta cferr save for later
|
sta cferr save for later
|
||||||
rts
|
rts
|
||||||
L47C1 pla
|
L47C1 pla
|
||||||
rts
|
rts
|
||||||
gfcbstat .EQ *-ofsX
|
gfcbstat .EQ *-ofsX
|
||||||
ldy fcbptr index to fcb.
|
ldy fcbptr index to fcb.
|
||||||
lda fcbbuf+8,y return status byte.
|
lda fcbbuf+8,y return status byte.
|
||||||
rts
|
rts
|
||||||
L47CA lda #$4E access error
|
L47CA lda #$4E access error
|
||||||
sec
|
sec
|
||||||
L47CD rts
|
L47CD rts
|
||||||
|
|
||||||
seteof .EQ *-ofsX can only move end of tree, sapling
|
seteof .EQ *-ofsX can only move end of tree, sapling
|
||||||
jsr gfcbstyp or seed.
|
jsr gfcbstyp or seed.
|
||||||
cmp #$04 tree type ?
|
cmp #$04 tree type ?
|
||||||
bcs L47CA if not then access error
|
bcs L47CA if not then access error
|
||||||
asl
|
asl
|
||||||
asl
|
asl
|
||||||
asl
|
asl
|
||||||
asl
|
asl
|
||||||
sta stortyp may be used later.
|
sta stortyp may be used later.
|
||||||
lda fcbbuf+9,y
|
lda fcbbuf+9,y
|
||||||
and #$02 is write enabled to set new eof ?
|
and #$02 is write enabled to set new eof ?
|
||||||
beq L47CA no, access error.
|
beq L47CA no, access error.
|
||||||
jsr tstwprot hardware write protected ?
|
jsr tstwprot hardware write protected ?
|
||||||
bcs L47CA yes, access error.
|
bcs L47CA yes, access error.
|
||||||
ldy fcbptr save old eof so it can be seen
|
ldy fcbptr save old eof so it can be seen
|
||||||
iny whether blocks need to be released
|
iny whether blocks need to be released
|
||||||
iny upon contraction.
|
iny upon contraction.
|
||||||
ldx #$02 all 3 bytes of the eof
|
ldx #$02 all 3 bytes of the eof
|
||||||
L47EF lda fcbbuf+21,y
|
L47EF lda fcbbuf+21,y
|
||||||
sta oldeof,x
|
sta oldeof,x
|
||||||
dey
|
dey
|
||||||
dex
|
dex
|
||||||
bpl L47EF
|
bpl L47EF
|
||||||
ldy #$04
|
ldy #$04
|
||||||
ldx #$02
|
ldx #$02
|
||||||
L47FD lda (A3L),y position mark to new eof
|
L47FD lda (A3L),y position mark to new eof
|
||||||
sta tposll,x
|
sta tposll,x
|
||||||
dey
|
dey
|
||||||
dex
|
dex
|
||||||
bpl L47FD
|
bpl L47FD
|
||||||
ldx #$02 point to 3rd byte.
|
ldx #$02 point to 3rd byte.
|
||||||
L4808 lda oldeof,x see if eof moved backwards so blocks
|
L4808 lda oldeof,x see if eof moved backwards so blocks
|
||||||
cmp tposll,x can be released.
|
cmp tposll,x can be released.
|
||||||
bcc L4815 (branch if not)
|
bcc L4815 (branch if not)
|
||||||
bne purge branch if blocks to be released
|
bne purge branch if blocks to be released
|
||||||
dex
|
dex
|
||||||
bpl L4808 all 3 bytes
|
bpl L4808 all 3 bytes
|
||||||
eofset .EQ *-ofsX
|
eofset .EQ *-ofsX
|
||||||
L4815 ldy #$04
|
L4815 ldy #$04
|
||||||
ldx fcbptr place new end of file into fcb
|
ldx fcbptr place new end of file into fcb
|
||||||
inx
|
inx
|
||||||
inx
|
inx
|
||||||
L481C lda (A3L),y
|
L481C lda (A3L),y
|
||||||
sta fcbbuf+21,x
|
sta fcbbuf+21,x
|
||||||
dex
|
dex
|
||||||
dey
|
dey
|
||||||
cpy #$02 all 3 bytes moved ?
|
cpy #$02 all 3 bytes moved ?
|
||||||
bcs L481C no.
|
bcs L481C no.
|
||||||
jmp fcbused mark fcb as dirty.
|
jmp fcbused mark fcb as dirty.
|
||||||
purge jsr flush1 make sure file is current
|
purge jsr flush1 make sure file is current
|
||||||
bcs L47CD
|
bcs L47CD
|
||||||
ldx datptr+1 pointer to index block
|
ldx datptr+1 pointer to index block
|
||||||
inx
|
inx
|
||||||
inx
|
inx
|
||||||
stx zpt+1 (zero page conflict with dir buf ptr)
|
stx zpt+1 (zero page conflict with dir buf ptr)
|
||||||
ldx datptr
|
ldx datptr
|
||||||
stx zpt
|
stx zpt
|
||||||
ldy fcbptr check if eof < mark
|
ldy fcbptr check if eof < mark
|
||||||
iny
|
iny
|
||||||
iny
|
iny
|
||||||
ldx #$02
|
ldx #$02
|
||||||
L4840 lda fcbbuf+18,y
|
L4840 lda fcbbuf+18,y
|
||||||
cmp tposll,x compare until not equal or carry clear.
|
cmp tposll,x compare until not equal or carry clear.
|
||||||
bcc L485F branch if eof > mark.
|
bcc L485F branch if eof > mark.
|
||||||
bne L484E branch if eof < mark.
|
bne L484E branch if eof < mark.
|
||||||
dey
|
dey
|
||||||
dex
|
dex
|
||||||
bpl L4840 compare all 3 bytes
|
bpl L4840 compare all 3 bytes
|
||||||
L484E ldy fcbptr
|
L484E ldy fcbptr
|
||||||
ldx #$00
|
ldx #$00
|
||||||
L4853 lda tposll,x fake position, correct position will
|
L4853 lda tposll,x fake position, correct position will
|
||||||
sta fcbbuf+18,y be made below...
|
sta fcbbuf+18,y be made below...
|
||||||
iny
|
iny
|
||||||
inx
|
inx
|
||||||
cpx #$03 move all 3 bytes
|
cpx #$03 move all 3 bytes
|
||||||
bne L4853
|
bne L4853
|
||||||
L485F jsr tkfrecnt force free block count before releasing
|
L485F jsr tkfrecnt force free block count before releasing
|
||||||
lda tposll blocks. prepare for purge of excess...
|
lda tposll blocks. prepare for purge of excess...
|
||||||
sta dseed all blocks and bytes beyond new eof
|
sta dseed all blocks and bytes beyond new eof
|
||||||
lda tposlh must be zero'd
|
lda tposlh must be zero'd
|
||||||
sta dsap
|
sta dsap
|
||||||
and #$01
|
and #$01
|
||||||
sta dseed+1
|
sta dseed+1
|
||||||
lda tposhi
|
lda tposhi
|
||||||
lsr
|
lsr
|
||||||
sta dtree
|
sta dtree
|
||||||
ror dsap pass position in terms of block & bytes.
|
ror dsap pass position in terms of block & bytes.
|
||||||
lda dseed now adjust for boundaries of $200
|
lda dseed now adjust for boundaries of $200
|
||||||
ora dseed+1
|
ora dseed+1
|
||||||
bne L48A2 branch if no adjustment necessary.
|
bne L48A2 branch if no adjustment necessary.
|
||||||
lda dsap get correct block ositions for sap
|
lda dsap get correct block ositions for sap
|
||||||
sec and tree levels.
|
sec and tree levels.
|
||||||
sbc #$01
|
sbc #$01
|
||||||
sta dsap deallocate for last (phantom) block
|
sta dsap deallocate for last (phantom) block
|
||||||
lda #$02 and don't modify last data block.
|
lda #$02 and don't modify last data block.
|
||||||
bcs L489F branch if tree level unaffected.
|
bcs L489F branch if tree level unaffected.
|
||||||
dec dtree
|
dec dtree
|
||||||
bpl L489F branch if new eof not zero
|
bpl L489F branch if new eof not zero
|
||||||
lda #$00
|
lda #$00
|
||||||
sta dtree otherwise, make a null seed out of it.
|
sta dtree otherwise, make a null seed out of it.
|
||||||
sta dsap
|
sta dsap
|
||||||
L489F sta dseed+1
|
L489F sta dseed+1
|
||||||
L48A2 ldy fcbptr also must pass file's 1st block address.
|
L48A2 ldy fcbptr also must pass file's 1st block address.
|
||||||
lda fcbbuf+12,y
|
lda fcbbuf+12,y
|
||||||
sta firstbl
|
sta firstbl
|
||||||
lda fcbbuf+13,y
|
lda fcbbuf+13,y
|
||||||
sta firstbh
|
sta firstbh
|
||||||
stz deblock lastly, initialize # of blocks to
|
stz deblock lastly, initialize # of blocks to
|
||||||
stz deblock+1 be free'd.
|
stz deblock+1 be free'd.
|
||||||
jsr detree deallocate blocks from tree.
|
jsr detree deallocate blocks from tree.
|
||||||
php save any error status until fcb
|
php save any error status until fcb
|
||||||
pha is cleaned up.
|
pha is cleaned up.
|
||||||
sec
|
sec
|
||||||
ldy fcbptr
|
ldy fcbptr
|
||||||
ldx #$00
|
ldx #$00
|
||||||
L48C2 lda firstbl,x
|
L48C2 lda firstbl,x
|
||||||
sta fcbbuf+12,y move in possible new first file block
|
sta fcbbuf+12,y move in possible new first file block
|
||||||
lda fcbbuf+24,y address. adjust usage count also
|
lda fcbbuf+24,y address. adjust usage count also
|
||||||
sbc deblock,x
|
sbc deblock,x
|
||||||
sta fcbbuf+24,y
|
sta fcbbuf+24,y
|
||||||
iny
|
iny
|
||||||
inx
|
inx
|
||||||
txa
|
txa
|
||||||
and #$01 test for both bytes adjusted
|
and #$01 test for both bytes adjusted
|
||||||
bne L48C2 without disturbing carry.
|
bne L48C2 without disturbing carry.
|
||||||
lda stortyp get possibly modified storage type
|
lda stortyp get possibly modified storage type
|
||||||
lsr
|
lsr
|
||||||
lsr
|
lsr
|
||||||
lsr
|
lsr
|
||||||
lsr
|
lsr
|
||||||
ldy fcbptr and save it in fcb.
|
ldy fcbptr and save it in fcb.
|
||||||
sta fcbbuf+7,y
|
sta fcbbuf+7,y
|
||||||
jsr clrstats make it look as though position has
|
jsr clrstats make it look as though position has
|
||||||
jsr dvcbrev nothing allocated, update total blocks
|
jsr dvcbrev nothing allocated, update total blocks
|
||||||
ldy fcbptr in fcb and correct position.
|
ldy fcbptr in fcb and correct position.
|
||||||
iny
|
iny
|
||||||
iny
|
iny
|
||||||
ldx #$02
|
ldx #$02
|
||||||
L48F2 lda fcbbuf+18,y tell 'rdposn' to go to correct
|
L48F2 lda fcbbuf+18,y tell 'rdposn' to go to correct
|
||||||
sta tposll,x
|
sta tposll,x
|
||||||
eor #$80 position from incorrect place.
|
eor #$80 position from incorrect place.
|
||||||
sta fcbbuf+18,y
|
sta fcbbuf+18,y
|
||||||
dey
|
dey
|
||||||
dex
|
dex
|
||||||
bpl L48F2
|
bpl L48F2
|
||||||
jsr rdposn go to correct position.
|
jsr rdposn go to correct position.
|
||||||
bcc L490D if no error.
|
bcc L490D if no error.
|
||||||
tax otherwise, report latest error.
|
tax otherwise, report latest error.
|
||||||
pla
|
pla
|
||||||
plp
|
plp
|
||||||
txa restore latest error code to stack
|
txa restore latest error code to stack
|
||||||
sec
|
sec
|
||||||
php
|
php
|
||||||
pha save new error.
|
pha save new error.
|
||||||
|
|
||||||
* mark file as in need of a flush and update fcb with new end of file,
|
* mark file as in need of a flush and update fcb with new end of file,
|
||||||
* then flush it.
|
* then flush it.
|
||||||
|
|
||||||
L490D jsr eofset go mark and update
|
L490D jsr eofset go mark and update
|
||||||
jsr flush1 then go do the flush.
|
jsr flush1 then go do the flush.
|
||||||
bcc L491C branch if no error.
|
bcc L491C branch if no error.
|
||||||
tax save latest error.
|
tax save latest error.
|
||||||
pla clean previous error off stack
|
pla clean previous error off stack
|
||||||
plp
|
plp
|
||||||
txa and restore latest error to stack.
|
txa and restore latest error to stack.
|
||||||
sec show error condition.
|
sec show error condition.
|
||||||
php restore error status to stack
|
php restore error status to stack
|
||||||
pha and the error code.
|
pha and the error code.
|
||||||
L491C pla report any errors that may have
|
L491C pla report any errors that may have
|
||||||
plp appeared.
|
plp appeared.
|
||||||
rts
|
rts
|
||||||
|
|
||||||
geteof .EQ *-ofsX
|
geteof .EQ *-ofsX
|
||||||
ldx fcbptr index to end of file mark
|
ldx fcbptr index to end of file mark
|
||||||
ldy #$02 and index to user's call parameters
|
ldy #$02 and index to user's call parameters
|
||||||
L4924 lda fcbbuf+21,x
|
L4924 lda fcbbuf+21,x
|
||||||
sta (A3L),y
|
sta (A3L),y
|
||||||
inx
|
inx
|
||||||
iny
|
iny
|
||||||
cpy #$05
|
cpy #$05
|
||||||
bne L4924 loop until all 3 bytes moved
|
bne L4924 loop until all 3 bytes moved
|
||||||
clc no errors
|
clc no errors
|
||||||
rts
|
rts
|
||||||
|
|
||||||
newline .EQ *-ofsX
|
newline .EQ *-ofsX
|
||||||
ldy #$02 adjust newline status for open file.
|
ldy #$02 adjust newline status for open file.
|
||||||
lda (A3L),y on or off ?
|
lda (A3L),y on or off ?
|
||||||
ldx fcbptr it will be 0 if off.
|
ldx fcbptr it will be 0 if off.
|
||||||
sta fcbbuf+31,x set new line mask
|
sta fcbbuf+31,x set new line mask
|
||||||
iny
|
iny
|
||||||
lda (A3L),y and move in 'new-line' byte
|
lda (A3L),y and move in 'new-line' byte
|
||||||
sta fcbbuf+10,x
|
sta fcbbuf+10,x
|
||||||
clc no error possible
|
clc no error possible
|
||||||
rts
|
rts
|
||||||
|
|
||||||
getinfo .EQ *-ofsX
|
getinfo .EQ *-ofsX
|
||||||
jsr findfile look for file.
|
jsr findfile look for file.
|
||||||
bcc L4988 no error.
|
bcc L4988 no error.
|
||||||
cmp #$40 was it a root directory file ?
|
cmp #$40 was it a root directory file ?
|
||||||
sec (in case of no match)
|
sec (in case of no match)
|
||||||
bne L49A4 if not, then error.
|
bne L49A4 if not, then error.
|
||||||
lda #$F0
|
lda #$F0
|
||||||
sta d_stor for get info, report proper storage
|
sta d_stor for get info, report proper storage
|
||||||
stz reql type. forca a count of free blocks.
|
stz reql type. forca a count of free blocks.
|
||||||
stz reqh
|
stz reqh
|
||||||
ldx vcbptr
|
ldx vcbptr
|
||||||
jsr tkfrecnt get a fresh count of free blocks on
|
jsr tkfrecnt get a fresh count of free blocks on
|
||||||
ldx vcbptr this volume.
|
ldx vcbptr this volume.
|
||||||
lda vcbbuf+21,x return total blocks and total in use.
|
lda vcbbuf+21,x return total blocks and total in use.
|
||||||
sta reqh 1st transfer 'free' blocks to zpage
|
sta reqh 1st transfer 'free' blocks to zpage
|
||||||
lda vcbbuf+20,x for later subtraction to determine
|
lda vcbbuf+20,x for later subtraction to determine
|
||||||
sta reql the 'used' count.
|
sta reql the 'used' count.
|
||||||
lda vcbbuf+19,x transfer to 'd.' table as aux id
|
lda vcbbuf+19,x transfer to 'd.' table as aux id
|
||||||
sta d_auxid+1 (total block count is considered aux id
|
sta d_auxid+1 (total block count is considered aux id
|
||||||
pha for the volume)
|
pha for the volume)
|
||||||
lda vcbbuf+18,x
|
lda vcbbuf+18,x
|
||||||
sta d_auxid
|
sta d_auxid
|
||||||
sec subtract and report the number of
|
sec subtract and report the number of
|
||||||
sbc reql blocks 'in use'
|
sbc reql blocks 'in use'
|
||||||
sta d_usage
|
sta d_usage
|
||||||
pla
|
pla
|
||||||
sbc reqh
|
sbc reqh
|
||||||
sta d_usage+1
|
sta d_usage+1
|
||||||
L4988 lda d_stor transfer bytes from internal order to
|
L4988 lda d_stor transfer bytes from internal order to
|
||||||
lsr call spec via 'inftabl' translation
|
lsr call spec via 'inftabl' translation
|
||||||
lsr table but first change storage type to
|
lsr table but first change storage type to
|
||||||
lsr external (low nibble) format.
|
lsr external (low nibble) format.
|
||||||
lsr
|
lsr
|
||||||
sta d_stor
|
sta d_stor
|
||||||
ldy #$11 index to last of user's spec table.
|
ldy #$11 index to last of user's spec table.
|
||||||
L4994 lda inftabl-3,y
|
L4994 lda inftabl-3,y
|
||||||
and #$7F strip bit used by setinfo
|
and #$7F strip bit used by setinfo
|
||||||
tax
|
tax
|
||||||
lda d_stor,x move directory info to call spec. table
|
lda d_stor,x move directory info to call spec. table
|
||||||
sta (A3L),y
|
sta (A3L),y
|
||||||
dey
|
dey
|
||||||
cpy #$03
|
cpy #$03
|
||||||
bcs L4994 if all info bytes moved, retn carry clr
|
bcs L4994 if all info bytes moved, retn carry clr
|
||||||
L49A4 rts
|
L49A4 rts
|
||||||
|
|
||||||
setinfo .EQ *-ofsX
|
setinfo .EQ *-ofsX
|
||||||
jsr findfile get the file to work on.
|
jsr findfile get the file to work on.
|
||||||
bcs L49CF if error.
|
bcs L49CF if error.
|
||||||
lda bubit see if backup bit can be cleared
|
lda bubit see if backup bit can be cleared
|
||||||
eor #$20
|
eor #$20
|
||||||
and d_attr
|
and d_attr
|
||||||
and #$20
|
and #$20
|
||||||
sta bkbitflg or preserve current...
|
sta bkbitflg or preserve current...
|
||||||
ldy #$0D init pointer to user supplied list.
|
ldy #$0D init pointer to user supplied list.
|
||||||
L49B9 ldx inftabl-3,y get index to corresponding 'd.' table.
|
L49B9 ldx inftabl-3,y get index to corresponding 'd.' table.
|
||||||
bmi L49C3 branch if parameter can't be set.
|
bmi L49C3 branch if parameter can't be set.
|
||||||
lda (A3L),y
|
lda (A3L),y
|
||||||
sta d_stor,x
|
sta d_stor,x
|
||||||
L49C3 dey has user's request been satisfied ?
|
L49C3 dey has user's request been satisfied ?
|
||||||
cpy #$03
|
cpy #$03
|
||||||
bcs L49B9 no, move next byte.
|
bcs L49B9 no, move next byte.
|
||||||
and #$18 make sure no illegal access bits were
|
and #$18 make sure no illegal access bits were
|
||||||
beq L49D0 set !! branch if legal access.
|
beq L49D0 set !! branch if legal access.
|
||||||
lda #$4E otherwise, access error.
|
lda #$4E otherwise, access error.
|
||||||
sec
|
sec
|
||||||
L49CF rts
|
L49CF rts
|
||||||
L49D0 ldy #$0B
|
L49D0 ldy #$0B
|
||||||
lda (A3L),y was clock null input ?
|
lda (A3L),y was clock null input ?
|
||||||
beq L49D9 if yes.
|
beq L49D9 if yes.
|
||||||
jmp drevise1 end by updating directory.
|
jmp drevise1 end by updating directory.
|
||||||
L49D9 jmp drevise update with clock also...
|
L49D9 jmp drevise update with clock also...
|
||||||
|
|
||||||
rename .EQ *-ofsX
|
rename .EQ *-ofsX
|
||||||
jsr lookfile look for source (original) file.
|
jsr lookfile look for source (original) file.
|
||||||
bcc L4A1E if found.
|
bcc L4A1E if found.
|
||||||
cmp #$40 trying to rename a volume ?
|
cmp #$40 trying to rename a volume ?
|
||||||
bne L49FD no, return error.
|
bne L49FD no, return error.
|
||||||
jsr renpath syntax new name.
|
jsr renpath syntax new name.
|
||||||
bcs L49FD rename error.
|
bcs L49FD rename error.
|
||||||
ldy pathbuf find out if only rootname for new name
|
ldy pathbuf find out if only rootname for new name
|
||||||
iny
|
iny
|
||||||
lda pathbuf,y must be $FF if volume name only.
|
lda pathbuf,y must be $FF if volume name only.
|
||||||
bne L4A72 if not single name
|
bne L4A72 if not single name
|
||||||
ldx vcbptr check for open files before changing.
|
ldx vcbptr check for open files before changing.
|
||||||
lda vcbbuf+17,x
|
lda vcbbuf+17,x
|
||||||
bpl L49FF if volume not busy.
|
bpl L49FF if volume not busy.
|
||||||
lda #$50 file busy error.
|
lda #$50 file busy error.
|
||||||
L49FD sec
|
L49FD sec
|
||||||
rts
|
rts
|
||||||
L49FF ldy #$00 get newname's length
|
L49FF ldy #$00 get newname's length
|
||||||
lda pathbuf,y
|
lda pathbuf,y
|
||||||
ora #$F0 (root file storage type)
|
ora #$F0 (root file storage type)
|
||||||
jsr mvrotnam update root directory.
|
jsr mvrotnam update root directory.
|
||||||
bcs L4A74 rename error.
|
bcs L4A74 rename error.
|
||||||
ldy #$00
|
ldy #$00
|
||||||
ldx vcbptr update vcb also.
|
ldx vcbptr update vcb also.
|
||||||
L4A10 lda pathbuf,y move new name to vcb.
|
L4A10 lda pathbuf,y move new name to vcb.
|
||||||
beq L4A1C
|
beq L4A1C
|
||||||
sta vcbbuf,x
|
sta vcbbuf,x
|
||||||
iny next character
|
iny next character
|
||||||
inx
|
inx
|
||||||
bne L4A10 always.
|
bne L4A10 always.
|
||||||
L4A1C clc no errors
|
L4A1C clc no errors
|
||||||
rts
|
rts
|
||||||
L4A1E jsr getnamptr set y = 1st char of path, x = 0.
|
L4A1E jsr getnamptr set y = 1st char of path, x = 0.
|
||||||
L4A21 lda pathbuf,y move original name to gbuf
|
L4A21 lda pathbuf,y move original name to gbuf
|
||||||
sta gbuf,x for later comparison to new name.
|
sta gbuf,x for later comparison to new name.
|
||||||
bmi L4A2D if last character has been moved
|
bmi L4A2D if last character has been moved
|
||||||
iny otherwise, get the next one.
|
iny otherwise, get the next one.
|
||||||
inx
|
inx
|
||||||
bne L4A21 always.
|
bne L4A21 always.
|
||||||
L4A2D jsr renpath get new name syntaxed.
|
L4A2D jsr renpath get new name syntaxed.
|
||||||
bcs L4A74 rename error.
|
bcs L4A74 rename error.
|
||||||
jsr getnamptr set y = path, x = 0.
|
jsr getnamptr set y = path, x = 0.
|
||||||
lda pathbuf,y now compare new name with old name
|
lda pathbuf,y now compare new name with old name
|
||||||
L4A38 cmp gbuf,x to make sure they are in the same dir.
|
L4A38 cmp gbuf,x to make sure they are in the same dir.
|
||||||
php save result of comparison.
|
php save result of comparison.
|
||||||
and #$F0 was last char really a count ?
|
and #$F0 was last char really a count ?
|
||||||
bne L4A46 if not.
|
bne L4A46 if not.
|
||||||
sty rnptr save pointer to next name, it might
|
sty rnptr save pointer to next name, it might
|
||||||
stx namptr be the last.
|
stx namptr be the last.
|
||||||
L4A46 plp result of last comparison ?
|
L4A46 plp result of last comparison ?
|
||||||
bne L4A52 branch if different character or count.
|
bne L4A52 branch if different character or count.
|
||||||
inx bump pointers.
|
inx bump pointers.
|
||||||
iny
|
iny
|
||||||
lda pathbuf,y was it the last character ?
|
lda pathbuf,y was it the last character ?
|
||||||
bne L4A38 if not.
|
bne L4A38 if not.
|
||||||
clc no operation, names were the same.
|
clc no operation, names were the same.
|
||||||
rts
|
rts
|
||||||
L4A52 ldy rnptr index to last name in the chain.
|
L4A52 ldy rnptr index to last name in the chain.
|
||||||
lda pathbuf,y get last name length.
|
lda pathbuf,y get last name length.
|
||||||
sec
|
sec
|
||||||
adc rnptr
|
adc rnptr
|
||||||
tay
|
tay
|
||||||
lda pathbuf,y this byte should be $00 !
|
lda pathbuf,y this byte should be $00 !
|
||||||
bne L4A72 if not, bad path error.
|
bne L4A72 if not, bad path error.
|
||||||
ldx namptr index to last of original name
|
ldx namptr index to last of original name
|
||||||
lda gbuf,x
|
lda gbuf,x
|
||||||
sec
|
sec
|
||||||
adc namptr
|
adc namptr
|
||||||
tax
|
tax
|
||||||
lda gbuf,x this byte should also be $00.
|
lda gbuf,x this byte should also be $00.
|
||||||
beq L4A76 if so, continue processing.
|
beq L4A76 if so, continue processing.
|
||||||
L4A72 lda #$40 bad pathname error.
|
L4A72 lda #$40 bad pathname error.
|
||||||
L4A74 sec
|
L4A74 sec
|
||||||
rts
|
rts
|
||||||
L4A76 jsr lookfile test for duplicate file name.
|
L4A76 jsr lookfile test for duplicate file name.
|
||||||
bcs L4A7F branch if file not found, which is ok !!
|
bcs L4A7F branch if file not found, which is ok !!
|
||||||
lda #$47 duplicate name error.
|
lda #$47 duplicate name error.
|
||||||
sec
|
sec
|
||||||
rts
|
rts
|
||||||
L4A7F cmp #$46 was it a valid file not found ?
|
L4A7F cmp #$46 was it a valid file not found ?
|
||||||
bne L4A74 no, rename error.
|
bne L4A74 no, rename error.
|
||||||
jsr setpath syntax pathname of file to be changed.
|
jsr setpath syntax pathname of file to be changed.
|
||||||
jsr findfile get all the info on this file.
|
jsr findfile get all the info on this file.
|
||||||
bcs L4A74 rename error.
|
bcs L4A74 rename error.
|
||||||
jsr tstopen is file in use ?
|
jsr tstopen is file in use ?
|
||||||
lda #$50 anticipate file busy error.
|
lda #$50 anticipate file busy error.
|
||||||
bcs L4A74 error if in use.
|
bcs L4A74 error if in use.
|
||||||
lda d_attr test bit which allows rename.
|
lda d_attr test bit which allows rename.
|
||||||
and #$40
|
and #$40
|
||||||
bne L4A9D branch if ok to rename
|
bne L4A9D branch if ok to rename
|
||||||
lda #$4E otherwise, illegal access.
|
lda #$4E otherwise, illegal access.
|
||||||
L4A9B sec
|
L4A9B sec
|
||||||
rts
|
rts
|
||||||
L4A9D lda d_stor find out which storage type.
|
L4A9D lda d_stor find out which storage type.
|
||||||
and #$F0 strip off name length.
|
and #$F0 strip off name length.
|
||||||
cmp #$D0 is it a directory ?
|
cmp #$D0 is it a directory ?
|
||||||
beq L4AAE then ok.
|
beq L4AAE then ok.
|
||||||
cmp #$40 is it a seed, sapling or tree ?
|
cmp #$40 is it a seed, sapling or tree ?
|
||||||
bcc L4AAE then ok.
|
bcc L4AAE then ok.
|
||||||
lda #$4A file incompatible error.
|
lda #$4A file incompatible error.
|
||||||
bne L4A9B always.
|
bne L4A9B always.
|
||||||
L4AAE jsr renpath since both names go into the directory,
|
L4AAE jsr renpath since both names go into the directory,
|
||||||
bcs L4A74 syntax the new name to get the local
|
bcs L4A74 syntax the new name to get the local
|
||||||
ldy rnptr name address. y = index to local name
|
ldy rnptr name address. y = index to local name
|
||||||
ldx pathbuf,y length. adj y to last char of new name.
|
ldx pathbuf,y length. adj y to last char of new name. tya
|
||||||
tya
|
tya
|
||||||
adc pathbuf,y
|
adc pathbuf,y
|
||||||
tay
|
tay
|
||||||
L4ABE lda pathbuf,y move local name to dir entry workspace.
|
L4ABE lda pathbuf,y move local name to dir entry workspace.
|
||||||
sta d_stor,x
|
sta d_stor,x
|
||||||
dey
|
dey
|
||||||
dex
|
dex
|
||||||
bne L4ABE
|
bne L4ABE
|
||||||
lda d_stor preserve file storage type.
|
lda d_stor preserve file storage type.
|
||||||
and #$F0 strip off old name length.
|
and #$F0 strip off old name length.
|
||||||
tax
|
tax
|
||||||
ora pathbuf,y add in new name's length.
|
ora pathbuf,y add in new name's length.
|
||||||
sta d_stor
|
sta d_stor
|
||||||
cpx #$D0 that file must be changed also.
|
cpx #$D0 that file must be changed also.
|
||||||
bne L4AF0 branch if not directory type.
|
bne L4AF0 branch if not directory type.
|
||||||
lda d_frst read in 1st header block of subdir
|
lda d_frst read in 1st header block of subdir
|
||||||
ldx d_frst+1
|
ldx d_frst+1
|
||||||
jsr rdblk
|
jsr rdblk
|
||||||
bcs L4A74 errors.
|
bcs L4A74 errors.
|
||||||
ldy rnptr change the header's name to match the
|
ldy rnptr change the header's name to match the
|
||||||
lda pathbuf,y owner's new name. get local name length.
|
lda pathbuf,y owner's new name. get local name length.
|
||||||
ora #$E0 assume it's a header.
|
ora #$E0 assume it's a header.
|
||||||
jsr mvrotnam
|
jsr mvrotnam
|
||||||
bcs L4A74
|
bcs L4A74
|
||||||
L4AF0 jmp drevise1 end by updating all path directories.
|
L4AF0 jmp drevise1 end by updating all path directories.
|
||||||
mvrotnam .EQ *-ofsX
|
mvrotnam .EQ *-ofsX
|
||||||
ldx #$00
|
ldx #$00
|
||||||
L4AF5 sta gbuf+4,x
|
L4AF5 sta gbuf+4,x
|
||||||
inx
|
inx
|
||||||
iny
|
iny
|
||||||
lda pathbuf,y
|
lda pathbuf,y
|
||||||
bne L4AF5
|
bne L4AF5
|
||||||
jmp wrtgbuf write changed header block.
|
jmp wrtgbuf write changed header block.
|
||||||
renpath .EQ *-ofsX
|
renpath .EQ *-ofsX
|
||||||
ldy #$03 get address to new pathname
|
ldy #$03 get address to new pathname
|
||||||
lda (A3L),y
|
lda (A3L),y
|
||||||
iny
|
iny
|
||||||
sta zpt
|
sta zpt
|
||||||
lda (A3L),y set up for syntaxing routine (synpath)
|
lda (A3L),y set up for syntaxing routine (synpath)
|
||||||
sta zpt+1
|
sta zpt+1
|
||||||
jmp synpath do syntax (returns y = local namelength)
|
jmp synpath do syntax (returns y = local namelength)
|
||||||
getnamptr .EQ *-ofsX
|
getnamptr .EQ *-ofsX
|
||||||
ldy #$00 return pointer to 1st name of path.
|
ldy #$00 return pointer to 1st name of path.
|
||||||
bit prfxflg is this a prefixed name ?
|
bit prfxflg is this a prefixed name ?
|
||||||
bmi L4B1A branch if not.
|
bmi L4B1A branch if not.
|
||||||
ldy newpfxptr
|
ldy newpfxptr
|
||||||
L4B1A ldx #$00
|
L4B1A ldx #$00
|
||||||
rts
|
rts
|
||||||
|
|
||||||
MAN
|
MAN
|
||||||
|
|
|
@ -1,124 +1,124 @@
|
||||||
NEW
|
NEW
|
||||||
AUTO 3,1
|
AUTO 3,1
|
||||||
|
|
||||||
destroy .EQ *-ofsX
|
destroy .EQ *-ofsX
|
||||||
jsr findfile look for file to be destroyed.
|
jsr findfile look for file to be destroyed.
|
||||||
bcs L4B66 if error.
|
bcs L4B66 if error.
|
||||||
jsr tstopen is it open ?
|
jsr tstopen is it open ?
|
||||||
lda totent
|
lda totent
|
||||||
bne L4B64 error if open.
|
bne L4B64 error if open.
|
||||||
stz reql force proper free count in volume.
|
stz reql force proper free count in volume.
|
||||||
stz reqh (no disk access occurs if already
|
stz reqh (no disk access occurs if already
|
||||||
jsr tstfrblk proper)
|
jsr tstfrblk proper)
|
||||||
bcc L4B39 no errors.
|
bcc L4B39 no errors.
|
||||||
cmp #$48 was error a full disk ?
|
cmp #$48 was error a full disk ?
|
||||||
bne L4B66 no, report error.
|
bne L4B66 no, report error.
|
||||||
L4B39 lda d_attr make sure ok to destroy file.
|
L4B39 lda d_attr make sure ok to destroy file.
|
||||||
and #$80
|
and #$80
|
||||||
bne L4B45 branch if ok to destroy.
|
bne L4B45 branch if ok to destroy.
|
||||||
lda #$4E access error
|
lda #$4E access error
|
||||||
jsr p8errv (returns to caller)
|
jsr p8errv (returns to caller)
|
||||||
L4B45 lda devnum last device used.
|
L4B45 lda devnum last device used.
|
||||||
jsr twrprot1 test for write protected hardware
|
jsr twrprot1 test for write protected hardware
|
||||||
bcs L4B66 before going thru deallocation.
|
bcs L4B66 before going thru deallocation.
|
||||||
lda d_frst 'detree' needs first block address
|
lda d_frst 'detree' needs first block address
|
||||||
sta firstbl
|
sta firstbl
|
||||||
lda d_frst+1
|
lda d_frst+1
|
||||||
sta firstbh
|
sta firstbh
|
||||||
lda d_stor find out which storage type.
|
lda d_stor find out which storage type.
|
||||||
and #$F0 strip off name length.
|
and #$F0 strip off name length.
|
||||||
cmp #$40 is it a seed, sapling or tree ?
|
cmp #$40 is it a seed, sapling or tree ?
|
||||||
bcc L4B68 branch if it is.
|
bcc L4B68 branch if it is.
|
||||||
bra L4BCF otherwise, test for directory destroy.
|
bra L4BCF otherwise, test for directory destroy.
|
||||||
L4B64 lda #$50 file busy error.
|
L4B64 lda #$50 file busy error.
|
||||||
L4B66 sec can't be destroyed
|
L4B66 sec can't be destroyed
|
||||||
rts
|
rts
|
||||||
L4B68 sta stortyp destroy a tree file. save storage type.
|
L4B68 sta stortyp destroy a tree file. save storage type.
|
||||||
ldx #$05
|
ldx #$05
|
||||||
lda #$00 set 'detree' input variables, must be
|
lda #$00 set 'detree' input variables, must be
|
||||||
L4B6F sta stortyp,x in order: deblock, dtree, dsap, dseed.
|
L4B6F sta stortyp,x in order: deblock, dtree, dsap, dseed.
|
||||||
dex
|
dex
|
||||||
bne L4B6F loop until all zero'd.
|
bne L4B6F loop until all zero'd.
|
||||||
lda #$02 this avoids an extra file i/o and pre-
|
lda #$02 this avoids an extra file i/o and pre-
|
||||||
sta dseed+1 vents destruction of any deleted data.
|
sta dseed+1 vents destruction of any deleted data.
|
||||||
inc delflag don't allow detree to zero index blocks.
|
inc delflag don't allow detree to zero index blocks.
|
||||||
jsr detree make trees and saplings into seeds.
|
jsr detree make trees and saplings into seeds.
|
||||||
dec delflag reset flag.
|
dec delflag reset flag.
|
||||||
bcs L4B93 (de-evolution)
|
bcs L4B93 (de-evolution)
|
||||||
L4B85 ldx firstbh
|
L4B85 ldx firstbh
|
||||||
lda firstbl now deallocate seed.
|
lda firstbl now deallocate seed.
|
||||||
jsr dealloc
|
jsr dealloc
|
||||||
bcs L4B93
|
bcs L4B93
|
||||||
jsr upbmap
|
jsr upbmap
|
||||||
L4B93 pha save possible error code.
|
L4B93 pha save possible error code.
|
||||||
lda #$00 update directory to free entry space.
|
lda #$00 update directory to free entry space.
|
||||||
sta d_stor
|
sta d_stor
|
||||||
cmp h_fcnt file entry wrap ?
|
cmp h_fcnt file entry wrap ?
|
||||||
bne L4BA1 branch if no carry adjustment.
|
bne L4BA1 branch if no carry adjustment.
|
||||||
dec h_fcnt+1 take carry from hi byte of file entries.
|
dec h_fcnt+1 take carry from hi byte of file entries.
|
||||||
L4BA1 dec h_fcnt mark header with one less file.
|
L4BA1 dec h_fcnt mark header with one less file.
|
||||||
jsr dvcbrev go update block count in vcb (ignore
|
jsr dvcbrev go update block count in vcb (ignore
|
||||||
jsr drevise error, if any) and update dir last.
|
jsr drevise error, if any) and update dir last.
|
||||||
tax save possible new error code,
|
tax save possible new error code,
|
||||||
pla restore possible old error code.
|
pla restore possible old error code.
|
||||||
bcc L4BAF branch if last call succeeded.
|
bcc L4BAF branch if last call succeeded.
|
||||||
txa last call failed, use it's error code.
|
txa last call failed, use it's error code.
|
||||||
L4BAF cmp #$01 adjust carry accordingly
|
L4BAF cmp #$01 adjust carry accordingly
|
||||||
rts
|
rts
|
||||||
dvcbrev .EQ *-ofsX update block free count in vcb.
|
dvcbrev .EQ *-ofsX update block free count in vcb.
|
||||||
ldy vcbptr point to vcb of correct device.
|
ldy vcbptr point to vcb of correct device.
|
||||||
lda deblock get # of blocks recently freed.
|
lda deblock get # of blocks recently freed.
|
||||||
adc vcbbuf+20,y
|
adc vcbbuf+20,y
|
||||||
sta vcbbuf+20,y update current free block count.
|
sta vcbbuf+20,y update current free block count.
|
||||||
lda deblock+1
|
lda deblock+1
|
||||||
adc vcbbuf+21,y
|
adc vcbbuf+21,y
|
||||||
sta vcbbuf+21,y
|
sta vcbbuf+21,y
|
||||||
lda #$00 force re-scan from 1st bitmap
|
lda #$00 force re-scan from 1st bitmap
|
||||||
sta vcbbuf+28,y
|
sta vcbbuf+28,y
|
||||||
rts
|
rts
|
||||||
L4BCD bcc L4B85 branch widened (always taken)
|
L4BCD bcc L4B85 branch widened (always taken)
|
||||||
L4BCF cmp #$D0 is this a directory file ?
|
L4BCF cmp #$D0 is this a directory file ?
|
||||||
bne L4C1B no, file incompatible.
|
bne L4C1B no, file incompatible.
|
||||||
jsr fndbmap make sure a buffer available for bitmap
|
jsr fndbmap make sure a buffer available for bitmap
|
||||||
bcs L4C1A if error.
|
bcs L4C1A if error.
|
||||||
lda d_frst read 1st block of directory into gbuf
|
lda d_frst read 1st block of directory into gbuf
|
||||||
sta bloknml
|
sta bloknml
|
||||||
lda d_frst+1
|
lda d_frst+1
|
||||||
sta bloknml+1
|
sta bloknml+1
|
||||||
jsr rdgbuf
|
jsr rdgbuf
|
||||||
bcs L4C1A
|
bcs L4C1A
|
||||||
lda gbuf+37 do any files exist in this directory ?
|
lda gbuf+37 do any files exist in this directory ?
|
||||||
bne L4BF1 if so, access error.
|
bne L4BF1 if so, access error.
|
||||||
lda gbuf+38
|
lda gbuf+38
|
||||||
beq L4BF6
|
beq L4BF6
|
||||||
L4BF1 lda #$4E access error.
|
L4BF1 lda #$4E access error.
|
||||||
jsr p8errv P8 error vector
|
jsr p8errv P8 error vector
|
||||||
L4BF6 sta gbuf+4 make it an invalid subdirectory
|
L4BF6 sta gbuf+4 make it an invalid subdirectory
|
||||||
jsr wrtgbuf
|
jsr wrtgbuf
|
||||||
bcs L4C1A
|
bcs L4C1A
|
||||||
L4BFE lda gbuf+2 get forward link.
|
L4BFE lda gbuf+2 get forward link.
|
||||||
cmp #$01 test for null block into carry.
|
cmp #$01 test for null block into carry.
|
||||||
ldx gbuf+3 get the rest of the block address.
|
ldx gbuf+3 get the rest of the block address.
|
||||||
bne L4C0A branch if not null.
|
bne L4C0A branch if not null.
|
||||||
bcc L4BCD was the low part null as well ?
|
bcc L4BCD was the low part null as well ?
|
||||||
L4C0A jsr dealloc free this block.
|
L4C0A jsr dealloc free this block.
|
||||||
bcs L4C1A
|
bcs L4C1A
|
||||||
lda gbuf+2
|
lda gbuf+2
|
||||||
ldx gbuf+3
|
ldx gbuf+3
|
||||||
jsr rdblk
|
jsr rdblk
|
||||||
bcc L4BFE loop until all freed
|
bcc L4BFE loop until all freed
|
||||||
L4C1A rts
|
L4C1A rts
|
||||||
L4C1B lda #$4A file incompatible
|
L4C1B lda #$4A file incompatible
|
||||||
jsr p8errv (returns to caller)
|
jsr p8errv (returns to caller)
|
||||||
fcbused .EQ *-ofsX mark fcb as dirty so the directory
|
fcbused .EQ *-ofsX mark fcb as dirty so the directory
|
||||||
pha will be flushed on 'flush'.
|
pha will be flushed on 'flush'.
|
||||||
tya save regs.
|
tya save regs.
|
||||||
pha
|
pha
|
||||||
ldy fcbptr
|
ldy fcbptr
|
||||||
lda fcbbuf+28,y fetch current fcb dirty byte.
|
lda fcbbuf+28,y fetch current fcb dirty byte.
|
||||||
ora #$80 mark fcb as dirty.
|
ora #$80 mark fcb as dirty.
|
||||||
sta fcbbuf+28,y save it back
|
sta fcbbuf+28,y save it back
|
||||||
pla and restore regs.
|
pla and restore regs.
|
||||||
tay
|
tay
|
||||||
pla
|
pla
|
||||||
rts
|
rts
|
||||||
|
@ -143,21 +143,21 @@ fcbused .EQ *-ofsX mark fcb as dirty so the directory
|
||||||
* to trim a tree to a seed file, both dtree and dsap must be zero.
|
* to trim a tree to a seed file, both dtree and dsap must be zero.
|
||||||
* to go from tree to sapling, dtree alone must be zero.
|
* to go from tree to sapling, dtree alone must be zero.
|
||||||
|
|
||||||
detree .EQ *-ofsX
|
detree .EQ *-ofsX
|
||||||
lda stortyp which kind of tree ?
|
lda stortyp which kind of tree ?
|
||||||
cmp #$20 is it a 'seed' ?
|
cmp #$20 is it a 'seed' ?
|
||||||
bcc L4C46 if yes.
|
bcc L4C46 if yes.
|
||||||
cmp #$30 a sapling ?
|
cmp #$30 a sapling ?
|
||||||
bcc L4C51 if yes.
|
bcc L4C51 if yes.
|
||||||
cmp #$40 is it at least a 'tree' ?
|
cmp #$40 is it at least a 'tree' ?
|
||||||
bcc L4C59 branch if it is.
|
bcc L4C59 branch if it is.
|
||||||
lda #$0C block allocation error.
|
lda #$0C block allocation error.
|
||||||
jsr sysdeath P8 system death vector
|
jsr sysdeath P8 system death vector
|
||||||
|
|
||||||
* seedling file type - make sure first desireable block is the only
|
* seedling file type - make sure first desireable block is the only
|
||||||
* block available in a seedling file.
|
* block available in a seedling file.
|
||||||
|
|
||||||
L4C46 lda dsap
|
L4C46 lda dsap
|
||||||
ora dtree
|
ora dtree
|
||||||
bne L4CC2
|
bne L4CC2
|
||||||
jmp seedel0
|
jmp seedel0
|
||||||
|
@ -165,189 +165,189 @@ L4C46 lda dsap
|
||||||
* sapling file type - make sure first desireable block is within the range of
|
* sapling file type - make sure first desireable block is within the range of
|
||||||
* blocks available in a sapling file
|
* blocks available in a sapling file
|
||||||
|
|
||||||
L4C51 lda dtree can't have any blocks in this range
|
L4C51 lda dtree can't have any blocks in this range
|
||||||
bne L4CC2 if so then done
|
bne L4CC2 if so then done
|
||||||
jmp sapdel0 else go deallocate
|
jmp sapdel0 else go deallocate
|
||||||
L4C59 lda #$80
|
L4C59 lda #$80
|
||||||
sta topdest for tree top start at end, work backwards.
|
sta topdest for tree top start at end, work backwards.
|
||||||
L4C5E jsr drdfrst read specified first block into gbuf.
|
L4C5E jsr drdfrst read specified first block into gbuf.
|
||||||
bcs L4CC2 return errors.
|
bcs L4CC2 return errors.
|
||||||
ldy topdest get current pointer to top indexes.
|
ldy topdest get current pointer to top indexes.
|
||||||
cpy dtree have enough sapling indexes been
|
cpy dtree have enough sapling indexes been
|
||||||
beq L4CC3 deallocated? yes, now deallocate blocks
|
beq L4CC3 deallocated? yes, now deallocate blocks
|
||||||
ldx #$07 buffer up to 8 sapling index block
|
ldx #$07 buffer up to 8 sapling index block
|
||||||
L4C6D lda gbuf,y addresses. fetch low block address
|
L4C6D lda gbuf,y addresses. fetch low block address
|
||||||
sta dealbufl,x and save it.
|
sta dealbufl,x and save it.
|
||||||
ora gbuf+$100,y is it a real block that is allocated?
|
ora gbuf+$100,y is it a real block that is allocated?
|
||||||
beq L4C81 branch if phantom block.
|
beq L4C81 branch if phantom block.
|
||||||
lda gbuf+$100,y fetch high block address
|
lda gbuf+$100,y fetch high block address
|
||||||
sta dealbufh,x and save it.
|
sta dealbufh,x and save it.
|
||||||
dex decrement and test for dealc buf filled.
|
dex decrement and test for dealc buf filled.
|
||||||
bmi L4C93 branch if 8 addresses fetched.
|
bmi L4C93 branch if 8 addresses fetched.
|
||||||
L4C81 dey look for end of deallocation limit.
|
L4C81 dey look for end of deallocation limit.
|
||||||
cpy dtree is this the last position on tree level?
|
cpy dtree is this the last position on tree level?
|
||||||
bne L4C6D if not.
|
bne L4C6D if not.
|
||||||
iny
|
iny
|
||||||
lda #$00 fill rest of dealc buffer with null addresses.
|
lda #$00 fill rest of dealc buffer with null addresses.
|
||||||
L4C8A sta dealbufl,x
|
L4C8A sta dealbufl,x
|
||||||
sta dealbufh,x
|
sta dealbufh,x
|
||||||
dex
|
dex
|
||||||
bpl L4C8A
|
bpl L4C8A
|
||||||
L4C93 dey decrement to prepare for next time.
|
L4C93 dey decrement to prepare for next time.
|
||||||
sty topdest save index.
|
sty topdest save index.
|
||||||
ldx #$07
|
ldx #$07
|
||||||
L4C99 stx dtmpx save index to dealc buf.
|
L4C99 stx dtmpx save index to dealc buf.
|
||||||
lda dealbufl,x
|
lda dealbufl,x
|
||||||
sta bloknml
|
sta bloknml
|
||||||
ora dealbufh,x finished ?
|
ora dealbufh,x finished ?
|
||||||
beq L4C5E branch if done with this level.
|
beq L4C5E branch if done with this level.
|
||||||
lda dealbufh,x complete address with high byte,
|
lda dealbufh,x complete address with high byte,
|
||||||
sta bloknml+1
|
sta bloknml+1
|
||||||
jsr rdgbuf read sapling level into gbuf.
|
jsr rdgbuf read sapling level into gbuf.
|
||||||
bcs L4CC2 return errors.
|
bcs L4CC2 return errors.
|
||||||
jsr dealblk go free all data indexes in this block
|
jsr dealblk go free all data indexes in this block
|
||||||
bcs L4CC2
|
bcs L4CC2
|
||||||
jsr wrtgbuf write the flipped index block
|
jsr wrtgbuf write the flipped index block
|
||||||
bcs L4CC2
|
bcs L4CC2
|
||||||
ldx dtmpx restore index to dealc buff.
|
ldx dtmpx restore index to dealc buff.
|
||||||
dex are there more to free?
|
dex are there more to free?
|
||||||
bpl L4C99 branch if so.
|
bpl L4C99 branch if so.
|
||||||
bmi L4C5E branch always to get up to 8 more
|
bmi L4C5E branch always to get up to 8 more
|
||||||
L4CC2 rts sapling block numbers.
|
L4CC2 rts sapling block numbers.
|
||||||
L4CC3 ldy dtree deallocate all sapling blocks greater
|
L4CC3 ldy dtree deallocate all sapling blocks greater
|
||||||
iny than specified block.
|
iny than specified block.
|
||||||
jsr dalblk1 (master index in gbuf)
|
jsr dalblk1 (master index in gbuf)
|
||||||
bcs L4CC2 if errors.
|
bcs L4CC2 if errors.
|
||||||
jsr wrtgbuf write updated master index back to disk.
|
jsr wrtgbuf write updated master index back to disk.
|
||||||
bcs L4CC2
|
bcs L4CC2
|
||||||
ldy dtree figure out if tree can become sapling.
|
ldy dtree figure out if tree can become sapling.
|
||||||
beq L4CEB branch if it can.
|
beq L4CEB branch if it can.
|
||||||
lda gbuf,y otherwise, continue with partial.
|
lda gbuf,y otherwise, continue with partial.
|
||||||
sta bloknml deallocation of last sapling index.
|
sta bloknml deallocation of last sapling index.
|
||||||
ora gbuf+$100,y is there such a sapling index block ?
|
ora gbuf+$100,y is there such a sapling index block ?
|
||||||
beq L4CC2 all done if not.
|
beq L4CC2 all done if not.
|
||||||
lda gbuf+$100,y read in sapling level to be modified.
|
lda gbuf+$100,y read in sapling level to be modified.
|
||||||
sta bloknml+1
|
sta bloknml+1
|
||||||
jsr rdgbuf read highest sapling index into gbuf.
|
jsr rdgbuf read highest sapling index into gbuf.
|
||||||
bcc L4CF5
|
bcc L4CF5
|
||||||
rts
|
rts
|
||||||
L4CEB jsr shrink shrink tree to sapling
|
L4CEB jsr shrink shrink tree to sapling
|
||||||
bcs L4CC2
|
bcs L4CC2
|
||||||
sapdel0 .EQ *-ofsX
|
sapdel0 .EQ *-ofsX
|
||||||
jsr drdfrst read specified sapling level index
|
jsr drdfrst read specified sapling level index
|
||||||
bcs L4CC2 into gbuf. branch if error.
|
bcs L4CC2 into gbuf. branch if error.
|
||||||
L4CF5 ldy dsap pointer to last of desirable indexes.
|
L4CF5 ldy dsap pointer to last of desirable indexes.
|
||||||
iny inc to 1st undesirable.
|
iny inc to 1st undesirable.
|
||||||
beq L4D05 branch if all are desirable.
|
beq L4D05 branch if all are desirable.
|
||||||
jsr dalblk1 deallocate all indexes above specified.
|
jsr dalblk1 deallocate all indexes above specified.
|
||||||
bcs L4CC2
|
bcs L4CC2
|
||||||
jsr wrtgbuf write out the index block
|
jsr wrtgbuf write out the index block
|
||||||
bcs L4CC2
|
bcs L4CC2
|
||||||
L4D05 ldy dsap prepare to clean up last data block.
|
L4D05 ldy dsap prepare to clean up last data block.
|
||||||
beq L4D1F branch if possibility of making a seed.
|
beq L4D1F branch if possibility of making a seed.
|
||||||
L4D0A lda gbuf,y fetch low order data block address.
|
L4D0A lda gbuf,y fetch low order data block address.
|
||||||
sta bloknml
|
sta bloknml
|
||||||
ora gbuf+$100,y is it a real block ?
|
ora gbuf+$100,y is it a real block ?
|
||||||
beq L4CC2 if not, then done.
|
beq L4CC2 if not, then done.
|
||||||
lda gbuf+$100,y
|
lda gbuf+$100,y
|
||||||
sta bloknml+1
|
sta bloknml+1
|
||||||
jsr rdgbuf go read data block into gbuf.
|
jsr rdgbuf go read data block into gbuf.
|
||||||
bcc L4D2E branch if good read
|
bcc L4D2E branch if good read
|
||||||
rts or return error.
|
rts or return error.
|
||||||
L4D1F lda dtree are both tree and sap levels zero ?
|
L4D1F lda dtree are both tree and sap levels zero ?
|
||||||
bne L4D0A if not.
|
bne L4D0A if not.
|
||||||
jsr shrink reduce this sap to a seed.
|
jsr shrink reduce this sap to a seed.
|
||||||
bcs L4D52 if error.
|
bcs L4D52 if error.
|
||||||
seedel0 .EQ *-ofsX
|
seedel0 .EQ *-ofsX
|
||||||
jsr drdfrst go read data block.
|
jsr drdfrst go read data block.
|
||||||
bcs L4D52 if error.
|
bcs L4D52 if error.
|
||||||
L4D2E ldy dseed+1 check high byte for no deletion.
|
L4D2E ldy dseed+1 check high byte for no deletion.
|
||||||
beq L4D39 branch if all of 2nd page to be deleted.
|
beq L4D39 branch if all of 2nd page to be deleted.
|
||||||
dey if dseed > $200 then all were done.
|
dey if dseed > $200 then all were done.
|
||||||
bne L4D52 branch if that is the case.
|
bne L4D52 branch if that is the case.
|
||||||
ldy dseed clear only bytes >= dseed.
|
ldy dseed clear only bytes >= dseed.
|
||||||
L4D39 lda #$00
|
L4D39 lda #$00
|
||||||
L4D3B sta gbuf+$100,y zero out unwanted data
|
L4D3B sta gbuf+$100,y zero out unwanted data
|
||||||
iny
|
iny
|
||||||
bne L4D3B
|
bne L4D3B
|
||||||
ldy dseed+1 is that all ?
|
ldy dseed+1 is that all ?
|
||||||
bne L4D4F yes.
|
bne L4D4F yes.
|
||||||
ldy dseed
|
ldy dseed
|
||||||
L4D49 sta gbuf,y
|
L4D49 sta gbuf,y
|
||||||
iny
|
iny
|
||||||
bne L4D49
|
bne L4D49
|
||||||
L4D4F jmp wrtgbuf update data block to disk.
|
L4D4F jmp wrtgbuf update data block to disk.
|
||||||
L4D52 rts return error status.
|
L4D52 rts return error status.
|
||||||
drdfrst .EQ *-ofsX read specified 1st block into gbuf
|
drdfrst .EQ *-ofsX read specified 1st block into gbuf
|
||||||
lda firstbl
|
lda firstbl
|
||||||
ldx firstbh
|
ldx firstbh
|
||||||
jmp rdblk go read it
|
jmp rdblk go read it
|
||||||
|
|
||||||
* beware that dealloc may bring in a new bitmap block and may destroy
|
* beware that dealloc may bring in a new bitmap block and may destroy
|
||||||
* locations 46 and 47 which are used to point to the current index block.
|
* locations 46 and 47 which are used to point to the current index block.
|
||||||
|
|
||||||
shrink .EQ *-ofsX
|
shrink .EQ *-ofsX
|
||||||
ldx firstbh first deallocate top index block
|
ldx firstbh first deallocate top index block
|
||||||
txa
|
txa
|
||||||
pha
|
pha
|
||||||
lda firstbl
|
lda firstbl
|
||||||
pha save block address of this index block.
|
pha save block address of this index block.
|
||||||
jsr dealloc free it from the bitmap
|
jsr dealloc free it from the bitmap
|
||||||
pla
|
pla
|
||||||
sta bloknml set master of sapling
|
sta bloknml set master of sapling
|
||||||
pla index block address.
|
pla index block address.
|
||||||
sta bloknml+1
|
sta bloknml+1
|
||||||
bcs L4D8D report errors.
|
bcs L4D8D report errors.
|
||||||
lda gbuf get # of new 1st block from old index.
|
lda gbuf get # of new 1st block from old index.
|
||||||
sta firstbl
|
sta firstbl
|
||||||
lda gbuf+$100
|
lda gbuf+$100
|
||||||
sta firstbh
|
sta firstbh
|
||||||
ldy #$00
|
ldy #$00
|
||||||
jsr swapme flip that one entry in old top index.
|
jsr swapme flip that one entry in old top index.
|
||||||
sec now change file type,
|
sec now change file type,
|
||||||
lda stortyp from tree to sapling,
|
lda stortyp from tree to sapling,
|
||||||
sbc #$10 or from sapling to seed.
|
sbc #$10 or from sapling to seed.
|
||||||
sta stortyp
|
sta stortyp
|
||||||
jsr wrtgbuf write the (deallocated) old top index.
|
jsr wrtgbuf write the (deallocated) old top index.
|
||||||
L4D8D rts return error status.
|
L4D8D rts return error status.
|
||||||
dealblk .EQ *-ofsX
|
dealblk .EQ *-ofsX
|
||||||
ldy #$00 start at beginning.
|
ldy #$00 start at beginning.
|
||||||
dalblk1 .EQ *-ofsX
|
dalblk1 .EQ *-ofsX
|
||||||
lda bloknml save disk address of gbuf's data.
|
lda bloknml save disk address of gbuf's data.
|
||||||
pha
|
pha
|
||||||
lda bloknml+1
|
lda bloknml+1
|
||||||
pha
|
pha
|
||||||
L4D96 sty saptr save current index.
|
L4D96 sty saptr save current index.
|
||||||
lda gbuf,y get low address of block to deallocate.
|
lda gbuf,y get low address of block to deallocate.
|
||||||
cmp #$01 test for null block into carry.
|
cmp #$01 test for null block into carry.
|
||||||
ldx gbuf+$100,y get remainder of block address.
|
ldx gbuf+$100,y get remainder of block address.
|
||||||
bne L4DA5 branch if not null.
|
bne L4DA5 branch if not null.
|
||||||
bcc L4DB0 was the low part null too ?
|
bcc L4DB0 was the low part null too ?
|
||||||
L4DA5 jsr dealloc free it up on volume bitmap.
|
L4DA5 jsr dealloc free it up on volume bitmap.
|
||||||
bcs L4DB4 return any error.
|
bcs L4DB4 return any error.
|
||||||
ldy saptr get index to sapling level index block.
|
ldy saptr get index to sapling level index block.
|
||||||
jsr swapme
|
jsr swapme
|
||||||
L4DB0 iny next block address.
|
L4DB0 iny next block address.
|
||||||
bne L4D96 if more to deallocate or test.
|
bne L4D96 if more to deallocate or test.
|
||||||
clc no error.
|
clc no error.
|
||||||
L4DB4 tax save error code, if any.
|
L4DB4 tax save error code, if any.
|
||||||
pla restore blocknm (16 bit)
|
pla restore blocknm (16 bit)
|
||||||
sta bloknml+1
|
sta bloknml+1
|
||||||
pla
|
pla
|
||||||
sta bloknml
|
sta bloknml
|
||||||
txa restore return code
|
txa restore return code
|
||||||
rts
|
rts
|
||||||
swapme .EQ *-ofsX
|
swapme .EQ *-ofsX
|
||||||
lda delflag swapping or zeroing ?
|
lda delflag swapping or zeroing ?
|
||||||
bne L4DC5 skip if swapping.
|
bne L4DC5 skip if swapping.
|
||||||
tax make x = 0.
|
tax make x = 0.
|
||||||
beq L4DCB zero the index (always taken).
|
beq L4DCB zero the index (always taken).
|
||||||
L4DC5 ldx gbuf+$100,y index high
|
L4DC5 ldx gbuf+$100,y index high
|
||||||
lda gbuf,y index low
|
lda gbuf,y index low
|
||||||
L4DCB sta gbuf+$100,y save index high
|
L4DCB sta gbuf+$100,y save index high
|
||||||
txa
|
txa
|
||||||
sta gbuf,y save index low
|
sta gbuf,y save index low
|
||||||
rts done.
|
rts done.
|
||||||
|
|
||||||
MAN
|
MAN
|
||||||
SAVE USR/SRC/PRODOS.203/PRODOS.S.XDOS.F
|
SAVE USR/SRC/PRODOS.203/PRODOS.S.XDOS.F
|
||||||
|
|
|
@ -5,78 +5,78 @@ NEW
|
||||||
* allocate buffer in memory tables
|
* allocate buffer in memory tables
|
||||||
|
|
||||||
alcbuffr .EQ *-ofsX
|
alcbuffr .EQ *-ofsX
|
||||||
ldy #$04 index to user specified buffer.
|
ldy #$04 index to user specified buffer.
|
||||||
alcbufr1 .EQ *-ofsX
|
alcbufr1 .EQ *-ofsX
|
||||||
lda (A3L),y this buffer must be on a page boundary.
|
lda (A3L),y this buffer must be on a page boundary.
|
||||||
tax save for validation.
|
tax save for validation.
|
||||||
cmp #$08
|
cmp #$08
|
||||||
bcc L4E1E cannot be lower than video !
|
bcc L4E1E cannot be lower than video !
|
||||||
cmp #$BC nor greater than $BB00
|
cmp #$BC nor greater than $BB00
|
||||||
bcs L4E1E since it would wipe out globals...
|
bcs L4E1E since it would wipe out globals...
|
||||||
sta datptr+1
|
sta datptr+1
|
||||||
dey
|
dey
|
||||||
lda (A3L),y low address should be zero !
|
lda (A3L),y low address should be zero !
|
||||||
sta datptr
|
sta datptr
|
||||||
bne L4E1E error if not page boundary.
|
bne L4E1E error if not page boundary.
|
||||||
inx add 4 pages for 1k buffer.
|
inx add 4 pages for 1k buffer.
|
||||||
inx
|
inx
|
||||||
inx
|
inx
|
||||||
inx
|
inx
|
||||||
L4DED dex test for conflicts.
|
L4DED dex test for conflicts.
|
||||||
jsr cmembit test for free buffer space
|
jsr cmembit test for free buffer space
|
||||||
and memmap,y P8 memory bitmap
|
and memmap,y P8 memory bitmap
|
||||||
bne L4E1E report memory conflict, if any.
|
bne L4E1E report memory conflict, if any.
|
||||||
cpx datptr+1 test all 4 pages.
|
cpx datptr+1 test all 4 pages.
|
||||||
bne L4DED
|
bne L4DED
|
||||||
inx add 4 pages again for allocation.
|
inx add 4 pages again for allocation.
|
||||||
inx
|
inx
|
||||||
inx
|
inx
|
||||||
inx
|
inx
|
||||||
L4DFE dex set proper bits to 1
|
L4DFE dex set proper bits to 1
|
||||||
jsr cmembit
|
jsr cmembit
|
||||||
ora memmap,y to mark it's allocation.
|
ora memmap,y to mark it's allocation.
|
||||||
sta memmap,y
|
sta memmap,y
|
||||||
cpx datptr+1 set all 4 pages
|
cpx datptr+1 set all 4 pages
|
||||||
bne L4DFE
|
bne L4DFE
|
||||||
ldy fcbptr calculate buffer number
|
ldy fcbptr calculate buffer number
|
||||||
lda fcbbuf,y
|
lda fcbbuf,y
|
||||||
asl buffer number = (entnum) * 2.
|
asl buffer number = (entnum) * 2.
|
||||||
sta fcbbuf+11,y save it in fcb.
|
sta fcbbuf+11,y save it in fcb.
|
||||||
tax use entnum * 2 as index to global
|
tax use entnum * 2 as index to global
|
||||||
lda datptr+1 buffer addr tables. get addr already
|
lda datptr+1 buffer addr tables. get addr already
|
||||||
sta buftbl-1,x validated as good. store hi addr
|
sta buftbl-1,x validated as good. store hi addr
|
||||||
clc (entnums start at 1, not 0)
|
clc (entnums start at 1, not 0)
|
||||||
rts
|
rts
|
||||||
L4E1E lda #$56 buffer is in use or not legal
|
L4E1E lda #$56 buffer is in use or not legal
|
||||||
sec
|
sec
|
||||||
rts
|
rts
|
||||||
getbufadr .EQ *-ofsX
|
getbufadr .EQ *-ofsX
|
||||||
tax index into global buffer table.
|
tax index into global buffer table.
|
||||||
lda buftbl-2,x
|
lda buftbl-2,x
|
||||||
sta bufaddrl
|
sta bufaddrl
|
||||||
lda buftbl-1,x
|
lda buftbl-1,x
|
||||||
sta bufaddrh
|
sta bufaddrh
|
||||||
rts
|
rts
|
||||||
relbuffr .EQ *-ofsX preserve buffer address in 'bufaddr'
|
relbuffr .EQ *-ofsX preserve buffer address in 'bufaddr'
|
||||||
jsr getbufadr
|
jsr getbufadr
|
||||||
tay returns high buffer address in acc.
|
tay returns high buffer address in acc.
|
||||||
beq L4E54 branch if unallocated buffer space.
|
beq L4E54 branch if unallocated buffer space.
|
||||||
stz buftbl-1,x take address out of buffer list.
|
stz buftbl-1,x take address out of buffer list.
|
||||||
stz buftbl-2,x (x was set up by getbufadr)
|
stz buftbl-2,x (x was set up by getbufadr)
|
||||||
freebuf .EQ *-ofsX
|
freebuf .EQ *-ofsX
|
||||||
ldx bufaddrh get hi buffer address
|
ldx bufaddrh get hi buffer address
|
||||||
inx add 4 pages to account for 1k space.
|
inx add 4 pages to account for 1k space.
|
||||||
inx
|
inx
|
||||||
inx
|
inx
|
||||||
inx
|
inx
|
||||||
L4E43 dex drop to next lower page.
|
L4E43 dex drop to next lower page.
|
||||||
jsr cmembit get bit and position to memtable of
|
jsr cmembit get bit and position to memtable of
|
||||||
eor #$FF this page. invert mask.
|
eor #$FF this page. invert mask.
|
||||||
and memmap,y mark address as free space.
|
and memmap,y mark address as free space.
|
||||||
sta memmap,y
|
sta memmap,y
|
||||||
cpx bufaddrh all pages freed ?
|
cpx bufaddrh all pages freed ?
|
||||||
bne L4E43 no.
|
bne L4E43 no.
|
||||||
L4E54 clc no error.
|
L4E54 clc no error.
|
||||||
rts
|
rts
|
||||||
|
|
||||||
* calculate memory allocation bit position.
|
* calculate memory allocation bit position.
|
||||||
|
@ -84,83 +84,83 @@ L4E54 clc no error.
|
||||||
* on exit: acc = allocation bit mask, x = unchanged, y = pointer to memtabl byte
|
* on exit: acc = allocation bit mask, x = unchanged, y = pointer to memtabl byte
|
||||||
|
|
||||||
cmembit .EQ *-ofsX
|
cmembit .EQ *-ofsX
|
||||||
txa page address
|
txa page address
|
||||||
and #$07 which page in any 2k set ?
|
and #$07 which page in any 2k set ?
|
||||||
tay use as index to determine
|
tay use as index to determine
|
||||||
lda whichbit,y bit position representation.
|
lda whichbit,y bit position representation.
|
||||||
pha save bit position mask for now.
|
pha save bit position mask for now.
|
||||||
txa page address.
|
txa page address.
|
||||||
lsr
|
lsr
|
||||||
lsr determine 2k set
|
lsr determine 2k set
|
||||||
lsr
|
lsr
|
||||||
tay return it in y.
|
tay return it in y.
|
||||||
pla restore bit mask. return bit position
|
pla restore bit mask. return bit position
|
||||||
rts in a & y, pointer to memtabl in x.
|
rts in a & y, pointer to memtabl in x.
|
||||||
valdbuf .EQ *-ofsX
|
valdbuf .EQ *-ofsX
|
||||||
lda usrbuf+1 high address of user's buffer
|
lda usrbuf+1 high address of user's buffer
|
||||||
cmp #$02 must be greater than page 2.
|
cmp #$02 must be greater than page 2.
|
||||||
bcc L4E1E report bad buffer
|
bcc L4E1E report bad buffer
|
||||||
ldx cbytes+1
|
ldx cbytes+1
|
||||||
lda cbytes get cbytes-1 value.
|
lda cbytes get cbytes-1 value.
|
||||||
sbc #$01 (carry is set)
|
sbc #$01 (carry is set)
|
||||||
bcs L4E76
|
bcs L4E76
|
||||||
dex
|
dex
|
||||||
L4E76 clc
|
L4E76 clc
|
||||||
adc usrbuf calculate end of request address.
|
adc usrbuf calculate end of request address.
|
||||||
txa do high address.
|
txa do high address.
|
||||||
adc usrbuf+1 the final address
|
adc usrbuf+1 the final address
|
||||||
tax must be less than $BFnn (globals)
|
tax must be less than $BFnn (globals)
|
||||||
cpx #$BF
|
cpx #$BF
|
||||||
bcs L4E1E report bad buffer.
|
bcs L4E1E report bad buffer.
|
||||||
inx loop thru all affected pages.
|
inx loop thru all affected pages.
|
||||||
vldbuf1 .EQ *-ofsX
|
vldbuf1 .EQ *-ofsX
|
||||||
L4E82 dex check next lower page.
|
L4E82 dex check next lower page.
|
||||||
jsr cmembit
|
jsr cmembit
|
||||||
and memmap,y if 0 then no conflict.
|
and memmap,y if 0 then no conflict.
|
||||||
bne L4E1E branch if conflict.
|
bne L4E1E branch if conflict.
|
||||||
cpx usrbuf+1 was that the last (lowest) page ?
|
cpx usrbuf+1 was that the last (lowest) page ?
|
||||||
bne L4E82 if not.
|
bne L4E82 if not.
|
||||||
clc all pages ok.
|
clc all pages ok.
|
||||||
rts
|
rts
|
||||||
|
|
||||||
getbuf .EQ *-ofsX give user address of file buffer
|
getbuf .EQ *-ofsX give user address of file buffer
|
||||||
ldy #$02 referenced by refnum.
|
ldy #$02 referenced by refnum.
|
||||||
lda bufaddrl
|
lda bufaddrl
|
||||||
sta (A3L),y
|
sta (A3L),y
|
||||||
iny
|
iny
|
||||||
lda bufaddrh
|
lda bufaddrh
|
||||||
sta (A3L),y
|
sta (A3L),y
|
||||||
clc no errors possible
|
clc no errors possible
|
||||||
rts
|
rts
|
||||||
|
|
||||||
setbuf .EQ *-ofsX
|
setbuf .EQ *-ofsX
|
||||||
ldy #$03
|
ldy #$03
|
||||||
jsr alcbufr1 allocate new buffer address over old one
|
jsr alcbufr1 allocate new buffer address over old one
|
||||||
bcs L4EC7 report any errors immediately
|
bcs L4EC7 report any errors immediately
|
||||||
lda bufaddrh
|
lda bufaddrh
|
||||||
sta usrbuf+1
|
sta usrbuf+1
|
||||||
lda bufaddrl
|
lda bufaddrl
|
||||||
sta usrbuf
|
sta usrbuf
|
||||||
jsr freebuf free address space of old buffer
|
jsr freebuf free address space of old buffer
|
||||||
ldy #$00
|
ldy #$00
|
||||||
ldx #$03
|
ldx #$03
|
||||||
L4EB8 lda (usrbuf),y move all 4 pages of the buffer to
|
L4EB8 lda (usrbuf),y move all 4 pages of the buffer to
|
||||||
sta (datptr),y new location.
|
sta (datptr),y new location.
|
||||||
iny
|
iny
|
||||||
bne L4EB8
|
bne L4EB8
|
||||||
inc datptr+1
|
inc datptr+1
|
||||||
inc usrbuf+1
|
inc usrbuf+1
|
||||||
dex
|
dex
|
||||||
bpl L4EB8
|
bpl L4EB8
|
||||||
clc no errors
|
clc no errors
|
||||||
L4EC7 rts
|
L4EC7 rts
|
||||||
|
|
||||||
|
|
||||||
* move 3 pages of dispatcher from 'displc2' to 'dispadr'
|
* move 3 pages of dispatcher from 'displc2' to 'dispadr'
|
||||||
* this move routine must be resident above $E000 at all times
|
* this move routine must be resident above $E000 at all times
|
||||||
|
|
||||||
calldisp .EQ *-ofsX
|
calldisp .EQ *-ofsX
|
||||||
lda RRAMWRAMBNK2 read/write RAM bank 2
|
lda RRAMWRAMBNK2 read/write RAM bank 2
|
||||||
lda RRAMWRAMBNK2
|
lda RRAMWRAMBNK2
|
||||||
lda /dispadr
|
lda /dispadr
|
||||||
sta A2L+1
|
sta A2L+1
|
||||||
|
@ -170,104 +170,104 @@ calldisp .EQ *-ofsX
|
||||||
sta A1L+1
|
sta A1L+1
|
||||||
stz A1L
|
stz A1L
|
||||||
ldy #$00
|
ldy #$00
|
||||||
ldx #$03 3 pages to move.
|
ldx #$03 3 pages to move.
|
||||||
L4EE0 dey move a page of code.
|
L4EE0 dey move a page of code.
|
||||||
lda (A1L),y
|
lda (A1L),y
|
||||||
sta (A2L),y
|
sta (A2L),y
|
||||||
tya
|
tya
|
||||||
bne L4EE0
|
bne L4EE0
|
||||||
inc A1L+1 pointers to next page
|
inc A1L+1 pointers to next page
|
||||||
inc A2L+1
|
inc A2L+1
|
||||||
dex move all pages needed
|
dex move all pages needed
|
||||||
bne L4EE0
|
bne L4EE0
|
||||||
lda RRAMWRAMBNK1 read/write RAM bank 1
|
lda RRAMWRAMBNK1 read/write RAM bank 1
|
||||||
lda RRAMWRAMBNK1 swap mli space back in
|
lda RRAMWRAMBNK1 swap mli space back in
|
||||||
stz mliact MLI active flag
|
stz mliact MLI active flag
|
||||||
stz softev
|
stz softev
|
||||||
lda /dispadr point RESET to dispatch entry
|
lda /dispadr point RESET to dispatch entry
|
||||||
sta softev+1
|
sta softev+1
|
||||||
eor #$A5
|
eor #$A5
|
||||||
sta pwredup power up byte
|
sta pwredup power up byte
|
||||||
jmp dispadr
|
jmp dispadr
|
||||||
|
|
||||||
* translate a prodos call into a smartport call
|
* translate a prodos call into a smartport call
|
||||||
* to access unseen smartport devices
|
* to access unseen smartport devices
|
||||||
|
|
||||||
remap_sp .EQ *-ofsX
|
remap_sp .EQ *-ofsX
|
||||||
ldx #$03 assume 3 parameters.
|
ldx #$03 assume 3 parameters.
|
||||||
lda A4L command number
|
lda A4L command number
|
||||||
sta cmdnum
|
sta cmdnum
|
||||||
bne L4F1B taken if not status call
|
bne L4F1B taken if not status call
|
||||||
ldy #spstatlist set up memory for the status list buffer
|
ldy #spstatlist set up memory for the status list buffer
|
||||||
sty buf fake up the prodos parameters
|
sty buf fake up the prodos parameters
|
||||||
ldy /spstatlist
|
ldy /spstatlist
|
||||||
sty buf+1
|
sty buf+1
|
||||||
stz bloknml set statcode = 0 for simple status call
|
stz bloknml set statcode = 0 for simple status call
|
||||||
L4F1B cmp #$03 format command ?
|
L4F1B cmp #$03 format command ?
|
||||||
bne L4F21 no.
|
bne L4F21 no.
|
||||||
ldx #$01 format has only 1 parameter.
|
ldx #$01 format has only 1 parameter.
|
||||||
L4F21 stx statparms set # of parms.
|
L4F21 stx statparms set # of parms.
|
||||||
lda unitnum
|
lda unitnum
|
||||||
lsr turn unit number into an index
|
lsr turn unit number into an index
|
||||||
lsr
|
lsr
|
||||||
lsr
|
lsr
|
||||||
lsr
|
lsr
|
||||||
tax
|
tax
|
||||||
lda spunit-1,x get the smartport unit number and
|
lda spunit-1,x get the smartport unit number and
|
||||||
sta sp_unitnum store into smartport parm list.
|
sta sp_unitnum store into smartport parm list.
|
||||||
lda spvectlo-1,x
|
lda spvectlo-1,x
|
||||||
sta sp_vector+1 copy smartport entry address
|
sta sp_vector+1 copy smartport entry address
|
||||||
lda spvecthi-1,x
|
lda spvecthi-1,x
|
||||||
sta sp_vector+2
|
sta sp_vector+2
|
||||||
ldx #$04 copy buffer pointer and block #
|
ldx #$04 copy buffer pointer and block #
|
||||||
L4F3F lda buf-1,x from prodos parameters
|
L4F3F lda buf-1,x from prodos parameters
|
||||||
sta sp_bufptr-1,x to smartport parameter block
|
sta sp_bufptr-1,x to smartport parameter block
|
||||||
dex
|
dex
|
||||||
bne L4F3F
|
bne L4F3F
|
||||||
sp_vector .EQ *-ofsX smartport call
|
sp_vector .EQ *-ofsX smartport call
|
||||||
jsr $0000 (entry address gets modified)
|
jsr $0000 (entry address gets modified)
|
||||||
cmdnum .EQ *-ofsX
|
cmdnum .EQ *-ofsX
|
||||||
.HS 00 command #
|
.HS 00 command #
|
||||||
.DA statparms
|
.DA statparms
|
||||||
bcs L4F6E
|
bcs L4F6E
|
||||||
ldx cmdnum status call ?
|
ldx cmdnum status call ?
|
||||||
bne L4F6E no...
|
bne L4F6E no...
|
||||||
ldx spstatlist+1 else get the block count
|
ldx spstatlist+1 else get the block count
|
||||||
ldy spstatlist+2
|
ldy spstatlist+2
|
||||||
lda spstatlist get the returned status.
|
lda spstatlist get the returned status.
|
||||||
bit #$10 is there a disk present ?
|
bit #$10 is there a disk present ?
|
||||||
bne L4F65 yes, check for write protected.
|
bne L4F65 yes, check for write protected.
|
||||||
lda #$2F return offline error.
|
lda #$2F return offline error.
|
||||||
bra L4F6D
|
bra L4F6D
|
||||||
L4F65 and #$44 mask all but write allowed and write
|
L4F65 and #$44 mask all but write allowed and write
|
||||||
eor #$40 protected bits. if allowed and not
|
eor #$40 protected bits. if allowed and not
|
||||||
beq L4F6E protected, exit with carry clear
|
beq L4F6E protected, exit with carry clear
|
||||||
lda #$2B else return write protected error.
|
lda #$2B else return write protected error.
|
||||||
L4F6D sec
|
L4F6D sec
|
||||||
L4F6E rts
|
L4F6E rts
|
||||||
spvectlo .EQ *-ofsX storage for low byte of smartport
|
spvectlo .EQ *-ofsX storage for low byte of smartport
|
||||||
.HS 0000000000000000 entry.
|
.HS 0000000000000000 entry.
|
||||||
.HS 00000000000000
|
.HS 00000000000000
|
||||||
spvecthi .EQ *-ofsX storage for high byte of smartport
|
spvecthi .EQ *-ofsX storage for high byte of smartport
|
||||||
.HS 0000000000000000 entry.
|
.HS 0000000000000000 entry.
|
||||||
.HS 00000000000000
|
.HS 00000000000000
|
||||||
statparms .EQ *-ofsX # of parms (always 3 except format)
|
statparms .EQ *-ofsX # of parms (always 3 except format)
|
||||||
.HS 03
|
.HS 03
|
||||||
sp_unitnum .EQ *-ofsX
|
sp_unitnum .EQ *-ofsX
|
||||||
.HS 00 unit number
|
.HS 00 unit number
|
||||||
sp_bufptr .EQ *-ofsX
|
sp_bufptr .EQ *-ofsX
|
||||||
.HS 0000 data buffer
|
.HS 0000 data buffer
|
||||||
.HS 000000 block number (3 bytes)
|
.HS 000000 block number (3 bytes)
|
||||||
|
|
||||||
* data tables
|
* data tables
|
||||||
|
|
||||||
scnums .EQ *-ofsX table of valid mli command numbers.
|
scnums .EQ *-ofsX table of valid mli command numbers.
|
||||||
.HS D3000000
|
.HS D3000000
|
||||||
.HS 40410000808182
|
.HS 40410000808182
|
||||||
.HS 65C0C1C2C3C4C5C6
|
.HS 65C0C1C2C3C4C5C6
|
||||||
.HS C7C8C9CACBCCCDCE
|
.HS C7C8C9CACBCCCDCE
|
||||||
.HS CF00D0D1D2
|
.HS CF00D0D1D2
|
||||||
pcntbl .EQ *-ofsX parameter counts for the calls
|
pcntbl .EQ *-ofsX parameter counts for the calls
|
||||||
.HS 02FFFF
|
.HS 02FFFF
|
||||||
.HS FF0201FFFF030300
|
.HS FF0201FFFF030300
|
||||||
.HS 04070102070A0201
|
.HS 04070102070A0201
|
||||||
|
@ -277,26 +277,26 @@ pcntbl .EQ *-ofsX parameter counts for the calls
|
||||||
* command table
|
* command table
|
||||||
|
|
||||||
cmdtable .EQ *-ofsX
|
cmdtable .EQ *-ofsX
|
||||||
.DA create create
|
.DA create
|
||||||
.DA destroy destroy
|
.DA destroy
|
||||||
.DA rename rename
|
.DA rename
|
||||||
.DA setinfo setinfo
|
.DA setinfo
|
||||||
.DA getinfo getinfo
|
.DA getinfo
|
||||||
.DA online online
|
.DA online
|
||||||
.DA setprefx set prefix
|
.DA setprefx
|
||||||
.DA getprefx get prefix
|
.DA getprefx
|
||||||
.DA openf open
|
.DA openf
|
||||||
.DA newline newline
|
.DA newline
|
||||||
.DA readf read
|
.DA readf
|
||||||
.DA writef write
|
.DA writef
|
||||||
.DA closef close
|
.DA closef
|
||||||
.DA flushf flush
|
.DA flushf
|
||||||
.DA setmark set mark
|
.DA setmark
|
||||||
.DA getmark get mark
|
.DA getmark
|
||||||
.DA seteof seteof
|
.DA seteof
|
||||||
.DA geteof geteof
|
.DA geteof
|
||||||
.DA setbuf setbuf
|
.DA setbuf
|
||||||
.DA getbuf getbuf
|
.DA getbuf
|
||||||
|
|
||||||
* corresponding command function bytes
|
* corresponding command function bytes
|
||||||
|
|
||||||
|
@ -307,8 +307,8 @@ disptch .EQ *-ofsX
|
||||||
.HS 2C2D4E4F
|
.HS 2C2D4E4F
|
||||||
.HS 50515253
|
.HS 50515253
|
||||||
|
|
||||||
dinctbl .EQ *-ofsX table to increment
|
dinctbl .EQ *-ofsX table to increment
|
||||||
.HS 0100000200 directory usage/eof counts
|
.HS 0100000200 directory usage/eof counts
|
||||||
pass .EQ *-ofsX
|
pass .EQ *-ofsX
|
||||||
.HS 75
|
.HS 75
|
||||||
xdosver .EQ *-ofsX
|
xdosver .EQ *-ofsX
|
||||||
|
@ -342,64 +342,64 @@ own_ent .EQ *-ofsX
|
||||||
own_len .EQ *-ofsX
|
own_len .EQ *-ofsX
|
||||||
.HS 00
|
.HS 00
|
||||||
h_credt .EQ *-ofsX
|
h_credt .EQ *-ofsX
|
||||||
.HS 0000 directory creation date
|
.HS 0000 directory creation date
|
||||||
.HS 0000 directory creation time
|
.HS 0000 directory creation time
|
||||||
.HS 00 version under which this dir created
|
.HS 00 version under which this dir created
|
||||||
.HS 00 earliest version that it's compatible
|
.HS 00 earliest version that it's compatible
|
||||||
h_attr .EQ *-ofsX attributes (protect bit, etc.)
|
h_attr .EQ *-ofsX attributes (protect bit, etc.)
|
||||||
.HS 00
|
.HS 00
|
||||||
h_entln .EQ *-ofsX length of each entry in this directory
|
h_entln .EQ *-ofsX length of each entry in this directory
|
||||||
.HS 00
|
.HS 00
|
||||||
h_maxent .EQ *-ofsX maximum number of entries per block
|
h_maxent .EQ *-ofsX maximum number of entries per block
|
||||||
.HS 00
|
.HS 00
|
||||||
h_fcnt .EQ *-ofsX current # of files in this directory
|
h_fcnt .EQ *-ofsX current # of files in this directory
|
||||||
.HS 0000
|
.HS 0000
|
||||||
h_bmap .EQ *-ofsX address of first allocation bitmap
|
h_bmap .EQ *-ofsX address of first allocation bitmap
|
||||||
.HS 0000
|
.HS 0000
|
||||||
h_tblk .EQ *-ofsX total number of blocks on this unit
|
h_tblk .EQ *-ofsX total number of blocks on this unit
|
||||||
.HS 0000
|
.HS 0000
|
||||||
d_dev .EQ *-ofsX device number of this directory entry
|
d_dev .EQ *-ofsX device number of this directory entry
|
||||||
.HS 00
|
.HS 00
|
||||||
d_head .EQ *-ofsX address of <sub> directory header
|
d_head .EQ *-ofsX address of <sub> directory header
|
||||||
.HS 0000
|
.HS 0000
|
||||||
d_entblk .EQ *-ofsX address of block which contains entry
|
d_entblk .EQ *-ofsX address of block which contains entry
|
||||||
.HS 0000
|
.HS 0000
|
||||||
d_entnum .EQ *-ofsX entry number within block
|
d_entnum .EQ *-ofsX entry number within block
|
||||||
.HS 00
|
.HS 00
|
||||||
d_stor .EQ *-ofsX
|
d_stor .EQ *-ofsX
|
||||||
.HS 0000000000000000 file name
|
.HS 0000000000000000 file name
|
||||||
.HS 0000000000000000
|
.HS 0000000000000000
|
||||||
d_filid .EQ *-ofsX user's identification byte
|
d_filid .EQ *-ofsX user's identification byte
|
||||||
.HS 00
|
.HS 00
|
||||||
d_frst .EQ *-ofsX first block of file
|
d_frst .EQ *-ofsX first block of file
|
||||||
.HS 0000
|
.HS 0000
|
||||||
d_usage .EQ *-ofsX # of blocks allocated to this file
|
d_usage .EQ *-ofsX # of blocks allocated to this file
|
||||||
.HS 0000
|
.HS 0000
|
||||||
d_eof .EQ *-ofsX current end of file marker
|
d_eof .EQ *-ofsX current end of file marker
|
||||||
.HS 000000
|
.HS 000000
|
||||||
d_credt .EQ *-ofsX
|
d_credt .EQ *-ofsX
|
||||||
.HS 0000 file creation date
|
.HS 0000 file creation date
|
||||||
.HS 0000 file creation time
|
.HS 0000 file creation time
|
||||||
d_sosver .EQ *-ofsX sos version that created this file
|
d_sosver .EQ *-ofsX sos version that created this file
|
||||||
.HS 00
|
.HS 00
|
||||||
d_comp .EQ *-ofsX backward version compatibility
|
d_comp .EQ *-ofsX backward version compatibility
|
||||||
.HS 00
|
.HS 00
|
||||||
d_attr .EQ *-ofsX attributes (protect, r/w, enable, etc.)
|
d_attr .EQ *-ofsX attributes (protect, r/w, enable, etc.)
|
||||||
.HS 00
|
.HS 00
|
||||||
d_auxid .EQ *-ofsX user auxilliary identification
|
d_auxid .EQ *-ofsX user auxilliary identification
|
||||||
.HS 0000
|
.HS 0000
|
||||||
d_moddt .EQ *-ofsX
|
d_moddt .EQ *-ofsX
|
||||||
.HS 0000 file's last modification date
|
.HS 0000 file's last modification date
|
||||||
.HS 0000 file's last modification time
|
.HS 0000 file's last modification time
|
||||||
d_dhdr .EQ *-ofsX file directory header block address
|
d_dhdr .EQ *-ofsX file directory header block address
|
||||||
.HS 0000
|
.HS 0000
|
||||||
scrtch .EQ *-ofsX scratch area for
|
scrtch .EQ *-ofsX scratch area for
|
||||||
.HS 00000000 allocation address conversion.
|
.HS 00000000 allocation address conversion.
|
||||||
oldeof .EQ *-ofsX temp used in r/w
|
oldeof .EQ *-ofsX temp used in r/w
|
||||||
.HS 000000
|
.HS 000000
|
||||||
oldmark .EQ *-ofsX
|
oldmark .EQ *-ofsX
|
||||||
.HS 000000
|
.HS 000000
|
||||||
xvcbptr .EQ *-ofsX used in 'cmpvcb' as a temp
|
xvcbptr .EQ *-ofsX used in 'cmpvcb' as a temp
|
||||||
.HS 00
|
.HS 00
|
||||||
vcbptr .EQ *-ofsX
|
vcbptr .EQ *-ofsX
|
||||||
.HS 00
|
.HS 00
|
||||||
|
@ -464,11 +464,11 @@ nlchar .EQ *-ofsX
|
||||||
.HS 00
|
.HS 00
|
||||||
nlmask .EQ *-ofsX
|
nlmask .EQ *-ofsX
|
||||||
.HS 00
|
.HS 00
|
||||||
ioaccess .EQ *-ofsX has a call been made to
|
ioaccess .EQ *-ofsX has a call been made to
|
||||||
.HS 00 disk device handler ?
|
.HS 00 disk device handler ?
|
||||||
cmdtemp .EQ *-ofsX
|
cmdtemp .EQ *-ofsX
|
||||||
.HS 00
|
.HS 00
|
||||||
bkbitflg .EQ *-ofsX used to set or clear backup bit
|
bkbitflg .EQ *-ofsX used to set or clear backup bit
|
||||||
.HS 00
|
.HS 00
|
||||||
duplflag .EQ *-ofsX
|
duplflag .EQ *-ofsX
|
||||||
.HS 00
|
.HS 00
|
||||||
|
@ -510,22 +510,22 @@ topdest .EQ *-ofsX
|
||||||
.HS 00
|
.HS 00
|
||||||
dtmpx .EQ *-ofsX
|
dtmpx .EQ *-ofsX
|
||||||
.HS 00
|
.HS 00
|
||||||
loklst .EQ *-ofsX look list of recognized device numbers
|
loklst .EQ *-ofsX look list of recognized device numbers
|
||||||
dealbufl .EQ *-ofsX
|
dealbufl .EQ *-ofsX
|
||||||
.HS 0000000000000000
|
.HS 0000000000000000
|
||||||
dealbufh .EQ *-ofsX
|
dealbufh .EQ *-ofsX
|
||||||
.HS 0000000000000000
|
.HS 0000000000000000
|
||||||
cbytes .EQ *-ofsX
|
cbytes .EQ *-ofsX
|
||||||
.HS 0000
|
.HS 0000
|
||||||
.HS 00 cbytes+2 must = 0
|
.HS 00 cbytes+2 must = 0
|
||||||
bufaddrl .EQ *-ofsX
|
bufaddrl .EQ *-ofsX
|
||||||
.HS 00
|
.HS 00
|
||||||
bufaddrh .EQ *-ofsX
|
bufaddrh .EQ *-ofsX
|
||||||
.HS 00
|
.HS 00
|
||||||
goadr .EQ *-ofsX
|
goadr .EQ *-ofsX
|
||||||
.HS 0000
|
.HS 0000
|
||||||
delflag .EQ *-ofsX used by 'detree' to know if called
|
delflag .EQ *-ofsX used by 'detree' to know if called
|
||||||
.HS 00 from delete (destroy).
|
.HS 00 from delete (destroy).
|
||||||
|
|
||||||
* zero fill to page boundary - 3 ($FEFD). so that cortland flag stays
|
* zero fill to page boundary - 3 ($FEFD). so that cortland flag stays
|
||||||
* within page boundary.
|
* within page boundary.
|
||||||
|
@ -534,8 +534,8 @@ delflag .EQ *-ofsX used by 'detree' to know if called
|
||||||
.HS 0000000000
|
.HS 0000000000
|
||||||
|
|
||||||
.DA calldisp
|
.DA calldisp
|
||||||
cortflag .EQ *-ofsX cortland flag. 1 = Cortland system
|
cortflag .EQ *-ofsX cortland flag. 1 = Cortland system
|
||||||
.HS 00 (must stay within page boundary)
|
.HS 00 (must stay within page boundary)
|
||||||
|
|
||||||
* end of obj mli_2
|
* end of obj mli_2
|
||||||
*--------------------------------------
|
*--------------------------------------
|
||||||
|
|
Loading…
Reference in New Issue
Block a user