mirror of
https://github.com/A2osX/A2osX.git
synced 2025-04-07 09:37:34 +00:00
Kernel 0.93+
This commit is contained in:
parent
b913a91b77
commit
8e903db3d3
Binary file not shown.
@ -1,8 +1,5 @@
|
||||
NEW
|
||||
AUTO 3,1
|
||||
* object code = cclock_0
|
||||
* Cortland clock driver
|
||||
* $2F80-$2FFC moved to $D742
|
||||
*--------------------------------------
|
||||
CCLK.START >SHORTMX 8 bit mode.
|
||||
lda statereg state register.
|
||||
|
@ -4,7 +4,7 @@ NEW
|
||||
GP.START jmp GP.MLIENTRY $2E00-2EFF moved to $BF00
|
||||
jspare jmp * will be changed to point to dispatcher.
|
||||
clockv rts changed to jmp ($4C) if clock present.
|
||||
.DA $D742 clock routine entry address.
|
||||
.DA XDOS.ClockDrv clock routine entry address.
|
||||
GP.P8errv jmp XDOS.syserr error reporting hook.
|
||||
sysdeath jmp sysdeath1 system failure hook.
|
||||
p8error .DA #0
|
||||
|
@ -215,10 +215,10 @@ LDR.IRQ lda RROMWRAMBNK2
|
||||
sta jspare+1 P8 system death vector
|
||||
lda /calldisp
|
||||
sta jspare+2
|
||||
|
||||
.DO LOWERCASE=0
|
||||
lda kversion
|
||||
sta xdosver save current version for dir use
|
||||
|
||||
.FIN
|
||||
lda idapple
|
||||
sta MACHID
|
||||
|
||||
|
@ -115,6 +115,7 @@ XDOS.devmgr php do not allow interrupts.
|
||||
sei the call spec for devices must
|
||||
|
||||
ldy #$05
|
||||
|
||||
.1 lda (A3L),y be passed to drivers in page zero:
|
||||
sta A4L,y
|
||||
dey
|
||||
@ -397,6 +398,7 @@ XDOS.SetPrefix jsr XDOS.GetPath call is made to detect if a null path.
|
||||
|
||||
H3333 jsr findfile go find specified prefix directory.
|
||||
bcc H333C if no error.
|
||||
|
||||
cmp #MLI.E.INVPATH bad pathname.
|
||||
bne pfxerr branch if error is not root directory.
|
||||
|
||||
@ -426,16 +428,16 @@ H334D tay
|
||||
lda d_frst+1
|
||||
sta p_blok+1
|
||||
|
||||
movprfx lda pathbuf,y
|
||||
.1 lda pathbuf,y
|
||||
sta pathbuf,x
|
||||
iny
|
||||
inx
|
||||
bne movprfx
|
||||
bne .1
|
||||
|
||||
clc good prefix
|
||||
rts
|
||||
|
||||
ptyperr lda #$4B filetype error (not a directory)
|
||||
ptyperr lda #MLI.E.UNSUPST filetype error (not a directory)
|
||||
pfxerr sec
|
||||
rts
|
||||
*--------------------------------------
|
||||
@ -446,9 +448,11 @@ XDOS.GetPrefix clc calc how big a buffer is needed.
|
||||
iny
|
||||
lda (A3L),y
|
||||
sta usrbuf+1
|
||||
|
||||
stz cbytes+1 set buffer length at 64 char max
|
||||
lda #$40
|
||||
sta cbytes
|
||||
|
||||
jsr valdbuf go validate prefix buffer address
|
||||
bcs pfxerr
|
||||
|
||||
@ -470,17 +474,17 @@ sndlimit sta (usrbuf),y give char to user.
|
||||
and #$F0 check for length descriptor.
|
||||
bne H33B3 branch if regular character
|
||||
|
||||
lda #$2F otherwise, substitute a slash.
|
||||
lda #'/' otherwise, substitute a slash.
|
||||
bne sndlimit branch always
|
||||
|
||||
H33B3 inx
|
||||
bne sendprfx branch if more to send.
|
||||
iny
|
||||
lda #$2F end with '/'
|
||||
lda #'/' end with '/'
|
||||
sta (usrbuf),y
|
||||
gotprfx clc no error
|
||||
rts
|
||||
|
||||
*--------------------------------------
|
||||
findfcb ldy #$01 index to ref#
|
||||
lda (A3L),y is it a valid file# ?
|
||||
beq badref must not be 0.
|
||||
@ -884,6 +888,8 @@ cmvheadr lda d_stor,x
|
||||
eor #$30
|
||||
sta gbuf+4 make it a directory header mark.
|
||||
|
||||
.DO LOWERCASE=0
|
||||
|
||||
ldx #$07 overwrite password area and other
|
||||
|
||||
cmvpass lda pass,x header info.
|
||||
@ -893,6 +899,17 @@ cmvpass lda pass,x header info.
|
||||
sta gbuf+32,x
|
||||
dex
|
||||
bpl cmvpass
|
||||
|
||||
.ELSE
|
||||
|
||||
ldx #XDOS.VolHdrDef.Cnt-1
|
||||
|
||||
.1 lda XDOS.VolHdrDef,x
|
||||
sta gbuf+34,x
|
||||
dex
|
||||
bpl .1
|
||||
|
||||
.FIN
|
||||
|
||||
ldx #$02 and include info about parent directory
|
||||
stx d_eof+1
|
||||
|
@ -128,13 +128,20 @@ namfound jsr nxtpname adj index to next name in path.
|
||||
lda (zpt),y
|
||||
sta bloknml+1
|
||||
sta d_head+1
|
||||
|
||||
jsr rdgbuf read subdirectory into gbuf.
|
||||
bcs fnderr1 if error.
|
||||
bcs L389C if error.
|
||||
|
||||
lda gbuf+37 get the # of files contained in this
|
||||
sta entcntl directory.
|
||||
lda gbuf+38
|
||||
sta entcnth
|
||||
*--------------------------------------
|
||||
* Check if $75 at VOL/DIR entry + $14
|
||||
* (8 bytes reserved)
|
||||
*--------------------------------------
|
||||
lda gbuf+20 make sure password is disabled
|
||||
|
||||
ldx #$00
|
||||
sec
|
||||
rol
|
||||
@ -148,26 +155,31 @@ L386C asl
|
||||
beq movhead
|
||||
|
||||
lda #MLI.E.INCFF directory is not compatible
|
||||
fnderr1 sec
|
||||
sec
|
||||
rts
|
||||
|
||||
*--------------------------------------
|
||||
movhead jsr movhed0 move directory info.
|
||||
jmp lookfil0 do next local pathname.
|
||||
|
||||
movhed0 ldx #$0A move this directory info
|
||||
|
||||
L387F lda gbuf+28,x
|
||||
sta h_credt,x
|
||||
dex
|
||||
bpl L387F
|
||||
|
||||
lda gbuf+4 if this is root, then nothing to do
|
||||
and #$F0
|
||||
eor #$F0 test header type.
|
||||
beq L389C branch if root
|
||||
|
||||
ldx #$03 otherwise, save owner info about
|
||||
|
||||
L3893 lda gbuf+39,x this header.
|
||||
sta own_blk,x
|
||||
dex
|
||||
bpl L3893
|
||||
|
||||
L389C rts
|
||||
*--------------------------------------
|
||||
filfound lda h_maxent figure out which entry # this is
|
||||
@ -216,7 +228,7 @@ isname and #$0F strip byte (is checked by 'filfound')
|
||||
cmpname inx (first) next letter index
|
||||
iny
|
||||
|
||||
.DO LOWERCASE=2
|
||||
.DO LOWERCASE=1
|
||||
phy
|
||||
cpy #8 CS if MIN_VERSION to use
|
||||
|
||||
@ -496,7 +508,7 @@ XDOS.CheckVolName
|
||||
L3A90 sec indicate not found
|
||||
rts
|
||||
|
||||
L3A92 .DO LOWERCASE=2
|
||||
L3A92 .DO LOWERCASE=1
|
||||
lda gbuf+$20 VERSION
|
||||
bpl .8
|
||||
|
||||
|
@ -1,9 +1,6 @@
|
||||
NEW
|
||||
AUTO 3,1
|
||||
|
||||
* deallocate a block's entry in bitmap
|
||||
* on entry, x,a = address of block
|
||||
|
||||
*--------------------------------------
|
||||
dealloc stx bmcnt high address of block.
|
||||
pha save low address.
|
||||
ldx vcbptr check that bitmap block address is
|
||||
@ -46,6 +43,7 @@ L3C64 ldy bmptr index to byte
|
||||
ora bmbuf+$100,y
|
||||
sta bmbuf+$100,y
|
||||
bcs L3C7D always.
|
||||
|
||||
bmbufhi ora bmbuf,y this address + 2 is used as an absolute reference to bmbuf high byte.
|
||||
sta bmbuf,y
|
||||
L3C7D lda #$80 mark bitmap as modified
|
||||
@ -58,7 +56,7 @@ L3C8B rts
|
||||
L3C8C lda #$5A bitmap block # impossible.
|
||||
sec bitmap disk address wrong
|
||||
rts (maybe data masquerading as indx block)
|
||||
|
||||
*--------------------------------------
|
||||
alc1blk jsr fndbmap get address of bitmap.
|
||||
bcs L3CB8 error.
|
||||
L3C95 ldy #$00 begin search at start of bitmap block.
|
||||
@ -120,6 +118,7 @@ L3D10 clc no errors.
|
||||
lda scrtch return address in y,a of newly
|
||||
ldy scrtch+1 allocated block.
|
||||
rts
|
||||
*--------------------------------------
|
||||
nxtbmap ldy vcbptr inc to next bitmap, but 1st make sure there is another one.
|
||||
lda vcbbuf+19,y
|
||||
lsr
|
||||
@ -132,36 +131,48 @@ nxtbmap ldy vcbptr inc to next bitmap, but 1st make sure there is another
|
||||
inc
|
||||
sta vcbbuf+28,y
|
||||
jsr upbmap
|
||||
|
||||
fndbmap ldy vcbptr
|
||||
lda vcbbuf+16,y get device #.
|
||||
cmp bmadev does this map match this device ?
|
||||
beq L3D4A yes.
|
||||
|
||||
jsr upbmap otherwise, save other volume's bitmap
|
||||
bcs L3D5F
|
||||
|
||||
ldy vcbptr
|
||||
lda vcbbuf+16,y
|
||||
sta bmadev and read in fresh bitmap for this dev.
|
||||
|
||||
L3D4A ldy bmastat is it already modified ?
|
||||
bmi L3D54 yes, return pointer
|
||||
|
||||
jsr gtbmap otherwise read in fresh bitmap.
|
||||
bcs L3D5F if error.
|
||||
|
||||
L3D54 ldy vcbptr get relative block # of bitmap.
|
||||
lda vcbbuf+28,y
|
||||
asl 2 pages per block
|
||||
sta basval
|
||||
|
||||
clc no errors.
|
||||
L3D5F rts
|
||||
L3D60 lda #$48 request can't be filled
|
||||
|
||||
L3D60 lda #MLI.E.VOLFULL request can't be filled
|
||||
sec error
|
||||
rts
|
||||
*--------------------------------------
|
||||
upbmap clc
|
||||
lda bmastat is current map modified ?
|
||||
bpl L3D5F no.
|
||||
|
||||
jsr wrtbmap update device.
|
||||
bcs L3D5F if error on writing.
|
||||
|
||||
lda #$00
|
||||
sta bmastat mark bitmap buffer as free
|
||||
rts
|
||||
*--------------------------------------
|
||||
gtbmap sta bmadev read bitmap specified by dev and vcb.
|
||||
ldy vcbptr get lowest map # with free blocks in it
|
||||
lda vcbbuf+28,y
|
||||
@ -173,6 +184,7 @@ gtbmap sta bmadev read bitmap specified by dev and vcb.
|
||||
adc #$00
|
||||
sta bmadadr+1
|
||||
lda #$01 read device command
|
||||
|
||||
L3D92 sta A4L
|
||||
lda devnum save current dev #
|
||||
pha
|
||||
@ -188,6 +200,7 @@ L3D92 sta A4L
|
||||
pla restore current dev #
|
||||
sta devnum
|
||||
bcc L3DB6 and return it if no error.
|
||||
|
||||
txa error code
|
||||
L3DB6 rts
|
||||
|
||||
@ -195,6 +208,7 @@ rdblk sta bloknml
|
||||
stx bloknml+1
|
||||
jsr rdgbuf
|
||||
rts
|
||||
|
||||
wrtbmap lda #$02 write command.
|
||||
bne L3D92 always.
|
||||
|
||||
@ -216,39 +230,50 @@ dobitmap php no interrupts
|
||||
sta unitnum convert to unit #.
|
||||
jsr dmgr call the driver.
|
||||
bcs L3DE8 if error.
|
||||
|
||||
plp restore interrupts.
|
||||
clc
|
||||
rts
|
||||
|
||||
L3DE8 plp file i/o error. restore interrupts.
|
||||
sec
|
||||
rts
|
||||
*--------------------------------------
|
||||
getmark ldx fcbptr index to open fcb.
|
||||
XDOS.GetMark ldx fcbptr index to open fcb.
|
||||
|
||||
ldy #$02 index to user's mark parmeter.
|
||||
|
||||
.1 lda fcbbuf+18,x transfer current position
|
||||
sta (A3L),y to user's parameter list
|
||||
inx
|
||||
iny
|
||||
cpy #$05 transfer 3 bytes
|
||||
bne .1
|
||||
|
||||
clc
|
||||
rts
|
||||
|
||||
L3DFD lda #$4D invalid position
|
||||
sec
|
||||
rts
|
||||
* set mark command
|
||||
setmark ldy #$04 index to user's desired position.
|
||||
*--------------------------------------
|
||||
XDOS.SetMark ldy #$04 index to user's desired position.
|
||||
ldx fcbptr file's control block index.
|
||||
inx inc by 2 for index to hi eof
|
||||
inx
|
||||
sec indicate comparisons are necessary.
|
||||
|
||||
.1 lda (A3L),y move it to 'tpos'
|
||||
sta tposll-2,y
|
||||
bcc .2 branch if mark < eof
|
||||
|
||||
cmp fcbbuf+21,x
|
||||
bcc .2 branch if mark qualifies.
|
||||
|
||||
bne L3DFD branch if mark > eof (invalid position)
|
||||
|
||||
dex
|
||||
|
||||
.2 dey move/compare next lower byte of mark.
|
||||
tya test for all bytes moved/tested.
|
||||
eor #$01 preserves carry status.
|
||||
@ -333,6 +358,7 @@ L3EA9 ldx levels be sure there is a top index
|
||||
sta fcbbuf+15,y
|
||||
bcc datlevel branch always
|
||||
L3ED4 rts
|
||||
|
||||
posindex jsr clrstats clr all alloc requirements for previous
|
||||
jsr rfcbfst position. get highest level index block
|
||||
bcs L3ED4
|
||||
@ -460,9 +486,10 @@ dirpos1 lda (datptr),y get link address of previous or next
|
||||
lda (datptr),y get the rest of the link.
|
||||
bne L3FD8 branch if certain link exists.
|
||||
bcs L3FD8 was the low part null as well ?
|
||||
lda #$4C something is wrong with directory file!
|
||||
lda #MLI.E.EOF something is wrong with directory file!
|
||||
L3FD6 sec error.
|
||||
rts
|
||||
|
||||
L3FD8 sta bloknml+1
|
||||
|
||||
* read file's data block
|
||||
@ -491,6 +518,7 @@ rfcbidx lda #$01 prepare to read index block : read command
|
||||
sta fcbbuf+15,y
|
||||
clc
|
||||
L400C rts
|
||||
|
||||
L400D lda #$02 write command
|
||||
.HS 2C skip next instruction
|
||||
|
||||
@ -538,6 +566,7 @@ L405E plp restore interrupts
|
||||
rts
|
||||
wfcbfst jsr upbmap update the bitmap
|
||||
bra L400D and write file's 1st block.
|
||||
|
||||
wfcbdat ldx #datptr point at memory address with x and
|
||||
lda #$10 disk address with y.
|
||||
ora fcbptr add offset to fcbptr
|
||||
@ -547,6 +576,7 @@ wfcbdat ldx #datptr point at memory address with x and
|
||||
bcs L4096 if errors.
|
||||
lda #$BF mark data status as current.
|
||||
bra L408D
|
||||
|
||||
wfcbidx jsr upbmap update bitmap.
|
||||
ldx #$48 point to address of index buffer
|
||||
lda #$0E and block address of that index block.
|
||||
@ -565,26 +595,22 @@ XDOS.Open jsr findfile look up the file.
|
||||
bcc L40A0 if ok.
|
||||
|
||||
cmp #MLI.E.INVPATH is this opening a root directory ?
|
||||
bne L40A7 if not, then error.
|
||||
bne L40AE if not, then error.
|
||||
|
||||
L40A0 jsr tstopen are any other files writing to this
|
||||
bcc L40AD same file ? branch if not.
|
||||
|
||||
L40A5 lda #MLI.E.OPEN file is busy, shared access not allowed.
|
||||
L40A7 sec
|
||||
rts
|
||||
|
||||
.HS 2C
|
||||
L40A9 lda #MLI.E.UNSUPST file is wrong storage type.
|
||||
sec
|
||||
.HS 2C
|
||||
L40AB lda #MLI.E.FCBFULL fcb full error.
|
||||
L40AE sec
|
||||
rts
|
||||
|
||||
L40AD ldy fcbptr get address of 1st free fcb found.
|
||||
lda fcbflg if this byte <> 0 then free fcb found
|
||||
bne L40B9 and available for use.
|
||||
|
||||
lda #MLI.E.FCBFULL fcb full error.
|
||||
sec
|
||||
rts
|
||||
beq L40AB and available for use.
|
||||
|
||||
L40B9 ldx #$1F assign fcb,
|
||||
|
||||
@ -617,7 +643,9 @@ L40CB lda d_dev-1,x move ownership info.
|
||||
and #$03 as a default access request.
|
||||
cpx #$0D if directory, don't allow write enable.
|
||||
bne L40EB
|
||||
|
||||
and #$01 read enabled bit
|
||||
|
||||
L40EB sta fcbbuf+9,y
|
||||
and #$02 check for write enabled request.
|
||||
beq L40F7 branch for open as read-only
|
||||
@ -641,12 +669,14 @@ L4101 sta bloknml+1 of file and current usage count.
|
||||
sta fcbbuf,y
|
||||
dex
|
||||
bpl L4101 last loop stores hi address of 1st block
|
||||
|
||||
sta bloknml and this is the low one.
|
||||
ldy fcbptr
|
||||
lda cntent this was set up by 'tstopen'.
|
||||
sta fcbbuf,y claim fcb for this file.
|
||||
jsr alcbuffr go allocate buffer in memory tables.
|
||||
bcs L4147 if errors.
|
||||
|
||||
jsr fndfcbuf rtn addr of bufs in data & index ptrs.
|
||||
lda flevel mark level at which
|
||||
sta fcbbuf+27,y file was opened.
|
||||
@ -655,26 +685,34 @@ L4101 sta bloknml+1 of file and current usage count.
|
||||
bcs L415E no, assume a directory.
|
||||
lda #$FF fool the position routine into giving
|
||||
sta fcbbuf+20,y a valid position with preloaded data,
|
||||
|
||||
ldy #$02 etc. set desired position to 0.
|
||||
lda #$00
|
||||
|
||||
L413C sta tposll,y
|
||||
dey
|
||||
bpl L413C
|
||||
|
||||
jsr rdposn let tree position routine do the rest.
|
||||
bcc L4163 if successful.
|
||||
|
||||
L4147 pha save error code.
|
||||
ldy fcbptr free buffer space.
|
||||
lda fcbbuf+11,y
|
||||
beq L4156 if no bufnum, ok because never alloc'd.
|
||||
|
||||
jsr relbuffr go release buffer.
|
||||
ldy fcbptr since error was before file was
|
||||
|
||||
L4156 lda #$00 successfully opened, then it is
|
||||
sta fcbbuf,y necessary to release fcb also.
|
||||
pla error code.
|
||||
sec
|
||||
rts
|
||||
|
||||
L415E jsr rfcbdat read in 1st block of directory file.
|
||||
bcs L4147 return error after freeing buffer & fcb.
|
||||
|
||||
L4163 ldx vcbptr index to vcb.
|
||||
inc vcbbuf+30,x add 1 to # of files currently open
|
||||
lda vcbbuf+17,x and indicate that this volume has at
|
||||
@ -686,51 +724,58 @@ L4163 ldx vcbptr index to vcb.
|
||||
sta (A3L),y
|
||||
clc open is successful
|
||||
rts
|
||||
|
||||
* test open
|
||||
* is there an open file?
|
||||
|
||||
*--------------------------------------
|
||||
tstopen lda #$00
|
||||
sta cntent returns the ref # of a free fcb.
|
||||
sta totent flag to indicate file already open.
|
||||
sta fcbflg flag indicates a free fcb is available.
|
||||
|
||||
L4188 tay index to next fcb.
|
||||
ldx fcbflg test for free fcb found.
|
||||
bne L4191 if already found.
|
||||
|
||||
inc cntent
|
||||
|
||||
L4191 lda fcbbuf,y is this fcb in use ?
|
||||
bne L41A3 yes.
|
||||
|
||||
txa if not, should we claim it ?
|
||||
bne L41C1 branch if free fcb already found.
|
||||
|
||||
sty fcbptr save index to new free fcb.
|
||||
lda #$FF set fcb flag to indicate
|
||||
sta fcbflg free fcb found.
|
||||
bne L41C1 branch always to test next fcb.
|
||||
|
||||
L41A3 tya add offset to index to ownership info
|
||||
ora #$06
|
||||
tay and put it back in y.
|
||||
ldx #$06 index to directory entry owner info.
|
||||
|
||||
L41A9 lda fcbbuf,y all bytes must match to say that it's
|
||||
cmp d_dev-1,x the same file again.
|
||||
bne L41C1 if not, then next fcb.
|
||||
|
||||
dey index to next lower bytes.
|
||||
dex
|
||||
bne L41A9 loop to check all owner info.
|
||||
|
||||
inc totent file is already open, now see
|
||||
lda fcbbuf+9,y if it's already opened for write. and #$02 if so report file busy (with carry set).
|
||||
and #$02 if so report file busy (with carry set).
|
||||
beq L41C1 branch if this file is read access only.
|
||||
sec
|
||||
rts
|
||||
|
||||
L41C1 tya calc position of next fcb.
|
||||
and #$E0 first strip any possible index offsets.
|
||||
clc
|
||||
adc #$20 inc to next fcb.
|
||||
bne L4188 branch if more to compare.
|
||||
|
||||
clc report no conflicts.
|
||||
rts
|
||||
|
||||
|
||||
*--------------------------------------
|
||||
MAN
|
||||
SAVE USR/SRC/PRODOS.FX/PRODOS.S.XDOS.C
|
||||
LOAD USR/SRC/PRODOS.FX/PRODOS.S
|
||||
|
@ -4,6 +4,7 @@ NEW
|
||||
XDOS.Close ldy #$01 close all ?
|
||||
lda (A3L),y
|
||||
bne L4683 no, just one of them.
|
||||
|
||||
sta cferr clear global close error.
|
||||
lda #$00 start at the beginning.
|
||||
L4654 sta fcbptr save current low byte of pointer.
|
||||
@ -11,22 +12,29 @@ L4654 sta fcbptr save current low byte of pointer.
|
||||
lda fcbbuf+27,y was opened.
|
||||
cmp flevel if file's level is < global level
|
||||
bcc L4675 then don't close.
|
||||
|
||||
lda fcbbuf,y is this reference file open ?
|
||||
beq L4675 no, try next.
|
||||
|
||||
jsr flush2 clean it out...
|
||||
bcs L46B6 return flush errors.
|
||||
|
||||
jsr close2 update fcb & vcb
|
||||
ldy #$01
|
||||
lda (A3L),y
|
||||
beq L4675 no error if close all.
|
||||
bcs L46B6 close error.
|
||||
|
||||
L4675 lda fcbptr inc pointer to next fcb
|
||||
clc
|
||||
adc #$20
|
||||
bcc L4654 branch if within same page.
|
||||
|
||||
lda cferr on final close report logged errors.
|
||||
beq L46B4 branch if errors.
|
||||
|
||||
rts (carry already set).
|
||||
|
||||
L4683 jsr flush1 flush file 1st (including updating
|
||||
bcs L46B6 bitmap). branch if errors.
|
||||
|
||||
@ -34,6 +42,7 @@ close2 ldy fcbptr
|
||||
lda fcbbuf+11,y release file buffer
|
||||
jsr relbuffr
|
||||
bcs L46B6
|
||||
|
||||
lda #$00
|
||||
ldy fcbptr
|
||||
sta fcbbuf,y free fcb too
|
||||
@ -48,6 +57,7 @@ close2 ldy fcbptr
|
||||
sta vcbbuf+17,x
|
||||
L46B4 clc
|
||||
rts
|
||||
|
||||
L46B6 bcs L46E6 don't report close all error now.
|
||||
*--------------------------------------
|
||||
XDOS.Flush ldy #$01 flush all ?
|
||||
@ -169,20 +179,24 @@ glberr ldy #$01
|
||||
pha
|
||||
lda (A3L),y
|
||||
bne L47C1 not an 'all' so report now
|
||||
|
||||
clc
|
||||
pla
|
||||
sta cferr save for later
|
||||
rts
|
||||
|
||||
L47C1 pla
|
||||
rts
|
||||
|
||||
gfcbstat ldy fcbptr index to fcb.
|
||||
lda fcbbuf+8,y return status byte.
|
||||
rts
|
||||
L47CA lda #$4E access error
|
||||
|
||||
L47CA lda #MLI.E.LOCKED access error
|
||||
sec
|
||||
L47CD rts
|
||||
|
||||
seteof jsr gfcbstyp can only move end of tree, sapling or seed.
|
||||
*--------------------------------------
|
||||
XDOS.SetEOF jsr gfcbstyp can only move end of tree, sapling or seed.
|
||||
cmp #$04 tree type ?
|
||||
bcs L47CA if not then access error
|
||||
asl
|
||||
@ -351,28 +365,55 @@ L490D jsr eofset go mark and update
|
||||
L491C pla report any errors that may have
|
||||
plp appeared.
|
||||
rts
|
||||
*--------------------------------------
|
||||
XDOS.GetEOF ldx fcbptr index to end of file mark
|
||||
|
||||
geteof ldx fcbptr index to end of file mark
|
||||
ldy #$02 and index to user's call parameters
|
||||
|
||||
L4924 lda fcbbuf+21,x
|
||||
sta (A3L),y
|
||||
inx
|
||||
iny
|
||||
cpy #$05
|
||||
bne L4924 loop until all 3 bytes moved
|
||||
|
||||
clc no errors
|
||||
rts
|
||||
*--------------------------------------
|
||||
XDOS.NewLine ldy #$02 adjust newline status for open file.
|
||||
|
||||
newline ldy #$02 adjust newline status for open file.
|
||||
lda (A3L),y on or off ?
|
||||
ldx fcbptr it will be 0 if off.
|
||||
sta fcbbuf+31,x set new line mask
|
||||
|
||||
iny
|
||||
lda (A3L),y and move in 'new-line' byte
|
||||
sta fcbbuf+10,x
|
||||
|
||||
clc no error possible
|
||||
rts
|
||||
*--------------------------------------
|
||||
XDOS.GetFileInfoEx
|
||||
jsr lookfile see if file exists
|
||||
bcs .9
|
||||
|
||||
ldy #3
|
||||
lda (A3L),y
|
||||
sta .2+1
|
||||
iny
|
||||
lda (A3L),y
|
||||
sta .2+2
|
||||
|
||||
ldy h_entln
|
||||
|
||||
.1 dey
|
||||
lda (zpt),y
|
||||
.2 sta $ffff,y
|
||||
tya
|
||||
bne .1
|
||||
|
||||
.9 rts
|
||||
*--------------------------------------
|
||||
XDOS.GetFileInfo
|
||||
jsr findfile look for file.
|
||||
bcc L4988 no error.
|
||||
@ -424,6 +465,11 @@ L4994 lda inftabl-3,y
|
||||
|
||||
L49A4 rts
|
||||
*--------------------------------------
|
||||
XDOS.SetFileInfoEx
|
||||
|
||||
clc
|
||||
rts
|
||||
*--------------------------------------
|
||||
XDOS.SetFileInfo
|
||||
jsr findfile get the file to work on.
|
||||
bcs L49CF if error.
|
||||
|
@ -483,8 +483,8 @@ vldbuf1 dex check next lower page.
|
||||
bne vldbuf1 if not.
|
||||
clc all pages ok.
|
||||
rts
|
||||
|
||||
getbuf ldy #$02 give user address of file buffer referenced by refnum.
|
||||
*--------------------------------------
|
||||
XDOS.GetBuf ldy #$02 give user address of file buffer referenced by refnum.
|
||||
lda bufaddrl
|
||||
sta (A3L),y
|
||||
iny
|
||||
@ -492,21 +492,25 @@ getbuf ldy #$02 give user address of file buffer referenced by refnum.
|
||||
sta (A3L),y
|
||||
clc no errors possible
|
||||
rts
|
||||
|
||||
setbuf ldy #$03
|
||||
*--------------------------------------
|
||||
XDOS.SetBuf ldy #$03
|
||||
jsr alcbufr1 allocate new buffer address over old one
|
||||
bcs L4EC7 report any errors immediately
|
||||
|
||||
lda bufaddrh
|
||||
sta usrbuf+1
|
||||
lda bufaddrl
|
||||
sta usrbuf
|
||||
jsr freebuf free address space of old buffer
|
||||
|
||||
ldy #$00
|
||||
ldx #$03
|
||||
|
||||
L4EB8 lda (usrbuf),y move all 4 pages of the buffer to
|
||||
sta (datptr),y new location.
|
||||
iny
|
||||
bne L4EB8
|
||||
|
||||
inc datptr+1
|
||||
inc usrbuf+1
|
||||
dex
|
||||
@ -704,16 +708,21 @@ sp_bufptr .HS 0000 data buffer
|
||||
*--------------------------------------
|
||||
* data tables
|
||||
*--------------------------------------
|
||||
scnums .HS D3000000 table of valid mli command numbers.
|
||||
.HS 40410000808182
|
||||
.HS 65C0C1C2C3C4C5C6
|
||||
.HS C7C8C9CACBCCCDCE
|
||||
.HS CF00D0D1D2
|
||||
pcntbl .HS 02FFFFFF parameter counts for the calls
|
||||
.HS 0201FFFF030300
|
||||
.HS 04070102070A0201
|
||||
.HS 0103030404010102
|
||||
.HS 02FF020202
|
||||
scnums .HS D3D4D500 table of valid mli command numbers.
|
||||
.HS 40410000
|
||||
.HS 808182
|
||||
.HS 65
|
||||
.HS C0C1C2C3C4C5C6C7C8C9CACBCCCDCECF
|
||||
.HS 00
|
||||
.HS D0D1D2
|
||||
|
||||
pcntbl .HS 020202FF parameter counts for the calls
|
||||
.HS 0201FFFF
|
||||
.HS 030300
|
||||
.HS 04
|
||||
.HS 070102070A0201010303040401010202
|
||||
.HS FF
|
||||
.HS 020202
|
||||
|
||||
cmdtable .DA XDOS.Create
|
||||
.DA XDOS.Destroy
|
||||
@ -724,17 +733,19 @@ cmdtable .DA XDOS.Create
|
||||
.DA XDOS.SetPrefix
|
||||
.DA XDOS.GetPrefix
|
||||
.DA XDOS.Open
|
||||
.DA newline
|
||||
.DA XDOS.NewLine
|
||||
.DA XDOS.Read
|
||||
.DA XDOS.Write
|
||||
.DA XDOS.Close
|
||||
.DA XDOS.Flush
|
||||
.DA setmark
|
||||
.DA getmark
|
||||
.DA seteof
|
||||
.DA geteof
|
||||
.DA setbuf
|
||||
.DA getbuf
|
||||
.DA XDOS.SetMark
|
||||
.DA XDOS.GetMark
|
||||
.DA XDOS.SetEOF
|
||||
.DA XDOS.GetEOF
|
||||
.DA XDOS.SetBuf
|
||||
.DA XDOS.GetBuf
|
||||
.DA XDOS.SetFileInfoEx
|
||||
.DA XDOS.GetFileInfoEx
|
||||
|
||||
* corresponding command function bytes
|
||||
|
||||
@ -745,16 +756,21 @@ disptch .HS A0A1A2A3
|
||||
.HS 50515253
|
||||
|
||||
dinctbl .HS 0100000200 table to increment directory usage/eof counts
|
||||
.DO LOWERCASE=0
|
||||
pass .HS 75
|
||||
xdosver .HS 00
|
||||
compat .HS 00
|
||||
.HS C3270D000000
|
||||
.ELSE
|
||||
XDOS.VolHdrDef .HS C3270D0000
|
||||
XDOS.VolHdrDef.Cnt .EQ *-XDOS.VolHdrDef
|
||||
.FIN
|
||||
rootstuf .HS 0F02000400000800
|
||||
whichbit .HS 8040201008040201
|
||||
ofcbtbl .HS 0C0D1819151617
|
||||
inftabl .HS 1E101F2080939421
|
||||
.HS 22232418191A1B
|
||||
deathmsg .AS "RESTART SYSTEM-$0"
|
||||
deathmsg .AS "SYS ERR-$0"
|
||||
deathmsg.LEN .EQ *-deathmsg
|
||||
*--------------------------------------
|
||||
XDOS.DATA .DUMMY
|
||||
@ -870,8 +886,6 @@ bufaddrl .HS 00
|
||||
bufaddrh .HS 00
|
||||
delflag .HS 00 used by 'detree' to know if called from delete (destroy).
|
||||
|
||||
pathbuf .BS 64+2
|
||||
|
||||
.LIST ON
|
||||
XDOS.DATA.LEN0 .EQ *-XDOS.DATA
|
||||
.LIST OFF
|
||||
@ -899,7 +913,7 @@ XDOS.DATA.LEN .EQ *-XDOS.DATA
|
||||
|
||||
* zero fill to page boundary - 3 ($FEFD). so that cortland flag stays within page boundary.
|
||||
.LIST ON
|
||||
XDOS.FREE .EQ $FEFD-*-XDOS.DATA.LEN (2.0.3 = $0C)
|
||||
XDOS.FREE .EQ $FEFD-*-XDOS.DATA.LEN (2.0.3 = $0C)
|
||||
.LIST OFF
|
||||
cortdisp .EQ $FEFD
|
||||
cortflag .EQ $FEFF cortland flag. 1 = Cortland system (must stay within page boundary)
|
||||
|
@ -965,11 +965,7 @@ docheck lda A4L command #.
|
||||
rts end of obj xrw_0
|
||||
|
||||
.LIST ON
|
||||
XRW.FREE1 .EQ $D742-* (2.0.3 = $02)
|
||||
.LIST OFF
|
||||
|
||||
.LIST ON
|
||||
XRW.FREE2 .EQ $d800-$D742-125
|
||||
XRW.FREE .EQ $D700-* (2.0.3 = $02)
|
||||
.LIST OFF
|
||||
*--------------------------------------
|
||||
XRW.LEN .EQ *-XRW.START
|
||||
|
@ -139,6 +139,9 @@ q7h .EQ $C08F disk port
|
||||
xfer .EQ $C314
|
||||
|
||||
rwts .EQ $D000 disk ii driver in bank 1
|
||||
pathbuf .EQ $D700
|
||||
XDOS.ClockDrv .EQ $D742
|
||||
prefixbuf .EQ $D742+125
|
||||
fcbbuf .EQ $D800 fcb buffer
|
||||
vcbbuf .EQ $D900 vcb buffer
|
||||
bmbuf .EQ $DA00 512 byte bitmap buffer
|
||||
@ -230,19 +233,19 @@ RAMX .DA #0
|
||||
|
||||
NCLK .DA #0
|
||||
.DA NCLK.LEN
|
||||
.PH $D742
|
||||
.PH XDOS.ClockDrv
|
||||
.INB USR/SRC/PRODOS.FX/PRODOS.S.NCLK
|
||||
.EP
|
||||
|
||||
TCLK .DA #0
|
||||
.DA TCLK.LEN
|
||||
.PH $D742
|
||||
.PH XDOS.ClockDrv
|
||||
.INB USR/SRC/PRODOS.FX/PRODOS.S.TCLK
|
||||
.EP
|
||||
|
||||
CCLK .DA #0
|
||||
.DA CCLK.LEN
|
||||
.PH $D742
|
||||
.PH XDOS.ClockDrv
|
||||
.INB USR/SRC/PRODOS.FX/PRODOS.S.CCLK
|
||||
.EP
|
||||
|
||||
|
@ -723,7 +723,6 @@ DevMgrInit.AddBDev
|
||||
>PUSHWI FD.BDEV.NAME
|
||||
>LDYAI FD.BDEV
|
||||
>SYSCALL2 MKDev
|
||||
|
||||
DevMgrInit.AddBDev.RTS
|
||||
rts
|
||||
*--------------------------------------
|
||||
|
Loading…
x
Reference in New Issue
Block a user