diff --git a/.Floppies/A2OSX.BOOT.po b/.Floppies/A2OSX.BOOT.po deleted file mode 100644 index 0435f02e..00000000 Binary files a/.Floppies/A2OSX.BOOT.po and /dev/null differ diff --git a/.Floppies/A2OSX.BOOTHD.woz b/.Floppies/A2OSX.BOOTHD.woz deleted file mode 100644 index 24f6e0f2..00000000 Binary files a/.Floppies/A2OSX.BOOTHD.woz and /dev/null differ diff --git a/.Floppies/A2OSX.BUILD.po b/.Floppies/A2OSX.BUILD.po index a2702778..c829f5e3 100644 Binary files a/.Floppies/A2OSX.BUILD.po and b/.Floppies/A2OSX.BUILD.po differ diff --git a/.Floppies/A2OSX.TEST.po b/.Floppies/A2OSX.TEST.po index 6f70b68d..5540e29d 100644 Binary files a/.Floppies/A2OSX.TEST.po and b/.Floppies/A2OSX.TEST.po differ diff --git a/.Floppies/ProDOSFX.BOOT.po b/.Floppies/ProDOSFX.BOOT.po index dc70cd59..39bbe0ca 100644 Binary files a/.Floppies/ProDOSFX.BOOT.po and b/.Floppies/ProDOSFX.BOOT.po differ diff --git a/.Floppies/ProDOSFX.BOOTHD.woz b/.Floppies/ProDOSFX.BOOTHD.woz index 0a5c4435..20e58872 100644 Binary files a/.Floppies/ProDOSFX.BOOTHD.woz and b/.Floppies/ProDOSFX.BOOTHD.woz differ diff --git a/A2osX.S.txt b/A2osX.S.txt index 154bd142..a90e4131 100644 --- a/A2osX.S.txt +++ b/A2osX.S.txt @@ -230,14 +230,14 @@ A2osX.ScreenDLGR lda #20 sta ZP.WNDTOP sta ZP.CV - jsr ROM.VTAB + jsr ROM.TABV - sta IO.SETALTCHAR +* sta IO.SETALTCHAR sta IO.CLRHIRES sta IO.SETMIXED - sta IO.SET80DISP - sta IO.SET80STORE - sta IO.CLRPAGE2 +* sta IO.SET80DISP +* sta IO.SET80STORE +* sta IO.CLRPAGE2 bit IO.RDIOUDIS sta IO.SETIOUDIS diff --git a/BIN/EDIT.S.FILE.txt b/BIN/EDIT.S.FILE.txt index 714ba13e..8708c847 100644 --- a/BIN/EDIT.S.FILE.txt +++ b/BIN/EDIT.S.FILE.txt @@ -88,7 +88,7 @@ FILE.Load.RTS rts *-------------------------------------- FILE.Load.ASM lda #2 >STA.G FileType - + .1 ldy #3 jsr FILE.ReadY bcs .7 diff --git a/INC/MLI.I.txt b/INC/MLI.I.txt index 31ba3f45..268662af 100644 --- a/INC/MLI.I.txt +++ b/INC/MLI.I.txt @@ -98,7 +98,7 @@ S.FI .EQ $12 *-------------------------------------- S.FIEX.FILENAME .EQ 0 -S.FIEX.T .EQ 16 +S.FIEX.TYPE .EQ 16 S.FIEX.KEYPTR .EQ 17 S.FIEX.BLKUSED .EQ 19 S.FIEX.EOF .EQ 21 @@ -152,7 +152,7 @@ GP.DEVLST .EQ $BF32 -> $BF3F *PRODOSCOPYRIGHT .EQ $BF41 ;free->$BF4B GP.MLIENTRY .EQ $BF4B to bypass ATLK hook GP.MEMTABL .EQ $BF58 -> $BF6F -GB.BUFTABL .EQ $BF70 +GP.BUFTABL .EQ $BF70 *INTRUPT1 .EQ $BF80 *INTRUPT2 .EQ $BF82 *INTRUPT3 .EQ $BF84 diff --git a/ProDOS.FX/ProDOS.S.GP.txt b/ProDOS.FX/ProDOS.S.GP.txt index c8010b53..402a703b 100644 --- a/ProDOS.FX/ProDOS.S.GP.txt +++ b/ProDOS.FX/ProDOS.S.GP.txt @@ -63,7 +63,7 @@ GP.FREE1 .EQ $BF58-* * table of buffer addresses for currently open files. * these can only be changed thru the mli call setbuf. *-------------------------------------- - .HS 0000 GB.BUFTABL + .HS 0000 GP.BUFTABL .HS 0000 .HS 0000 .HS 0000 diff --git a/ProDOS.FX/ProDOS.S.XDOS.A.txt b/ProDOS.FX/ProDOS.S.XDOS.A.txt index 33458637..45807593 100644 --- a/ProDOS.FX/ProDOS.S.XDOS.A.txt +++ b/ProDOS.FX/ProDOS.S.XDOS.A.txt @@ -3,7 +3,7 @@ NEW *-------------------------------------- FCB.MAX .EQ 8 FCB.ID .EQ 0 -FCB.DEVID .EQ 1 d_dev -> d_dev+5 +FCB.DEVID .EQ 1 XDOS.DE.DevID -> XDOS.DE.DevID+5 FCB.DIRHBLK .EQ 2 2 bytes FCB.DIREBLK .EQ 4 2 bytes FCB.DIRENUM .EQ 6 @@ -53,7 +53,7 @@ XDOS.VCB0 .EQ XDOS.VCBs+6 range $D906-$DA00 zpt .EQ $48 highly used zero page index pointer ZP.DataPtr .EQ $4A ptr to data area of buffer. sos .EQ $4C sos buffer pointer. -usrbuf .EQ $4E data ptr in user buffer. +ZP.UserBuf .EQ $4E data ptr in user buffer. *-------------------------------------- XDOS.START .PH XDOS @@ -231,7 +231,7 @@ XDOS.DevMgr ldy #$05 the call spec for devices must bne .1 ldx ZP.BUFPTR+1 buffer page - stx usrbuf+1 to user buffer + stx ZP.UserBuf+1 to user buffer inx inx lda ZP.BUFPTR is buffer page aligned (nn00) ? @@ -382,34 +382,34 @@ XDOS.BFMgr lda XDOS.CmdFlags,x translate into command address. and #$3F bit 6 is refnum, 5 is time to process tax lda cmdtable,x move address to indirect jump - sta H3274+1 + sta .8+1 lda cmdtable+1,x high byte - sta H3274+2 + sta .8+2 lda #$20 init backup bit flag sta bkbitflg to say 'file modified' - bcc nopath + bcc .1 jsr XDOS.GetPath process pathname before calling command - bcs errorsys branch if bad name. + bcs .9 branch if bad name. -nopath asl cmdtemp test for refnum processing - bcc nopreref +.1 asl cmdtemp test for refnum processing + bcc .2 jsr XDOS.GetFCB set pointers to fcb and vcb of file - bcs errorsys + bcs .9 -nopreref asl cmdtemp check for necessity of time stamp - bcc H3274 +.2 asl cmdtemp check for necessity of time stamp + bcc .8 jsr GP.CLOCK date/time -H3274 jsr $FFFF SELF MODIFIED : execute command - bcc goodop +.8 jsr $FFFF SELF MODIFIED : execute command + bcc .10 -errorsys jsr GP.SYSERR +.9 jsr GP.SYSERR -goodop rts +.10 rts *-------------------------------------- * entry used by rename for 2nd pathname. *-------------------------------------- @@ -417,24 +417,24 @@ XDOS.GetRenPath ldy #$03 get address to new pathname .HS 2C *-------------------------------------- XDOS.GetPath ldy #$01 index to pathname pointer - lda (ZP.A3L),y low pointer address + lda (ZP.A3L),y low pointer address sta zpt iny - lda (ZP.A3L),y hi pointer address + lda (ZP.A3L),y hi pointer address sta zpt+1 ldx #$00 x = index to XDOS.PathBuf ldy #$00 y = index to input pathname. stz prfxflg assume prefix is in use. - stz XDOS.PathBuf mark XDOS.PathBuf = nothing processed. + stz XDOS.PathBuf mark XDOS.PathBuf = nothing processed. lda (zpt),y validate pathname length > 0 and < 65 - beq errsyn + beq .5 cmp #$41 - bcs errsyn + bcs .5 sta pathcnt this is used to compare for inc pathcnt end of pathname processing. @@ -443,72 +443,67 @@ XDOS.GetPath ldy #$01 index to pathname pointer lda (zpt),y (full name if starts with '/') and #$7F cmp #'/' - bne H32AD branch if prefix appended. + bne .1 branch if prefix appended. dec prfxflg set prefix flag = prefix not used. iny index to 1st character of pathname. -H32AD lda #$FF set current position of XDOS.PathBuf - sta XDOS.PathBuf,x to indicate end of pathname. +.1 lda #$FF set current position of XDOS.PathBuf + sta XDOS.PathBuf,x to indicate end of pathname. sta namcnt $FF = no chars processed in local name. stx namptr pointer to local name length byte. -H32B8 cpy pathcnt done with pathname processing? - bcs endpath +.2 cpy pathcnt done with pathname processing? + bcs .6 lda (zpt),y get character and #$7F inx prepare for next char iny cmp #'/' is it delimiter '/' ? - beq endname yes + beq .8 yes .DO LOWERCASE=0 cmp #'a' lowercase? - bcc .1 no + bcc .3 no cmp #'z'+1 - bcs .1 + bcs .3 eor #$20 to uppercase -.1 .FIN +.3 .FIN sta XDOS.PathBuf,x store char inc namcnt is it the 1st char of a local name? - bne .2 no + bne .4 no inc namcnt increment to 1 jsr XDOS.IsValidFirstChar - bcc H32B8 + bcc .2 bra errsyn -.2 jsr XDOS.IsValidChar - bcc H32B8 +.4 jsr XDOS.IsValidChar + bcc .2 -errsyn lda #MLI.E.INVPATH - .HS 2C +.5 bra errsyn -ptyperr lda #MLI.E.UNSUPST filetype error (not a directory) -pfxerr sec - rts - -endpath lda #$00 end pathname with a 0 +.6 lda #$00 end pathname with a 0 bit namcnt also make sure count is positive - bpl H32FD + bpl .7 sta namcnt dex -H32FD inx +.7 inx sta XDOS.PathBuf,x - beq errsyn error if '/' only. + beq errsyn error if '/' only. stx pathcnt save length of pathname tax -endname lda namcnt validate local name < 16 +.8 lda namcnt validate local name < 16 cmp #16 bcs errsyn @@ -516,18 +511,25 @@ endname lda namcnt validate local name < 16 ldx namptr get index to beginning of local name sta XDOS.PathBuf,x save local name's length plx restore pointer - bne H32AD branch if more names to process + bne .1 branch if more names to process clc probably no error, but lda prfxflg make sure all pathnames are prefixed - bne H3323 or begin with a '/'. + bne .9 or begin with a '/'. lda GP.NEWPFXPTR must be non-zero beq errsyn -H3323 rts + +.9 rts +*-------------------------------------- +errsyn lda #MLI.E.INVPATH + .HS 2C BIT ABS +ptyperr lda #MLI.E.UNSUPST filetype error (not a directory) +pfxerr sec +pfx.RTS rts *-------------------------------------- XDOS.SetPrefix jsr XDOS.GetPath call is made to detect if a null path. - bcc H3333 path ok. + bcc .1 path ok. ldy XDOS.PathBuf is it a null pathname? bne pfxerr error if not @@ -537,20 +539,20 @@ XDOS.SetPrefix jsr XDOS.GetPath call is made to detect if a null path. clc no error rts -H3333 jsr XDOS.FindFileOrVol go find specified prefix directory. -pfxerr1 bcs pfxerr branch if error is not root directory. +.1 jsr XDOS.FindFileOrVol go find specified prefix directory. + bcs pfx.RTS branch if error is not root directory. - lda d_stor make sure last local name is dir type + lda XDOS.DE.Filename make sure last local name is dir type and #$D0 (either root or sub). eor #$D0 directory? bne ptyperr wrong type ldy prfxflg new or appended prefix? - bne H334D + bne .2 - lda GP.NEWPFXPTR append new prefix to old + lda GP.NEWPFXPTR append new prefix to old -H334D tay +.2 tay sec find new beginning of prefix sbc pathcnt cmp #$C0 too long? @@ -559,68 +561,72 @@ H334D tay tax sta GP.NEWPFXPTR sta GP.PFXPTR - lda d_dev save device # - sta p_dev - lda d_frst and address of 1st block + +* lda XDOS.DE.DevID save device # +* sta p_dev + lda XDOS.DE.KeyPtr and address of 1st block sta p_blok - lda d_frst+1 + lda XDOS.DE.KeyPtr+1 sta p_blok+1 -.1 lda XDOS.PathBuf,y +.3 lda XDOS.PathBuf,y sta XDOS.PathBuf,x iny inx - bne .1 + bne .3 clc good prefix rts *-------------------------------------- -XDOS.GetPrefix clc calc how big a buffer is needed. - ldy #$01 get index to users pathname buffer +XDOS.GetPrefix ldy #$01 get index to users pathname buffer lda (ZP.A3L),y - sta usrbuf user buffer ptr + sta ZP.UserBuf user buffer ptr iny lda (ZP.A3L),y - sta usrbuf+1 + sta ZP.UserBuf+1 +* clc calc how big a buffer is needed. + stz cbytes+1 set buffer length at 64 char max lda #$40 sta cbytes jsr valdbuf go validate prefix buffer address - bcs pfxerr1 + bcs pfx.RTS ldy #$00 y = indirect index to user buffer. - lda GP.NEWPFXPTR get address of beginning of prefix + lda GP.NEWPFXPTR get address of beginning of prefix tax - beq nulprfx if null prefix. + beq .1 if null prefix. eor #$FF get total length of prefix adc #$02 add 2 for leading and trailing slashes. -nulprfx sta (usrbuf),y store length in user's buffer. - beq gotprfx branch if null prefix. +.1 sta (ZP.UserBuf),y store length in user's buffer. + beq .8 branch if null prefix. -sendprfx iny inc to next user buffer location. - lda XDOS.PathBuf,x get next char of prefix. +.2 iny inc to next user buffer location. + lda XDOS.PathBuf,x get next char of prefix. -sndlimit sta (usrbuf),y give char to user. +.3 sta (ZP.UserBuf),y give char to user. and #$F0 check for length descriptor. - bne H33B3 branch if regular character + bne .4 branch if regular character lda #'/' otherwise, substitute a slash. - bne sndlimit branch always + bne .3 branch always + +.4 inx + bne .2 branch if more to send. -H33B3 inx - bne sendprfx branch if more to send. iny lda #'/' end with '/' - sta (usrbuf),y -gotprfx clc no error + sta (ZP.UserBuf),y + +.8 clc no error rts *-------------------------------------- XDOS.GetFCB ldy #$01 index to ref# - lda (ZP.A3L),y is it a valid file# ? + lda (ZP.A3L),y is it a valid file# ? beq badref must not be 0. cmp #FCB.MAX+1 @@ -632,7 +638,7 @@ XDOS.GetFCB ldy #$01 index to ref# ror ror ror multiply by 32. - sta fcbptr used as an index to fcb + sta XDOS.FCBPtr used as an index to fcb tax pla restore ref# in acc cmp XDOS.FCBs+FCB.ID,x @@ -641,50 +647,48 @@ XDOS.GetFCB ldy #$01 index to ref# XDOS.GetFCBBufX lda XDOS.FCBs+FCB.BUFID,x get page address of file buffer. tay index into global buffer table. - lda GB.BUFTABL-1,y - sta bufaddrh + lda GP.BUFTABL-1,y + sta XDOS.BufAddr+1 + beq .3 fcb corrupted - beq fcbdead fcb corrupted - - sta ZP.DataPtr+1 save ptr to data area of buffer + sta ZP.DataPtr+1 save ptr to data area of buffer inc inc index block always 2 pages after data sta zpt+1 - lda GB.BUFTABL-2,y ???? ALWAYS 0 - - sta bufaddrl - sta ZP.DataPtr index and data buffers always on + lda GP.BUFTABL-2,y ???? ALWAYS 0 + sta XDOS.BufAddr + sta ZP.DataPtr index and data buffers always on sta zpt page boundaries. jsr XDOS.FCBDevIDSelect lda #XDOS.VCB0 -fndfvol tay search for associated vcb +.1 tay search for associated vcb lda XDOS.VCBs+VCB.DEV,y cmp XDOS.FCBs+FCB.DEVID,x is this vcb the same device? - beq tstvopen if it is, make sure volume is active. + beq .4 if it is, make sure volume is active. -nxtfvol tya adjust index to next vcb. +.2 tya adjust index to next vcb. clc adc #VCB - bcc fndfvol loop until volume found. + bcc .1 loop until volume found. lda #$0A open file has no volume so .HS 2C BIT ABS -fcbdead lda #$0B fcb error so +.3 lda #$0B fcb error so jsr GP.SYSDEATH kill the system. -tstvopen lda XDOS.VCBs,y make sure this vcb is open. - beq nxtfvol branch if it is not active. +.4 lda XDOS.VCBs,y make sure this vcb is open. + beq .2 branch if it is not active. - sty XDOS.VCBPtr save ptr to good vcb. + sty XDOS.VCBPtr save ptr to good vcb. clc no error - rts Y = XDOS.VCBPtr, X = FCBPtr - + rts Y = XDOS.VCBPtr, X = XDOS.FCBPtr +*-------------------------------------- errnoref stz XDOS.FCBs,x badref lda #MLI.E.BADREF requested refnum is @@ -714,18 +718,19 @@ XDOS.Online jsr mvdbufr figure out how big buffer has to be. ldy cbytes .3 dey - sta (usrbuf),y + sta (ZP.UserBuf),y bne .3 sta namptr used as pointer to user buffer. - lda GP.DEVNUM get device # again. + lda GP.DEVNUM get device # again. bne online1 branch if only 1 device to process. - jsr mvdevnums get list of currently recognized dev's. + ldx GP.DEVCNT .4 phx save index to last item on list - lda loklst,x - sta GP.DEVNUM save desired device to look at. + lda GP.DEVLST,x active device list. + and #$F0 strip device type info. + sta GP.DEVNUM save desired device to look at. jsr online1 log this volume and return it's name. lda namptr inc pointer for next device clc @@ -784,14 +789,14 @@ online1.ERR pha save error code. jsr svdevn report what device has problem. pla error code. iny tell what error was encountered. - sta (usrbuf),y + sta (ZP.UserBuf),y cmp #MLI.E.DUPVOL duplicate volume error? bne .1 no. iny report which other device has same name ldx XDOS.VCBDupEnt lda XDOS.VCBs+VCB.DEV,x - sta (usrbuf),y + sta (ZP.UserBuf),y stz XDOS.VCBDupFlag clear duplicate flag. lda #MLI.E.DUPVOL duplicate volume error code. @@ -804,16 +809,16 @@ online1.OK lda XDOS.VCBs,x get volume name count ldy namptr index to user's buffer. .1 lda XDOS.VCBs,x move name to user's buffer - sta (usrbuf),y + sta (ZP.UserBuf),y inx iny dec namcnt bpl .1 - +*-------------------------------------- svdevn ldy namptr index to 1st byte of this entry. lda GP.DEVNUM upper nibble = device# and - ora (usrbuf),y lower nibble = name length. - sta (usrbuf),y + ora (ZP.UserBuf),y lower nibble = name length. + sta (ZP.UserBuf),y clc no errors rts end of block file manager @@ -849,8 +854,8 @@ XDOS.Create jsr XDOS.CheckPath check for duplicate, get free entry jmp XDOS.Create1 otherwise, go create file. -.2 lda own_blk before extending directory, - ora own_blk+1 make sure it's a subdirectory. +.2 lda XDOS.OH.Blk before extending directory, + ora XDOS.OH.Blk+1 make sure it's a subdirectory. bne XDOS.DirExtend lda #MLI.E.DIRFULL otherwise, directory full error @@ -899,8 +904,8 @@ XDOS.DirExtend lda ZP.BLKNUM preserve disk address of current (last) jsr XDOS.WriteGBuf write prepared directory extension. bcs H351D if error - lda own_blk - ldx own_blk+1 + lda XDOS.OH.Blk + ldx XDOS.OH.Blk+1 .DO LOWERCASE=1 jsr XDOS.ReadGBufAXDir @@ -910,12 +915,12 @@ XDOS.DirExtend lda ZP.BLKNUM preserve disk address of current (last) jsr XDOS.ZPT.InitGBuf - ldx own_ent and calc entry address. + ldx XDOS.OH.EIB and calc entry address. .3 dex has entry address been calculated? beq .4 if yes. - lda own_len next entry address + lda XDOS.OH.EL next entry address jsr XDOS.ZPT.NextA bra .3 @@ -946,7 +951,7 @@ XDOS.Create1 jsr XDOS.ZeroGBuf zero out XDOS.GBuf ldy #$0B move user specified date/time .1 lda (ZP.A3L),y to directory. - sta d_filid,y + sta XDOS.DE.Type,y txa if all 4 bytes of date/time = 0 ora (ZP.A3L),y then use built-in date/time. tax @@ -960,7 +965,7 @@ XDOS.Create1 jsr XDOS.ZeroGBuf zero out XDOS.GBuf ldx #$03 .2 lda GP.DATE,x move current default date/time - sta d_credt,x + sta XDOS.DE.CTime,x dex bpl .2 @@ -973,7 +978,7 @@ XDOS.Create1 jsr XDOS.ZeroGBuf zero out XDOS.GBuf .4 ldx namptr index to local name of pathname. ora XDOS.PathBuf,x combine file kind with name length. - sta d_stor sos calls this 'storage type'. + sta XDOS.DE.Filename sos calls this 'storage type'. and #$0F strip back to name length tay and use as counter for move. clc @@ -981,7 +986,7 @@ XDOS.Create1 jsr XDOS.ZeroGBuf zero out XDOS.GBuf tax .5 lda XDOS.PathBuf,x move local name as filename - sta d_stor,y + sta XDOS.DE.Filename,y dex dey @@ -989,34 +994,34 @@ XDOS.Create1 jsr XDOS.ZeroGBuf zero out XDOS.GBuf ldy #$03 index to 'access' parameter lda (ZP.A3L),y - sta d_attr + sta XDOS.DE.Access iny also move 'file identification' lda (ZP.A3L),y - sta d_filid + sta XDOS.DE.Type .6 iny move auxillary identification bytes lda (ZP.A3L),y - sta d_auxid-5,y + sta XDOS.DE.AuxType-5,y cpy #$06 bne .6 .DO LOWERCASE=0 lda xdosver save current xdos version # - sta d_sosver + sta XDOS.DE.Version lda compat and backward compatibility # - sta d_comp + sta XDOS.DE.MVersion .FIN lda #$01 usage is always 1 block - sta d_usage - lda d_head place back pointer to header block - sta d_dhdr + sta XDOS.DE.BlkUsed - lda d_head+1 - sta d_dhdr+1 + lda XDOS.DE.DirHBlk place back pointer to header block + sta XDOS.DE.BlkPtr + lda XDOS.DE.DirHBlk+1 + sta XDOS.DE.BlkPtr+1 - lda d_stor storage type. + lda XDOS.DE.Filename storage type. and #$E0 is it a directory? beq cralcblk branch if seed file. *-------------------------------------- @@ -1024,7 +1029,7 @@ XDOS.Create1 jsr XDOS.ZeroGBuf zero out XDOS.GBuf *-------------------------------------- ldx #$1E move header to data block -cmvheadr lda d_stor,x +cmvheadr lda XDOS.DE.Filename,x sta XDOS.GBuf+4,x dex bpl cmvheadr @@ -1058,14 +1063,14 @@ cmvpass lda pass,x header info. .FIN ldx #$02 and include info about parent directory - stx d_eof+1 set file size = 512 + stx XDOS.DE.EOF+1 set file size = 512 -cmvparnt lda d_entblk,x +cmvparnt lda XDOS.DE.DirEBlk,x sta XDOS.GBuf+39,x dex bpl cmvparnt - lda h_entln lastly, the length of parent's + lda XDOS.DH.EL lastly, the length of parent's sta XDOS.GBuf+42 directory entries. .DO LOWERCASE=1 @@ -1075,19 +1080,19 @@ cmvparnt lda d_entblk,x cralcblk jsr XDOS.GetFreeBlk get address of file's data block bcs crerr3 - sta d_frst - sty d_frst+1 + sta XDOS.DE.KeyPtr + sty XDOS.DE.KeyPtr+1 sta ZP.BLKNUM sty ZP.BLKNUM+1 jsr XDOS.WriteGBuf go write data block of file bcs crerr3 - inc h_fcnt add 1 to total # of files in this dir + inc XDOS.DH.FileCnt add 1 to total # of files in this dir bne credone - inc h_fcnt+1 + inc XDOS.DH.FileCnt+1 -credone jsr drevise go revise directories with new file +credone jsr XDOS.DE.Update go revise directories with new file bcs crerr3 jmp XDOS.FlushBM lastly, update volume bitmap diff --git a/ProDOS.FX/ProDOS.S.XDOS.B.txt b/ProDOS.FX/ProDOS.S.XDOS.B.txt index 154b19f2..5289a652 100644 --- a/ProDOS.FX/ProDOS.S.XDOS.B.txt +++ b/ProDOS.FX/ProDOS.S.XDOS.B.txt @@ -1,38 +1,46 @@ NEW AUTO 3,1 *-------------------------------------- -entcalc jsr XDOS.ZPT.InitGBuf +XDOS.ZPT.SetEIB jsr XDOS.ZPT.InitGBuf - ldx d_entnum on the entry #. + ldx XDOS.DE.DirEIB on the entry #. - clc - -.1 dex addr = XDOS.GBuf + ((d_entnum-1) * h_entln) - beq crerr3 branch with carry clear = no errors. +.1 dex addr = XDOS.GBuf + ((d_entnum-1) * XDOS.DH.EL) + beq .8 jsr XDOS.ZPT.Next - bcc .1 + bra .1 + +.8 clc crerr3 rts carry set if error. *-------------------------------------- -drevise lda GP.DATE - beq drevise1 if no clock, then don't mod date/time. +XDOS.DE.Update lda GP.DATE + beq XDOS.DE.UpdateNoMTime if no clock, then don't mod date/time. - ldx #$03 + ldx #3 -modtime lda GP.DATE,x move last modification date/time - sta d_moddt,x to entry being updated. +.1 lda GP.DATE,x move last modification date/time + sta XDOS.DE.MTime,x to entry being updated. dex - bpl modtime + bpl .1 + + sec propagate MTIME -drevise1 lda bkbitflg (bit 5 = backup needed) - tsb d_attr mark entry as backupable + .HS 90 BCC +*-------------------------------------- +XDOS.DE.UpdateNoMTime + clc DO NOT propagate MTIME + ror scrtch save this... + + lda bkbitflg (bit 5 = backup needed) + tsb XDOS.DE.Access mark entry as backupable - lda d_dev get device # of directory - sta GP.DEVNUM to be revised + lda XDOS.DE.DevID get device # of directory + sta GP.DEVNUM to be revised - lda d_entblk and address of directory block. - ldx d_entblk+1 + lda XDOS.DE.DirEBlk and address of directory block. + ldx XDOS.DE.DirEBlk+1 .DO LOWERCASE=1 jsr XDOS.ReadGBufAXDir @@ -41,33 +49,33 @@ drevise1 lda bkbitflg (bit 5 = backup needed) .FIN bcs crerr3 - jsr entcalc fix up ptr to entry location within XDOS.GBuf. + jsr XDOS.ZPT.SetEIB fix up ptr to entry location within XDOS.GBuf. - ldy h_entln now move 'd.' info to directory. + ldy XDOS.DH.EL now move DE info to directory. dey -.1 lda d_stor,y +.1 lda XDOS.DE.Filename,y sta (zpt),y dey bpl .1 - lda d_head is the entry block same as + lda XDOS.DE.DirHBlk is the entry block same as cmp ZP.BLKNUM the entry's header block? - bne H36E0 if no, go save entry block + bne .2 if no, go save entry block - lda d_head+1 then maybe, so test high addresses. + lda XDOS.DE.DirHBlk+1 then maybe, so test high addresses. cmp ZP.BLKNUM+1 - beq uphead branch if they are the same block. + beq .3 branch if they are the same block. -H36E0 .DO LOWERCASE=1 +.2 .DO LOWERCASE=1 jsr XDOS.WriteGBufDir .ELSE jsr XDOS.WriteGBuf go write updated directory block. .FIN bcs crerr3 - lda d_head get address of header block and - ldx d_head+1 + lda XDOS.DE.DirHBlk get address of header block and + ldx XDOS.DE.DirHBlk+1 .DO LOWERCASE=1 jsr XDOS.ReadGBufAXDir @@ -76,14 +84,14 @@ H36E0 .DO LOWERCASE=1 .FIN bcs crerr3 -uphead ldy #$01 update current # of files in this dir. +.3 ldy #$01 update current # of files in this dir. -H36F2 lda h_fcnt,y - sta XDOS.GBuf+37,y (current entry count) +.4 lda XDOS.DH.FileCnt,y + sta XDOS.GBuf+37,y (current entry count) dey - bpl H36F2 + bpl .4 - lda h_attr also update header's attributes. + lda XDOS.DH.Access also update header's attributes. sta XDOS.GBuf+34 .DO LOWERCASE=1 @@ -91,19 +99,22 @@ H36F2 lda h_fcnt,y .ELSE jsr XDOS.WriteGBuf go write updated header .FIN - bcs H375A + bcs .9 *-------------------------------------- -ripple lda XDOS.GBuf+4 test for 'root' directory because +.5 bit scrtch nothing to do ... + bpl .8 ... if no MTIME update + + lda XDOS.GBuf+4 test for 'root' directory because and #$F0 if it is, then directory revision eor #$F0 is complete (leaves carry clear). - beq H3770 branch if done. + beq .8 branch if done. - lda XDOS.GBuf+41 get entry # - sta d_entnum - lda XDOS.GBuf+42 and the length of entries in that dir - sta h_entln + lda XDOS.GBuf+41 get entry # + sta XDOS.DE.DirEIB + lda XDOS.GBuf+42 and the length of entries in that dir + sta XDOS.DH.EL - lda XDOS.GBuf+39 get addr of parent entry's dir block + lda XDOS.GBuf+39 get addr of parent entry's dir block ldx XDOS.GBuf+40 .DO LOWERCASE=1 @@ -111,28 +122,25 @@ ripple lda XDOS.GBuf+4 test for 'root' directory because .ELSE jsr XDOS.ReadGBufAX read it .FIN - bcs H375A + bcs .9 - jsr entcalc get indirect ptr to parent entry in XDOS.GBuf - - lda GP.DATE don't touch mod - beq H373B if no clock... + jsr XDOS.ZPT.SetEIB get indirect ptr to parent entry in XDOS.GBuf ldx #$03 update the modification date & time ldy #$24 for this entry too -H3732 lda GP.DATE,x +.6 lda GP.DATE,x sta (zpt),y dey dex - bpl H3732 + bpl .6 -H373B .DO LOWERCASE=1 + .DO LOWERCASE=1 jsr XDOS.WriteGBuf .ELSE jsr XDOS.WriteGBuf write updated entry back to disk. .FIN - bcs H375A if error. + bcs .9 if error. ldy #$26 compare current block # to this lda (zpt),y entry's header block. @@ -140,32 +148,33 @@ H373B .DO LOWERCASE=1 dey lda (zpt),y block as header. cmp ZP.BLKNUM are low addresses the same? - bne H3751 branch if entry doesn't reside in same + bne .7 branch if entry doesn't reside in same cpx ZP.BLKNUM+1 are high address the same? - beq ripple they are the same, continue to root dir. + beq .5 they are the same, continue to root dir. -H3751 .DO LOWERCASE=1 +.7 .DO LOWERCASE=1 jsr XDOS.ReadGBufAX .ELSE jsr XDOS.ReadGBufAX .FIN - bcc ripple continue if read was good + bcc .5 continue if read was good -H375A rts - -H3770 clc no error rts + +.8 clc no error + +.9 rts *-------------------------------------- XDOS.FindDirOrVol jsr XDOS.FindFileOrVol bcs .99 - lda d_stor + lda XDOS.DE.Filename and #$F0 cmp #$D0 - beq moventry.CLCRTS + beq XDOS.ZPT.GetDE.CLCRTS .9 lda #MLI.E.UNSUPST sec @@ -173,26 +182,27 @@ XDOS.FindDirOrVol *-------------------------------------- XDOS.FindFileOrVol jsr XDOS.CheckPath - bcc moventry + bcc XDOS.ZPT.GetDE cmp #MLI.E.INVPATH bne fnderr clc rts - -moventry ldy h_entln Get FileInfo From Directory Block Buffer +*-------------------------------------- +XDOS.ZPT.GetDE ldy XDOS.DH.EL Get FileInfo From Directory Block Buffer .1 dey lda (zpt),y move entry into storage - sta d_stor,y + sta XDOS.DE.Filename,y tya bne .1 -moventry.CLCRTS + +XDOS.ZPT.GetDE.CLCRTS clc rts *-------------------------------------- XDOS.FindFile jsr XDOS.CheckPath see if file exists - bcc moventry + bcc XDOS.ZPT.GetDE rts *-------------------------------------- XDOS.CheckPath jsr XDOS.FindVol @@ -205,27 +215,27 @@ XDOS.CheckPath jsr XDOS.FindVol ldy #$1F move in id and date info .1 lda (zpt),y - sta d_stor,y + sta XDOS.DE.Filename,y dey cpy #$17 bne .1 .2 lda rootstuf-$10,y - sta d_stor,y + sta XDOS.DE.Filename,y dey cpy #$0F bne .2 lda #$D0 fake directory file - sta d_stor + sta XDOS.DE.Filename lda XDOS.GBuf+2 check forward link. ora XDOS.GBuf+3 if non-zero, assume full sized directory bne .3 else assume it's the slot 3 /RAM volume lda #$02 so reset eof and blocks_used fields - sta d_eof+1 + sta XDOS.DE.EOF+1 lda #$01 - sta d_usage + sta XDOS.DE.BlkUsed .3 lda #MLI.E.INVPATH bad path (carry set) rts @@ -243,16 +253,17 @@ L37C9 stz totent reset entry counter. jsr XDOS.LookupNameInDirBlk look for name pointed to by pnptr. bcc namfound if name was found. - lda entcntl have we looked at all of the + lda XDOS.FileCnt have we looked at all of the sbc totent entries in this directory? bcc L37E2 maybe, check hi count. bne L37EB no, read next directory block. - lda entcnth has the last entry been looked at? + lda XDOS.FileCnt+1 has the last entry been looked at? beq errfnf yes, give 'file not found' error -L37E2 dec entcnth should be at least one -L37EB sta entcntl keep a running count. +L37E2 dec XDOS.FileCnt+1 should be at least one + +L37EB sta XDOS.FileCnt keep a running count. lda /XDOS.GBuf reset indirect pointer sta zpt+1 @@ -280,11 +291,11 @@ errfnf lda nofree was any free entry found? cmp XDOS.GBuf+3 if both are 0 then give up. beq .2 report 'not found'. -.1 sta d_entblk +.1 sta XDOS.DE.DirEBlk lda XDOS.GBuf+3 - sta d_entblk+1 assume 1st entry of next block + sta XDOS.DE.DirEBlk+1 assume 1st entry of next block lda #$01 is free for use. - sta d_entnum mark as valid (for create) + sta XDOS.DE.DirEIB mark as valid (for create) sta nofree .2 jsr nxtpnam1 'file not found' or 'path not found'? @@ -301,20 +312,20 @@ lookfil0.RTS rts namfound jsr nxtpname adj index to next name in path. beq filfound branch if that was the last name. - ldy #$00 be sure this is a directory entry. - lda (zpt),y high nibble will tell. +* ldy #$00 be sure this is a directory entry. + lda (zpt) high nibble will tell. and #$F0 cmp #$D0 is it a subdirectory? bne errpath1 error if not. ldy #$12 get address of 1st subdirectory block lda (zpt),y - sta d_head+1 save as file's header block too + sta XDOS.DE.DirHBlk+1 save as file's header block too tax dey lda (zpt),y - sta d_head + sta XDOS.DE.DirHBlk .DO LOWERCASE=1 jsr XDOS.ReadGBufAXDir @@ -324,9 +335,9 @@ namfound jsr nxtpname adj index to next name in path. bcs lookfil0.RTS if error. lda XDOS.GBuf+37 get the # of files contained in this - sta entcntl directory. + sta XDOS.FileCnt directory. lda XDOS.GBuf+38 - sta entcnth + sta XDOS.FileCnt+1 *-------------------------------------- * Check if $75 at VOL/DIR entry + $14 * (8 bytes reserved) @@ -350,14 +361,14 @@ L386C asl sec rts .FIN -*-------------------------------------- -movhead jsr movhed0 move directory info. + +movhead jsr XDOS.GetDH move directory info. jmp lookfil0 do next local pathname. +*-------------------------------------- +XDOS.GetDH ldx #10 move this directory info -movhed0 ldx #9 move this directory info - -.1 lda XDOS.GBuf+$1C,x - sta h_credt,x +.1 lda XDOS.GBuf+28,x + sta XDOS.DH.CTime,x dex bpl .1 @@ -368,17 +379,17 @@ movhed0 ldx #9 move this directory info cmp #$57 bne .20 - lda XDOS.GBuf+$15 + lda XDOS.GBuf+21 bne .20 -.2 lda XDOS.GBuf+$14,x - sta h_acl,x +.2 lda XDOS.GBuf+20,x + sta XDOS.DH.ACL,x dex bpl .2 bra .21 -.20 stz h_acl,x +.20 stz XDOS.DH.ACL,x dex bpl .20 @@ -391,30 +402,30 @@ movhed0 ldx #9 move this directory info ldx #$03 otherwise, save owner info about -.3 lda XDOS.GBuf+$27,x this header. - sta own_blk,x +.3 lda XDOS.GBuf+39,x this header. + sta XDOS.OH.Blk,x dex bpl .3 .8 rts *-------------------------------------- -filfound lda h_maxent figure out which entry # this is +filfound lda XDOS.DH.EPB figure out which entry # this is sec sbc cntent max entries - count entries + 1 adc #$00 = entry # (carry was set) - sta d_entnum + sta XDOS.DE.DirEIB lda ZP.BLKNUM and indicate block # of this directory - sta d_entblk + sta XDOS.DE.DirEBlk lda ZP.BLKNUM+1 - sta d_entblk+1 + sta XDOS.DE.DirEBlk+1 * clc done by ADC #$00 rts *-------------------------------------- XDOS.LookupNameInDirBlk - lda h_maxent reset count of files per block + lda XDOS.DH.EPB reset count of files per block sta cntent jsr XDOS.ZPT.InitGBuf reset indirect pointer to XDOS.GBuf @@ -470,26 +481,30 @@ XDOS.FindVol jsr XDOS.FindVolInVCBOrDev ldx #$42 zero out directory temps .FIN -.1 stz own_blk,x and owner info +.1 stz XDOS.OH.Blk,x and owner info dex bpl .1 - lda GP.DEVNUM setup device # for this directory - sta d_dev - jsr movhed0 setup other header info from directory + lda GP.DEVNUM setup device # for this directory + sta XDOS.DE.DevID + jsr XDOS.GetDH setup other header info from directory ldy #$01 in XDOS.GBuf and clean up misc info. ldx XDOS.VCBPtr inx -.2 lda XDOS.VCBs+VCB.TBLK,x misc info includes - sta h_tblk,y total # of blocks, - lda XDOS.VCBs+VCB.BMAP,x the address of the 1st bitmap, - sta h_bmap,y +.2 lda XDOS.VCBs+VCB.TBLK,x misc info includes + sta XDOS.DH.BlkCnt,y total # of blocks, + + lda XDOS.VCBs+VCB.BMAP,x the address of the 1st bitmap, + sta XDOS.DH.BMPtr,y + lda ZP.BLKNUM,y directory's disk address, - sta d_head,y - lda h_fcnt,y and setting up a counter for the # of - sta entcntl,y files in this directory. + sta XDOS.DE.DirHBlk,y + + lda XDOS.DH.FileCnt,y and setting up a counter for the # of + sta XDOS.FileCnt,y files in this directory. + dex dey bpl .2 @@ -503,31 +518,32 @@ nxtpnam1 ldy namptr inc pathname pointer to next name sec adc namptr if this addition results in zero, tay then prefixed directory has been moved - bne .1 to another device. branch if not. - lda GP.DEVNUM revise GP.DEVNUM for prefixed directory - sta p_dev +* bne .1 to another device. branch if not. + +* lda GP.DEVNUM revise GP.DEVNUM for prefixed directory +* sta p_dev .1 lda XDOS.PathBuf,y test for end of name. clc no errors novolume rts -*-------------------------------------- +*-------------------------------------- OK for . XDOS.FindVolInVCBOrDev lda #$00 - ldy GP.PFXPTR use prefix volume name to look up vcb. + ldy GP.PFXPTR use prefix volume name to look up vcb. bit prfxflg is this a prefixed path? bpl L396F branch if it is tay set ptr to volume name L396F sty L39D4+1 and save. - sta GP.DEVNUM zero out dev# until vcb located. + sta GP.DEVNUM zero out dev# until vcb located. lda #XDOS.VCB0 L3975 pha acc now used as vcb lookup index. tax index pointer to x. - lda XDOS.VCBs,x get vcb volume name length. + lda XDOS.VCBs,x get vcb volume name length. bne L3987 branch if claimed vcb to be tested. L397C ldy L39D4+1 restore pointer to requested vol name. @@ -540,7 +556,7 @@ L397C ldy L39D4+1 restore pointer to requested vol name. L3987 sta namcnt save length of vol name to be compared. -L398A cmp XDOS.PathBuf,y is it the same as requested vol name? +L398A cmp XDOS.PathBuf,y is it the same as requested vol name? bne L397C branch if not inx @@ -550,9 +566,9 @@ L398A cmp XDOS.PathBuf,y is it the same as requested vol name? bpl L398A if not. plx restore pointer to matching vcb. - stx XDOS.VCBPtr save it for future reference. - lda XDOS.VCBs+VCB.DEV,x get it's device # - sta GP.DEVNUM and save it. + stx XDOS.VCBPtr save it for future reference. + lda XDOS.VCBs+VCB.DEV,x get it's device # + sta GP.DEVNUM and save it. lda #$02 assume prefix is not used and ldx #$00 that root directory is to be used. @@ -566,7 +582,7 @@ L39AC tay if prefix then find ptr to prefixed beq L39C2 branch if no prefix. sec - adc XDOS.PathBuf,y inc to next dir in prefix path. + adc XDOS.PathBuf,y inc to next dir in prefix path. bcc L39AC branch if another dir in prefix. pla @@ -589,18 +605,18 @@ L39C2 pla jsr XDOS.CheckVolName compare dir name with path name. bcc L39F0 if they match, stop looking. -L39CC ldx XDOS.VCBPtr check if current (matched) vcb is active +L39CC ldx XDOS.VCBPtr check if current (matched) vcb is active lda XDOS.VCBs+VCB.OFCNT,x i.e. does it have open files? bne L39ED report not found if active. L39D4 lda #$FF SELF MODIFIED vnptr : make path ptr same as volume ptr - sta namptr + jsr mvdevnums copy all device #'s to be examined. - lda GP.DEVNUM log current device 1st before searching + lda GP.DEVNUM log current device 1st before searching bne L39F1 others. -L39E2 ldx GP.DEVCNT scan look list for devices we need +L39E2 ldx GP.DEVCNT scan look list for devices we need L39E5 lda loklst,x to search for the requested volume. bne L39F4 branch if we've a device to look at. @@ -612,7 +628,7 @@ L39ED lda #MLI.E.VNOTFND no mounted volume sec error L39F0 rts -L39F1 ldx GP.DEVCNT now remove the device from the list +L39F1 ldx GP.DEVCNT now remove the device from the list L39F4 cmp loklst,x of prospective devices. beq L39FE branch if match. @@ -622,13 +638,13 @@ L39F4 cmp loklst,x of prospective devices. bmi L39ED if dev was removed from GP.DEVLST (/RAM). -L39FE sta GP.DEVNUM preserve device to be checked next. +L39FE sta GP.DEVNUM preserve device to be checked next. stz loklst,x mark this one as tested. jsr XDOS.FindVCBForDevNum find vcb that claims this dev (if any). bcs L3A29 branch if vcb full. - lda XDOS.VCBs,x did we find it or return free vcb? + lda XDOS.VCBs,x did we find it or return free vcb? beq L3A16 if free vcb. lda XDOS.VCBs+VCB.OFCNT,x is this volume active? @@ -648,9 +664,10 @@ L3A16 lda #$02 go read root dir into XDOS.GBuf jsr XDOS.CheckVolName is this the volume ? bcs L39E2 if not + L3A29 rts *-------------------------------------- -mvdevnums ldx GP.DEVCNT copy all dev #'s to be checked. +mvdevnums ldx GP.DEVCNT copy all dev #'s to be checked. .1 lda GP.DEVLST,x active device list. and #$F0 strip device type info. @@ -666,24 +683,24 @@ XDOS.FindVCBForDevNum ldy #$FF .1 tax new index to next vcb - lda XDOS.VCBs+VCB.DEV,x check all devnums - cmp GP.DEVNUM is this the vcb? + lda XDOS.VCBs+VCB.DEV,x check all devnums + cmp GP.DEVNUM is this the vcb? beq .7 - lda XDOS.VCBs,x is this a free vcb? + lda XDOS.VCBs,x is this a free vcb? bne .3 if not iny bne .3 already found a free one - stx XDOS.VCBPtr save first free VCB + stx XDOS.VCBPtr save first free VCB .3 txa clc inc index to next vcb adc #VCB bcc .1 - ldx XDOS.VCBPtr get found free if any + ldx XDOS.VCBPtr get found free if any tya any free vcb's available? bpl .8 yes, exit with X = XDOS.VCBPtr @@ -703,10 +720,10 @@ XDOS.FindVCBForDevNum * sec rts -.5 stz XDOS.VCBs,x free this entry +.5 stz XDOS.VCBs,x free this entry stz XDOS.VCBs+VCB.DEV,x -.7 stx XDOS.VCBPtr save entry index. +.7 stx XDOS.VCBPtr save entry index. .8 clc no error. rts @@ -715,7 +732,7 @@ XDOS.CheckVolName ldx #$00 index to directory name. ldy namptr index to pathname. - lda XDOS.GBuf+4 get dir name length and type. + lda XDOS.GBuf+4 get dir name length and type. cmp #$E0 is it a directory? bcc .1 if not. @@ -726,7 +743,7 @@ XDOS.CheckVolName .1 sec indicate not found rts -.2 lda XDOS.GBuf+4,x next char +.2 lda XDOS.GBuf+4,x next char .3 cmp XDOS.PathBuf,y bne .1 if not the same. @@ -734,40 +751,40 @@ XDOS.CheckVolName inx check next char iny dec namcnt - bpl .2 if more to compare. + bpl .2 if more to compare. clc match found XDOS.CheckVolName.RTS rts *-------------------------------------- -XDOS.VCBMount ldx XDOS.VCBPtr previously logged in volume? - lda XDOS.VCBs,x (acc = 0?) +XDOS.VCBMount ldx XDOS.VCBPtr previously logged in volume? + lda XDOS.VCBs,x (acc = 0?) beq XDOS.VCBMountAtX no, go prepare vcb. jsr XDOS.VCBCmpGBUF does vcb match vol read? - bcc XDOS.CheckVolName.RTS yes, do not disturb. + bcc XDOS.CheckVolName.RTS yes, do not disturb. XDOS.VCBMountAtX ldy #VCB zero out vcb entry -L3AB2 stz XDOS.VCBs,x +.1 stz XDOS.VCBs,x inx dey - bne L3AB2 + bne .1 - lda XDOS.GBuf pointer to previous dir block - ora XDOS.GBuf+1 must be null - bne tsterr + lda XDOS.GBuf pointer to previous dir block + ora XDOS.GBuf+1 must be null + bne .9 - lda XDOS.GBuf+4 test for header + lda XDOS.GBuf+4 test for header and #$E0 cmp #$E0 - bne tsterr + bne .9 - jsr tstdupvol does a duplicate with open files - bcs L3B04 already exist? branch if yes. + jsr XDOS.ChkDupVol does a duplicate with open files + bcs .8 already exist? branch if yes. - lda XDOS.GBuf+4 move volume name to vcb. + lda XDOS.GBuf+4 move volume name to vcb. and #$0F strip root marker tay pha @@ -775,31 +792,31 @@ L3AB2 stz XDOS.VCBs,x adc XDOS.VCBPtr tax -L3ACE lda XDOS.GBuf+4,y +.2 lda XDOS.GBuf+4,y sta XDOS.VCBs,x dex dey - bne L3ACE + bne .2 pla get length again - sta XDOS.VCBs,x and save. + sta XDOS.VCBs,x and save. - lda GP.DEVNUM last device used. - sta XDOS.VCBs+VCB.DEV,x save device # and + lda GP.DEVNUM last device used. + sta XDOS.VCBs+VCB.DEV,x save device # and ldy #0 -.1 lda XDOS.GBuf+39,y - sta XDOS.VCBs+VCB.BMAP,x copy BMAP+TBLK +.3 lda XDOS.GBuf+39,y + sta XDOS.VCBs+VCB.BMAP,x copy BMAP+TBLK iny inx cpy #4 - bne .1 + bne .3 -L3B04 clc indicate logged if possible +.8 clc indicate logged if possible rts -tsterr lda #MLI.E.NOTPRODOS not tree or dir, unrecognized type +.9 lda #MLI.E.NOTPRODOS not tree or dir, unrecognized type sec rts *-------------------------------------- @@ -829,39 +846,40 @@ XDOS.VCBCmpGBUF lda XDOS.GBuf+4 with name in directory. ldx .1+1 xvcbptr : offset to start of vcb (rev note #23) rts *-------------------------------------- -tstdupvol lda #XDOS.VCB0 check for other logged in volumes with the same name. +XDOS.ChkDupVol lda #XDOS.VCB0 check for other logged in volumes with the same name. -L3B2C tax +.1 tax jsr XDOS.VCBCmpGBUF - bcs L3B41 if no match. + bcs .2 if no match. lda XDOS.VCBs+VCB.OFCNT,x test for any open files. - bne L3B4B cannot look at this volume. + bne .3 cannot look at this volume. - stz XDOS.VCBs,x take duplicate offline if no open files + stz XDOS.VCBs,x take duplicate offline if no open files stz XDOS.VCBs+VCB.DEV,x * clc ok to log in new volume. rts -L3B41 txa index to next vcb +.2 txa index to next vcb * sec adc #VCB-1 - bcc L3B2C branch if more to check + bcc .1 branch if more to check clc rts -L3B4B sta XDOS.VCBDupFlag duplicate has been found. +.3 sta XDOS.VCBDupFlag duplicate has been found. stx XDOS.VCBDupEnt save pointer to conflicting vcb. sec error. rts *-------------------------------------- -tstfrblk ldx XDOS.VCBPtr test if enough free blocks available for request. +XDOS.CheckFree ldx XDOS.VCBPtr test if enough free blocks available for request. lda XDOS.VCBs+VCB.FBLK+1,x check if proper count for this volume. ora XDOS.VCBs+VCB.FBLK,x - bne L3BAD branch if count is non-zero. + bne XDOS.CheckFree1 branch if count is non-zero. -tkfrecnt jsr cntbms get # of bitmaps +XDOS.GetFreeCntVCBX + jsr XDOS.GetBMCnt get # of bitmaps sta bmcnt and save. stz scrtch start count at 0 @@ -879,31 +897,31 @@ tkfrecnt jsr cntbms get # of bitmaps lda XDOS.VCBs+VCB.BMAP+1,x sta ZP.BLKNUM+1 -L3B81 jsr XDOS.ReadGBuf use general buffer for temp space to +.1 jsr XDOS.ReadGBuf use general buffer for temp space to bcs L3BC1 count free blocks (bits). - jsr count + jsr XDOS.CntFreeGBuf dec bmcnt was that the last bitmap? - bmi L3B96 if so, go change fcb so not done again. + bmi .2 if so, go change fcb so not done again. inc ZP.BLKNUM - bne L3B81 + bne .1 inc ZP.BLKNUM+1 - bra L3B81 + bra .1 -L3B96 ldx XDOS.VCBPtr mark which block had 1st free space +.2 ldx XDOS.VCBPtr mark which block had 1st free space lda nofree bmi L3BBE if no free space was found. sta XDOS.VCBs+VCB.BMAPIDX,x update the free count. lda scrtch+1 - sta XDOS.VCBs+VCB.FBLK+1,x update volume control byte. + sta XDOS.VCBs+VCB.FBLK+1,x update volume control byte. lda scrtch sta XDOS.VCBs+VCB.FBLK,x - -L3BAD lda XDOS.VCBs+VCB.FBLK,x compare total available free blocks +*-------------------------------------- +XDOS.CheckFree1 lda XDOS.VCBs+VCB.FBLK,x compare total available free blocks sec on this volume. sbc reql lda XDOS.VCBs+VCB.FBLK+1,x @@ -917,57 +935,57 @@ L3BBE lda #MLI.E.VOLFULL sec L3BC1 rts *-------------------------------------- -count ldy #$00 +XDOS.CntFreeGBuf + ldy #$00 -L3BC4 lda XDOS.GBuf,y bit pattern. - beq L3BCC don't count +.1 lda XDOS.GBuf,y bit pattern. + beq .2 don't count - jsr cntfree + jsr XDOS.CntFreeA -L3BCC lda XDOS.GBuf+$100,y do both pages with same loop - beq L3BD4 +.2 lda XDOS.GBuf+$100,y do both pages with same loop + beq .3 - jsr cntfree + jsr XDOS.CntFreeA -L3BD4 iny - bne L3BC4 loop until all 512 bytes counted. +.3 iny + bne .1 loop until all 512 bytes counted. bit nofree has 1st block w/free space been found? - bpl L3BEE if yes. + bpl .8 if yes. lda scrtch test to see if any blocks were counted ora scrtch+1 - beq L3BEE branch if none counted. + beq .8 branch if none counted. - jsr cntbms get total # of maps. + jsr XDOS.GetBMCnt get total # of maps. sec subtract countdown from total bitmaps sbc bmcnt sta nofree -L3BEE rts +.8 rts *-------------------------------------- -cntfree asl count the # of bits in this byte - bcc L3BFA +XDOS.CntFreeA asl count the # of bits in this byte + bcc .1 inc scrtch - bne L3BFA + bne .1 inc scrtch+1 -L3BFA ora #$00 - bne cntfree loop until all bits counted - rts +.1 tax + bne XDOS.CntFreeA loop until all bits counted + +.8 rts *-------------------------------------- -cntbms ldx XDOS.VCBPtr - ldy XDOS.VCBs+VCB.TBLK+1,x return the # of bitmaps - lda XDOS.VCBs+VCB.TBLK,x possible with the total count - bne L3C0B found in the vcb. +XDOS.GetBMCnt ldx XDOS.VCBPtr + lda XDOS.VCBs+VCB.TBLK+1,x return the # of bitmaps + ldy XDOS.VCBs+VCB.TBLK,x possible with the total count + bne .1 found in the vcb. - dey adj for bitmap block boundary + dec adj for bitmap block boundary -L3C0B tya - - lsr divide by 16. the result is +.1 lsr divide by 16. the result is lsr the # of bitmaps. lsr lsr diff --git a/ProDOS.FX/ProDOS.S.XDOS.C.txt b/ProDOS.FX/ProDOS.S.XDOS.C.txt index 163ded8a..6476f3dc 100644 --- a/ProDOS.FX/ProDOS.S.XDOS.C.txt +++ b/ProDOS.FX/ProDOS.S.XDOS.C.txt @@ -34,7 +34,7 @@ XDOS.DeallocAX stx bmcnt high address of block. jsr XDOS.GetBM make sure device is correct one. bcs L3C8B error. - lda bmacmap current map. + lda XDOS.BM.Idx current map. cmp bmcnt is in-core bitmap the correct one ? beq L3C64 branch if yes. @@ -45,7 +45,7 @@ XDOS.DeallocAX stx bmcnt high address of block. ldx XDOS.VCBPtr sta XDOS.VCBs+VCB.BMAPIDX,x and make it current. - lda bmadev + lda XDOS.BM.DevID jsr XDOS.ReadBMDevA read it into buffer bcs L3C8B @@ -61,8 +61,8 @@ L3C64 ldy bmptr index to byte bmbufhi ora XDOS.BMBuf,y this address + 2 is used as an absolute reference to XDOS.BMBuf high byte. sta XDOS.BMBuf,y -L3C7D lda #$80 mark bitmap as modified - tsb bmastat +L3C7D sec mark bitmap as modified + ror XDOS.BM.Status inc deblock inc count of blocks deallocated bne L3C8A @@ -142,8 +142,8 @@ L3CE4 lsr restore pos'n of all but left most bit. L3CF4 sta XDOS.BMBuf+$100,y update to show allocated block in use. -L3CF7 lda #$80 indicate map is modified. - tsb bmastat +L3CF7 sec indicate map is modified. + ror XDOS.BM.Status ldx XDOS.VCBPtr subtract 1 from total free vcb blocks lda XDOS.VCBs+VCB.FBLK,x to account for newly allocated block. @@ -173,7 +173,7 @@ XDOS.NextBM ldx XDOS.VCBPtr inc to next bitmap, but 1st make sure there is XDOS.GetBM ldy XDOS.VCBPtr lda XDOS.VCBs+VCB.DEV,y get device #. - cmp bmadev does this map match this device ? + cmp XDOS.BM.DevID does this map match this device ? beq L3D4A yes. jsr XDOS.FlushBM otherwise, save other volume's bitmap @@ -181,9 +181,9 @@ XDOS.GetBM ldy XDOS.VCBPtr ldy XDOS.VCBPtr lda XDOS.VCBs+VCB.DEV,y - sta bmadev and read in fresh bitmap for this dev. + sta XDOS.BM.DevID and read in fresh bitmap for this dev. -L3D4A ldy bmastat is it already modified ? +L3D4A bit XDOS.BM.Status is it already modified ? bmi L3D54 yes, return pointer jsr XDOS.ReadBMDevA otherwise read in fresh bitmap. @@ -202,28 +202,28 @@ L3D60 lda #MLI.E.VOLFULL request can't be filled rts *-------------------------------------- XDOS.FlushBM clc - lda bmastat is current map modified ? + bit XDOS.BM.Status is current map modified ? bpl .9 no. jsr XDOS.WriteBM update device. bcs .9 if error on writing. - stz bmastat mark bitmap buffer as free + stz XDOS.BM.Status mark bitmap buffer as free lda #0 MUST EXIT WITH A=0 .9 rts *-------------------------------------- -XDOS.ReadBMDevA sta bmadev read bitmap specified by dev and vcb. +XDOS.ReadBMDevA sta XDOS.BM.DevID read bitmap specified by dev and vcb. ldy XDOS.VCBPtr get lowest map # with free blocks in it lda XDOS.VCBs+VCB.BMAPIDX,y - sta bmacmap associate offset with bitmap ctrl block. + sta XDOS.BM.Idx associate offset with bitmap ctrl block. clc add this # to the base address of adc XDOS.VCBs+VCB.BMAP,y 1st bitmap and save in bmadadr which - sta bmadadr is address of bitmap to be used. + sta XDOS.BM.BlkNum is address of bitmap to be used. lda XDOS.VCBs+VCB.BMAP+1,y adc #$00 - sta bmadadr+1 + sta XDOS.BM.BlkNum+1 lda #$01 read device command .HS 2C BIT ABS @@ -233,11 +233,11 @@ XDOS.WriteBM lda #$02 write command. lda GP.DEVNUM save current dev # pha - lda bmadev get bitmap's dev # + lda XDOS.BM.DevID get bitmap's dev # sta GP.DEVNUM - lda bmadadr and disk address + lda XDOS.BM.BlkNum and disk address sta ZP.BLKNUM - lda bmadadr+1 + lda XDOS.BM.BlkNum+1 sta ZP.BLKNUM+1 lda /XDOS.BMBuf @@ -255,9 +255,9 @@ XDOS.WriteGBufDir bra XDOS.WriteGBuf .FIN *-------------------------------------- -XDOS.ReadGBuf_d_frst - lda d_frst read 1st block of directory into XDOS.GBuf - ldx d_frst+1 +XDOS.ReadGBufDEKeyPtr + lda XDOS.DE.KeyPtr read 1st block of directory into XDOS.GBuf + ldx XDOS.DE.KeyPtr+1 .DO LOWERCASE=1 XDOS.ReadGBufAXDir jsr XDOS.ReadGBufAX @@ -283,10 +283,10 @@ XDOS.RWBlock sta ZP.BUFPTR+1 buffer high. .DO LOWERCASE=1 XDOS.CheckAndUnpackGBuf - lda XDOS.GBuf+$23 - sta h_entln - ldy XDOS.GBuf+$24 - sty h_maxent + lda XDOS.GBuf+35 + sta XDOS.DH.EL + ldy XDOS.GBuf+36 + sty XDOS.DH.EPB cmp #$27 bne .9 @@ -299,7 +299,7 @@ XDOS.CheckAndUnpackGBuf XDOS.UnpackGBuf jsr XDOS.ZPT.InitGBuf - ldx h_maxent + ldx XDOS.DH.EPB .1 jsr XDOS.ZPT.Unpack @@ -317,7 +317,7 @@ XDOS.PackGBuf.Bitmap .EQ sos *-------------------------------------- XDOS.PackGBuf jsr XDOS.ZPT.InitGBuf - ldx h_maxent + ldx XDOS.DH.EPB .1 lda (zpt) and #$0F @@ -371,7 +371,7 @@ XDOS.PackGBuf jsr XDOS.ZPT.InitGBuf .FIN *-------------------------------------- -XDOS.GetMark ldx fcbptr index to open fcb. +XDOS.GetMark ldx XDOS.FCBPtr index to open fcb. ldy #$02 index to user's mark parameter. @@ -390,7 +390,7 @@ L3DFD lda #MLI.E.BEYEOF invalid position rts *-------------------------------------- XDOS.SetMark ldy #$04 index to user's desired position. - ldx fcbptr file's control block index. + ldx XDOS.FCBPtr file's control block index. inx inc by 2 for index to hi eof inx sec indicate comparisons are necessary. @@ -410,11 +410,12 @@ XDOS.SetMark ldy #$04 index to user's desired position. tya test for all bytes moved/tested. eor #$01 preserves carry status. bne .1 branch if more. - -rdposn ldy fcbptr test to see if new position is +*-------------------------------------- +rdposn ldy XDOS.FCBPtr test to see if new position is lda XDOS.FCBs+FCB.MARK+1,y within the same (current) data block. and #$FE sta scrtch + lda tposlh middle byte of new position sec sbc scrtch @@ -454,7 +455,7 @@ L3E59 lda XDOS.FCBs+FCB.STYPE,y use storage type as # of index levels bcs L3ED4 if error. -L3E6B ldy fcbptr test to see if current index block +L3E6B ldy XDOS.FCBPtr test to see if current index block lda XDOS.FCBs+FCB.MARK+2,y is usable by checking if new and #$FE position is within 128k of the sta scrtch beginning of current sapling level @@ -596,7 +597,7 @@ rnewpos sta ZP.BLKNUM+1 jsr XDOS.ClrFCBStatus show whole chain is allocated. *-------------------------------------- -svmark ldy fcbptr update position in fcb +svmark ldy XDOS.FCBPtr update position in fcb iny iny ldx #$02 @@ -677,9 +678,9 @@ XDOS.ReadFCB.DBLK ldx #ZP.DataPtr points at address of data buffer. jsr XDOS.FileIOPtrX go do file input. - bcs L3FF2 error. + bcs .9 error. - ldy fcbptr + ldy XDOS.FCBPtr lda ZP.BLKNUM sta XDOS.FCBs+FCB.DBLK,y save block # just read in fcb. lda ZP.BLKNUM+1 @@ -687,7 +688,7 @@ XDOS.ReadFCB.DBLK * clc -L3FF2 rts +.9 rts *-------------------------------------- *rfcbidx lda #$01 prepare to read index block : read command * sta ZP.CMDNUM @@ -696,7 +697,7 @@ L3FF2 rts * XDOS.FileIOPtrX go read index block. * bcs L400C error -* ldy fcbptr +* ldy XDOS.FCBPtr * lda ZP.BLKNUM * sta XDOS.FCBs+FCB.IBLK,y save block address of this index in fcb * lda ZP.BLKNUM+1 @@ -714,7 +715,7 @@ wfcbfst jsr XDOS.FlushBM update the bitmap and write file's 1st block. rfcbfst ldx #$01 read command. lda #FCB.1stBLK - ora fcbptr add offset to fcbptr + ora XDOS.FCBPtr add offset to XDOS.FCBPtr tay txa get back command @@ -754,7 +755,7 @@ XDOS.FileIO2 sec also, set to indicate reg call made to *-------------------------------------- XDOS.WriteDBLK ldx #ZP.DataPtr point at memory address with x and lda #FCB.DBLK disk address with y. - ora fcbptr add offset to fcbptr + ora XDOS.FCBPtr add offset to XDOS.FCBPtr tay and put in y. lda #$02 write data block. jsr XDOS.FileIOPtrXCmdABlkY @@ -767,7 +768,7 @@ XDOS.WriteIBLK jsr XDOS.FlushBM update bitmap. ldx #zpt point to address of index buffer lda #FCB.IBLK and block address of that index block. - ora fcbptr + ora XDOS.FCBPtr tay lda #$02 jsr XDOS.FileIOPtrXCmdABlkY @@ -776,7 +777,7 @@ XDOS.WriteIBLK jsr XDOS.FlushBM update bitmap. lda #$7F mark index status as current. *-------------------------------------- XDOS.ResetFCBStatus - ldx fcbptr + ldx XDOS.FCBPtr and XDOS.FCBs+FCB.F,x sta XDOS.FCBs+FCB.F,x @@ -785,7 +786,7 @@ L4096 rts XDOS.Open jsr XDOS.FindFileOrVol look up the file. bcs L4096 if not, then error. -L40A0 jsr tstopen are any other files writing to this +L40A0 jsr XDOS.IsOpened 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. @@ -799,7 +800,7 @@ L40AB lda #MLI.E.FCBFULL fcb full error. L40AD lda fcbflg if this byte <> 0 then free fcb found beq L40AB and available for use. - ldx fcbptr get address of 1st free fcb found. + ldx XDOS.FCBPtr get address of 1st free fcb found. L40B9 ldy #FCB @@ -810,20 +811,20 @@ L40BD stz XDOS.FCBs,x but clean it first. ldy #0 - ldx fcbptr + ldx XDOS.FCBPtr -L40CB lda d_dev,y move ownership info. +L40CB lda XDOS.DE.DevID,y move ownership info. sta XDOS.FCBs+FCB.DEVID,x note: this code depends upon the defined inx order of both the fcb and directory entry buffer. iny cpy #6 bne L40CB - lda d_stor get storage type and + lda XDOS.DE.Filename get storage type and jsr XDOS.SetFCBSType tax save in x for later comparison - lda d_attr get file's attributes and use it + lda XDOS.DE.Access get file's attributes and use it and #$03 as a default access request. cpx #$0D if directory, don't allow write enable. bne L40EB @@ -846,22 +847,22 @@ L40F7 cpx #$04 is it a tree file type ? L40FF ldx #$06 move address of 1st block of file, end L4101 sta ZP.BLKNUM+1 of file and current usage count. - lda fcbptr + lda XDOS.FCBPtr ora ofcbtbl,x this is done via a translation table tay between directory info and fcb. - lda d_frst,x + lda XDOS.DE.KeyPtr,x sta XDOS.FCBs,y dex bpl L4101 last loop stores hi address of 1st block sta ZP.BLKNUM and this is the low one. - ldx fcbptr + ldx XDOS.FCBPtr lda cntent this was set up by 'tstopen'. sta XDOS.FCBs,x claim fcb for this file. jsr alcbuffr go allocate buffer in memory tables. bcs L4147 if errors. - ldx fcbptr + ldx XDOS.FCBPtr jsr XDOS.GetFCBBufX rtn addr of bufs in data & index ptrs. lda GP.FLEVEL mark level at which sta XDOS.FCBs+FCB.FLEVEL,x file was opened. @@ -885,7 +886,7 @@ L413C sta tposll,y L4147 pha save error code. - ldx fcbptr free buffer space. + ldx XDOS.FCBPtr free buffer space. stz XDOS.FCBs,x necessary to release fcb also. lda XDOS.FCBs+FCB.BUFID,x beq L4156 if no bufnum, ok because never alloc'd. @@ -902,14 +903,14 @@ L415E jsr XDOS.ReadFCB.DBLK read in 1st block of directory file. L4163 ldx XDOS.VCBPtr index to vcb. inc XDOS.VCBs+VCB.OFCNT,x add 1 to # of files currently open - ldx fcbptr index to fcb. + ldx XDOS.FCBPtr index to fcb. lda XDOS.FCBs+FCB.ID,x return ref # to user. ldy #$05 sta (ZP.A3L),y * clc open is successful rts *-------------------------------------- -tstopen stz cntent returns the ref # of a free fcb. +XDOS.IsOpened stz cntent returns the ref # of a free fcb. stz totent flag to indicate file already open. stz fcbflg flag indicates a free fcb is available. @@ -927,7 +928,7 @@ L4191 lda XDOS.FCBs,y is this fcb in use ? txa if not, should we claim it ? bne L41C1 branch if free fcb already found. - sty fcbptr save index to new free fcb. + sty XDOS.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. @@ -937,8 +938,8 @@ L41A3 tya add offset to index to ownership info tay and put it back in y. ldx #$06 index to directory entry owner info. -L41A9 lda XDOS.FCBs,y all bytes must match to say that it's - cmp d_dev-1,x the same file again. +L41A9 lda XDOS.FCBs,y all bytes must match to say that it's + cmp XDOS.DE.DevID-1,x the same file again. bne L41C1 if not, then next fcb. dey index to next lower bytes. @@ -963,7 +964,7 @@ L41C1 tya calc position of next fcb. rts *-------------------------------------- XDOS.UpdateFCBIBlk - ldy fcbptr + ldy XDOS.FCBPtr lda ZP.BLKNUM sta XDOS.FCBs+FCB.IBLK,y save block address of this index in fcb lda ZP.BLKNUM+1 diff --git a/ProDOS.FX/ProDOS.S.XDOS.D.txt b/ProDOS.FX/ProDOS.S.XDOS.D.txt index 56fe1725..98efcf96 100644 --- a/ProDOS.FX/ProDOS.S.XDOS.D.txt +++ b/ProDOS.FX/ProDOS.S.XDOS.D.txt @@ -11,7 +11,7 @@ XDOS.Read jsr mvdbufr xfer buffer address and request count bcc L4205 branch if result mark < eof. adjust - ldy fcbptr request to read until just before eof. + ldy XDOS.FCBPtr request to read until just before eof. lda XDOS.FCBs+FCB.EOF,y result = (eof-1) - position sbc tposll sta cbytes @@ -26,6 +26,7 @@ XDOS.Read jsr mvdbufr xfer buffer address and request count lda #MLI.E.EOF .HS 2C .9 lda #MLI.E.LOCKED + L4202 jmp errfix1 L4205 lda cbytes @@ -61,9 +62,9 @@ L421F jsr rdposn set up data pointer. bne L421F read into user's area. branch if data sta ioaccess needs to be written to force 1st call - lda usrbuf thru all dev handler checking. make + lda ZP.UserBuf thru all dev handler checking. make sta ZP.DataPtr the data buffer the user's space. - lda usrbuf+1 + lda ZP.UserBuf+1 sta ZP.DataPtr+1 L4249 jsr rdposn get next block directly into user space. @@ -89,6 +90,7 @@ L4269 dec cmdtemp has all been read fast ? lda rwreql test for end of read. ora rwreqh are both 0 ? beq rwdone yes, done. + bne L421F no, read last partial block L427B bcs L4249 @@ -116,7 +118,7 @@ L429C dec zpt+1 lda ioaccess has 1st call gone to device yet ? beq L4249 no, go thru normal route - lda ZP.DataPtr+1 reset hi buffer address for dev handler + lda ZP.DataPtr+1 reset hi buffer address for dev handler sta ZP.BUFPTR+1 jsr XDOS.DevCall bcc L424E no errors, branch always. @@ -142,14 +144,14 @@ rwdone ldy #$06 return total # of bytes actually read sta (ZP.A3L),y jmp rdposn leave with valid position in fcb. *-------------------------------------- -preprw ldy fcbptr adj pointer to user's buffer to make +preprw ldy XDOS.FCBPtr adj pointer to user's buffer to make sec the transfer - lda usrbuf + lda ZP.UserBuf sbc tposll - sta usrbuf + sta ZP.UserBuf bcs .1 if no adjustment to hi address needed - dec usrbuf+1 + dec ZP.UserBuf+1 .1 lda XDOS.FCBs+FCB.NLMASK,y test for new line enabled. clc @@ -177,7 +179,7 @@ readpart txa x = low count of bytes to move. L430F dex L4310 lda (sos),y move data to user's buffer - sta (usrbuf),y + sta (ZP.UserBuf),y bcs tstnewl test for newline 1st ! L4316 txa note: x must be unchanged from tstnewl ! @@ -188,7 +190,7 @@ L4319 dex dec # of bytes left to move. bne L4310 no, move next byte. lda sos+1 test for end of buffer, but first - inc usrbuf+1 adjust user buffer pointer + inc ZP.UserBuf+1 adjust user buffer pointer inc tposlh and position bne L4329 @@ -224,7 +226,7 @@ tstnewl lda (sos),y get last byte transferred again. L4350 iny adjust position. bne L435D - inc usrbuf+1 inc pointers + inc ZP.UserBuf+1 inc pointers inc tposlh bne L435D @@ -242,22 +244,22 @@ L4366 stx rwreql and remainder of request count. php save statuses clc adjust user's low buffer address tya - adc usrbuf - sta usrbuf + adc ZP.UserBuf + sta ZP.UserBuf bcc L4374 - inc usrbuf+1 adjust hi address as needed. + inc ZP.UserBuf+1 adjust hi address as needed. L4374 plp restore return statuses. setvflg rts this byte ($60) is used to set v flag. *-------------------------------------- fxdatptr lda ZP.DataPtr put current user buffer address back to normal - sta usrbuf + sta ZP.UserBuf lda ZP.DataPtr+1 - sta usrbuf+1 bank pair byte should be moved also. + sta ZP.UserBuf+1 bank pair byte should be moved also. - ldx fcbptr restore buffer address + ldx XDOS.FCBPtr restore buffer address jmp XDOS.GetFCBBufX *-------------------------------------- XDOS.ReadDir jsr rdposn @@ -278,7 +280,7 @@ XDOS.ReadDir jsr rdposn jsr XDOS.ZeroData clear out data block. ldy #$00 provide dummy back pointer for future - ldx fcbptr re-position. x = hi byte of last block + ldx XDOS.FCBPtr re-position. x = hi byte of last block L43A6 lda XDOS.FCBs+FCB.DBLK,x sta (ZP.DataPtr),y @@ -301,19 +303,19 @@ mvcbytes ldy #$04 move request count to a more accessable location lda (ZP.A3L),y sta cbytes+1 sta rwreqh - ldy fcbptr return y = val(fcbptr), + ldy XDOS.FCBPtr return y = val(XDOS.FCBPtr), lda XDOS.FCBs+FCB.ACCESS,y a = attributes clc and carry clear... rts *-------------------------------------- mvdbufr ldy #$02 move the pointer to user's buffer lda (ZP.A3L),y to the block file manager - sta usrbuf z-page area + sta ZP.UserBuf z-page area iny lda (ZP.A3L),y - sta usrbuf+1 + sta ZP.UserBuf+1 -XDOS.GetFCB.ST ldy fcbptr return storage type +XDOS.GetFCB.ST ldy XDOS.FCBPtr return storage type lda XDOS.FCBs+FCB.STYPE,y rts *-------------------------------------- @@ -325,7 +327,7 @@ XDOS.GetFCB.ST ldy fcbptr return storage type * carry set indicates scrtch > eof *-------------------------------------- calcmrk ldx #$00 - ldy fcbptr + ldy XDOS.FCBPtr clc L43EE lda XDOS.FCBs+FCB.MARK,y sta tposll,x @@ -367,7 +369,7 @@ L4418 lda oldeof,x place oldeof back into fcb * drop into wadjeof to adjust eof to mark if necessary -wadjeof jsr plus2fcb get y=fcbptr+2, x=2, a=y. +wadjeof jsr plus2fcb get y=XDOS.FCBPtr+2, x=2, a=y. L4434 lda XDOS.FCBs+FCB.EOF,y copy eof to old eof sta oldeof,x @@ -382,9 +384,9 @@ L4442 dey rts -plus2fcb lda #$02 on exit both a and y = fcbptr+2. +plus2fcb lda #$02 on exit both a and y = XDOS.FCBPtr+2. tax x = 2 - ora fcbptr + ora XDOS.FCBPtr tay rts *-------------------------------------- @@ -427,7 +429,7 @@ L4487 iny indexes and data block ? sty reql sta reqh - jsr tstfrblk + jsr XDOS.CheckFree bcs L44A2 pass back any errors. jsr XDOS.GetFCBStatus now get more specific. @@ -469,7 +471,7 @@ L44B8 jsr alcwblk go allocate for data block. lda scrtch block. get low block address. sta (zpt),y store low address. - ldy fcbptr update fcb to indicate that this block + ldy XDOS.FCBPtr update fcb to indicate that this block sta XDOS.FCBs+FCB.DBLK,y is allocated. txa get high address again. sta XDOS.FCBs+FCB.DBLK+1,y @@ -486,7 +488,7 @@ wrtpart txa dec rwreqh L44FF dex - lda (usrbuf),y move data from user's buffer + lda (ZP.UserBuf),y move data from user's buffer sta (sos),y txa beq L4525 @@ -495,7 +497,7 @@ L4507 iny page crossed ? bne L44FF no, keep moving. lda sos+1 test for end of buffer - inc usrbuf+1 but first adjust user buffer pointer + inc ZP.UserBuf+1 but first adjust user buffer pointer inc tposlh and position bne L451C @@ -529,7 +531,7 @@ L4536 dey reset modified y L4539 iny and position bne L4546 - inc usrbuf+1 inc pointers + inc ZP.UserBuf+1 inc pointers inc tposlh bne L4546 @@ -546,13 +548,13 @@ L4549 sty tposll save low position clc adjust user's low buffer address lda tposll - adc usrbuf - sta usrbuf + adc ZP.UserBuf + sta ZP.UserBuf bcc L4564 - inc usrbuf+1 adjust high address as needed. + inc ZP.UserBuf+1 adjust high address as needed. -L4564 jsr fcbused set directory flush bit. +L4564 jsr XDOS.SetFCB.DIRTY set directory flush bit. plp restore return statuses rts @@ -584,7 +586,7 @@ L457A jsr alcwblk get another block address for the sap lda scrtch+1 sta (zpt),y save hi address dec zpt+1 - ldy fcbptr make newly allocated block the current + ldy XDOS.FCBPtr make newly allocated block the current sta XDOS.FCBs+FCB.IBLK+1,y index block. txa sta XDOS.FCBs+FCB.IBLK,y @@ -617,7 +619,7 @@ L45B1 rts return errors. swapdown jsr alcwblk make current seed into a sapling, allocate a block before swap. bcs .9 return errors. - ldy fcbptr get previous first block + ldy XDOS.FCBPtr get previous first block lda XDOS.FCBs+FCB.1stBLK,y address into index block. pha save temporarily while swapping in new lda scrtch top index. get new block address (low) diff --git a/ProDOS.FX/ProDOS.S.XDOS.E.txt b/ProDOS.FX/ProDOS.S.XDOS.E.txt index e9f7083a..a516b0d4 100644 --- a/ProDOS.FX/ProDOS.S.XDOS.E.txt +++ b/ProDOS.FX/ProDOS.S.XDOS.E.txt @@ -8,7 +8,7 @@ XDOS.Close ldy #$01 close all ? sta cferr clear global close error. * lda #$00 start at the beginning. -.1 sta fcbptr save current low byte of pointer. +.1 sta XDOS.FCBPtr save current low byte of pointer. tax get the level at which the file lda XDOS.FCBs+FCB.FLEVEL,x was opened. cmp GP.FLEVEL if file's level is < global level @@ -28,7 +28,7 @@ XDOS.Close ldy #$01 close all ? bcs L46B6 close error. -.2 lda fcbptr inc pointer to next fcb +.2 lda XDOS.FCBPtr inc pointer to next fcb clc adc #FCB bcc .1 branch if within same page. @@ -38,7 +38,7 @@ XDOS.Close ldy #$01 close all ? rts (carry already set). *-------------------------------------- -XDOS.CloseOne jsr flush1 flush file 1st (including updating bitmap) +XDOS.CloseOne jsr XDOS.FlushOne flush file 1st (including updating bitmap) * bcs L46B6 branch if errors. bcc close2 @@ -50,14 +50,14 @@ XDOS.CloseOne jsr flush1 flush file 1st (including updating bitmap) plp rts -close2 ldx fcbptr +close2 ldx XDOS.FCBPtr lda XDOS.FCBs+FCB.BUFID,x release file buffer jsr relbuffr bcs L46B6 jsr XDOS.FCBDevIDSelect - stz XDOS.FCBs,x free fcb too + stz XDOS.FCBs,x free fcb too jsr XDOS.FindVCBForDevNum get vcb pointer. @@ -70,20 +70,20 @@ L46B6 bcs L46E6 don't report close all error now. *-------------------------------------- XDOS.Flush ldy #$01 flush all ? lda (ZP.A3L),y - bne flush1 no, just one of them. + bne XDOS.FlushOne no, just one of them. sta cferr clear global flush error. * lda #$00 start at the beginning. -L46C3 sta fcbptr save current low byte of pointer. +L46C3 sta XDOS.FCBPtr save current low byte of pointer. tax index to ref #. - lda XDOS.FCBs,x is this reference file open ? + lda XDOS.FCBs,x is this reference file open ? beq L46D1 no, try next. jsr flush2 clean it out... bcs L46E6 return anty errors. -L46D1 lda fcbptr inc pointer to next fcb. +L46D1 lda XDOS.FCBPtr inc pointer to next fcb. clc adc #FCB bcc L46C3 branch if within same page @@ -100,7 +100,7 @@ flush2 jsr XDOS.GetFCBBufX must set up vcb & buffer locations 1st. L46E6 jmp glberr error so check for close or flush all. -flush1 stz cferr for normal refnum flush, clear global error. +XDOS.FlushOne stz cferr for normal refnum flush, clear global error. jsr XDOS.GetFCB setup pointer to fcb user references. bcs L46E6 return any errors. @@ -123,25 +123,27 @@ L4704 jsr XDOS.GetFCBStatus bcs L46E6 if error. L4710 jsr XDOS.GetFCBStatus check to see if the index block (tree - and #$80 files only) needs to be written. - beq L471C branch if not. +* and #$80 files only) needs to be written. +* beq L471C branch if not. + + bpl L471C jsr XDOS.WriteIBLK bcs L46E6 return any errors. L471C ldy #0 - jsr XDOS.FCBDevIDSelect X = FCBPtr + jsr XDOS.FCBDevIDSelect X = XDOS.FCBPtr L4723 lda XDOS.FCBs+FCB.DEVID,x note: this code depends on the defined - sta d_dev,y order of the file control block and the + sta XDOS.DE.DevID,y order of the file control block and the inx temporary directory area in 'work space' iny cpy #6 bne L4723 - lda d_head read the directory header for this file - ldx d_head+1 + lda XDOS.DE.DirHBlk read the directory header for this file + ldx XDOS.DE.DirHBlk+1 .DO LOWERCASE=1 jsr XDOS.ReadGBufAXDir .ELSE @@ -149,13 +151,13 @@ L4723 lda XDOS.FCBs+FCB.DEVID,x note: this code depends on the defined .FIN bcs L46E6 if error. - jsr movhed0 move header info. - lda d_entblk get address of directory block that - ldx d_entblk+1 contains the file entry. - cmp d_head test to see if it's the same block the + jsr XDOS.GetDH move header info. + lda XDOS.DE.DirEBlk get address of directory block that + ldx XDOS.DE.DirEBlk+1 contains the file entry. + cmp XDOS.DE.DirHBlk test to see if it's the same block the bne .1 header is in. branch if not. - cpx d_head+1 + cpx XDOS.DE.DirHBlk+1 beq L4755 branch if header block = entry block .1 .DO LOWERCASE=1 @@ -164,48 +166,48 @@ L4723 lda XDOS.FCBs+FCB.DEVID,x note: this code depends on the defined jsr XDOS.ReadGBufAX read DIR block with file entry in general buffer. .FIN -L4755 jsr entcalc set up pointer to entry. +L4755 jsr XDOS.ZPT.SetEIB set up pointer to entry. - jsr moventry move entry to temp entry buffer in + jsr XDOS.ZPT.GetDE move entry to temp entry buffer in - ldx fcbptr 'work space'. update 'blocks used' count + ldx XDOS.FCBPtr 'work space'. update 'blocks used' count lda XDOS.FCBs+FCB.UBLK,x - sta d_usage + sta XDOS.DE.BlkUsed lda XDOS.FCBs+FCB.UBLK+1,x - sta d_usage+1 + sta XDOS.DE.BlkUsed+1 ldy #0 and move in end of file mark whether -L476C lda XDOS.FCBs+FCB.EOF,x needed or not. - sta d_eof,y +L476C lda XDOS.FCBs+FCB.EOF,x needed or not. + sta XDOS.DE.EOF,y iny cpy #$03 move all 3 bytes beq L4780 lda XDOS.FCBs+FCB.1stBLK,x also move in the address of the file's - sta d_filid,y first block since it might have changed + sta XDOS.DE.Type,y first block since it might have changed inx since the file first opened. bne L476C branch always. -L4780 ldx fcbptr +L4780 ldx XDOS.FCBPtr lda XDOS.FCBs+FCB.STYPE,x the last thing to update is storage - asl type (y=fcbptr+2). shift into high + asl type (y=XDOS.FCBPtr+2). shift into high asl nibble. asl asl sta scrtch - lda d_stor get old type byte (might be the same). + lda XDOS.DE.Filename get old type byte (might be the same). and #$0F strip off old type, ora scrtch add in the new type - sta d_stor and put it away. - jsr drevise go update directory. + sta XDOS.DE.Filename and put it away. + jsr XDOS.DE.Update go update directory. bcs glberr error. - ldx fcbptr mark + ldx XDOS.FCBPtr mark stz XDOS.FCBs+FCB.DIRTY,x fcb/directory as undirty. - lda d_dev see if bitmap should be written. - cmp bmadev is it in same as current file ? + lda XDOS.DE.DevID see if bitmap should be written. + cmp XDOS.BM.DevID is it in same as current file ? bne L47B2 yes, put it on the disk if necessary. jsr XDOS.FlushBM go put it away. @@ -231,7 +233,7 @@ L47C1 pla rts *-------------------------------------- XDOS.FCBDevIDSelect - ldx fcbptr + ldx XDOS.FCBPtr lda XDOS.FCBs+FCB.DEVID,x sta GP.DEVNUM rts @@ -241,24 +243,24 @@ XDOS.SetFCBSType lsr lsr lsr - ldy fcbptr and save it in fcb. + ldy XDOS.FCBPtr and save it in fcb. sta XDOS.FCBs+FCB.STYPE,y rts *-------------------------------------- XDOS.ClrFCBStatus - ldy fcbptr clear allocation states for data block - lda XDOS.FCBs+FCB.F,y and both levels of indexes/ + ldy XDOS.FCBPtr clear allocation states for data block + lda XDOS.FCBs+FCB.F,y and both levels of indexes/ and #$F8 - sta XDOS.FCBs+FCB.F,y indicates that either they exist now + sta XDOS.FCBs+FCB.F,y indicates that either they exist now rts or unnecessary for current position. *-------------------------------------- XDOS.GetFCBStatus - ldx fcbptr index to fcb. - lda XDOS.FCBs+FCB.F,x return status byte. + ldx XDOS.FCBPtr index to fcb. + lda XDOS.FCBs+FCB.F,x return status byte. rts *-------------------------------------- XDOS.SetFCBStatus - ldx fcbptr + ldx XDOS.FCBPtr ora XDOS.FCBs+FCB.F,x sta XDOS.FCBs+FCB.F,x rts @@ -283,7 +285,7 @@ XDOS.SetEOF jsr XDOS.GetFCB.ST can only move end of tree, sapling or seed. jsr XDOS.TestWP hardware write protected ? bcs L47CA yes, access error. - ldy fcbptr save old eof so it can be seen + ldy XDOS.FCBPtr save old eof so it can be seen iny whether blocks need to be released iny upon contraction. ldx #$02 all 3 bytes of the eof @@ -297,7 +299,7 @@ L47EF lda XDOS.FCBs+FCB.EOF,y ldy #$04 ldx #$02 -L47FD lda (ZP.A3L),y position mark to new eof +L47FD lda (ZP.A3L),y position mark to new eof sta tposll,x dey dex @@ -314,7 +316,7 @@ L4808 lda oldeof,x see if eof moved backwards so blocks bpl L4808 all 3 bytes eofset ldy #$04 - ldx fcbptr place new end of file into fcb + ldx XDOS.FCBPtr place new end of file into fcb inx inx @@ -325,18 +327,18 @@ L481C lda (ZP.A3L),y cpy #$02 all 3 bytes moved ? bcs L481C no. - jmp fcbused mark fcb as dirty. + jmp XDOS.SetFCB.DIRTY mark fcb as dirty. -purge jsr flush1 make sure file is current +purge jsr XDOS.FlushOne make sure file is current bcs L47CD - ldx ZP.DataPtr+1 pointer to index block + ldx ZP.DataPtr+1 pointer to index block inx inx stx zpt+1 (zero page conflict with dir buf ptr) ldx ZP.DataPtr stx zpt - ldy fcbptr check if eof < mark + ldy XDOS.FCBPtr check if eof < mark iny iny ldx #$02 @@ -351,20 +353,20 @@ L4840 lda XDOS.FCBs+FCB.MARK,y dex bpl L4840 compare all 3 bytes -L484E ldy fcbptr +L484E ldy XDOS.FCBPtr ldx #$00 L4853 lda tposll,x fake position, correct position will - sta XDOS.FCBs+FCB.MARK,y be made below... + sta XDOS.FCBs+FCB.MARK,y be made below... iny inx cpx #$03 move all 3 bytes bne L4853 -L485F jsr tkfrecnt force free block count before releasing +L485F jsr XDOS.GetFreeCntVCBX force free block count before releasing lda tposll blocks. prepare for purge of excess... sta dseed all blocks and bytes beyond new eof - lda tposlh must be zero'd + lda tposlh must be zero'd sta dsap and #$01 sta dseed+1 @@ -392,7 +394,7 @@ L485F jsr tkfrecnt force free block count before releasing sta dsap L489F sta dseed+1 -L48A2 ldy fcbptr also must pass file's 1st block address. +L48A2 ldy XDOS.FCBPtr also must pass file's 1st block address. lda XDOS.FCBs+FCB.1stBLK,y sta firstbl lda XDOS.FCBs+FCB.1stBLK+1,y @@ -404,13 +406,13 @@ L48A2 ldy fcbptr also must pass file's 1st block address. pha is cleaned up. sec - ldy fcbptr + ldy XDOS.FCBPtr ldx #$ff L48C2 inx lda firstbl,x - sta XDOS.FCBs+FCB.1stBLK,y move in possible new first file block - lda XDOS.FCBs+FCB.UBLK,y address. adjust usage count also + sta XDOS.FCBs+FCB.1stBLK,y move in possible new first file block + lda XDOS.FCBs+FCB.UBLK,y address. adjust usage count also sbc deblock,x sta XDOS.FCBs+FCB.UBLK,y iny @@ -421,14 +423,14 @@ L48C2 inx jsr XDOS.SetFCBSType jsr XDOS.ClrFCBStatus make it look as though position has - jsr dvcbrev nothing allocated, update total blocks - ldy fcbptr in fcb and correct position. + jsr XDOS.SetVCB.FBLK nothing allocated, update total blocks + ldy XDOS.FCBPtr in fcb and correct position. iny iny ldx #2 -L48F2 lda XDOS.FCBs+FCB.MARK,y tell 'rdposn' to go to correct +L48F2 lda XDOS.FCBs+FCB.MARK,y tell 'rdposn' to go to correct sta tposll,x eor #$80 position from incorrect place. sta XDOS.FCBs+FCB.MARK,y @@ -452,7 +454,7 @@ L48F2 lda XDOS.FCBs+FCB.MARK,y tell 'rdposn' to go to correct * then flush it. L490D jsr eofset go mark and update - jsr flush1 then go do the flush. + jsr XDOS.FlushOne then go do the flush. bcc L491C branch if no error. plx clean previous error off stack @@ -463,7 +465,7 @@ L491C pla report any errors that may have plp appeared. rts *-------------------------------------- -XDOS.GetEOF ldx fcbptr index to end of file mark +XDOS.GetEOF ldx XDOS.FCBPtr index to end of file mark ldy #$02 and index to user's call parameters @@ -479,12 +481,12 @@ L4924 lda XDOS.FCBs+FCB.EOF,x *-------------------------------------- XDOS.NewLine ldy #$02 adjust newline status for open file. - lda (ZP.A3L),y on or off ? - ldx fcbptr it will be 0 if off. + lda (ZP.A3L),y on or off ? + ldx XDOS.FCBPtr it will be 0 if off. sta XDOS.FCBs+FCB.NLMASK,x set new line mask iny - lda (ZP.A3L),y and move in 'new-line' byte + lda (ZP.A3L),y and move in 'new-line' byte sta XDOS.FCBs+FCB.NLBYTE,x clc no error possible @@ -497,23 +499,23 @@ XDOS.GetFileInfo jsr XDOS.GetFileInfoVol bcs .9 -.1 lda d_stor transfer bytes from internal order to +.1 lda XDOS.DE.Filename transfer bytes from internal order to lsr call spec via 'inftabl' translation lsr table but first change storage type to lsr external (low nibble) format. lsr - sta d_stor + sta XDOS.DE.Filename ldy #$11 index to last of user's spec table. .2 lda inftabl-3,y and #$7F strip bit used by setinfo tax - lda d_stor,x move directory info to call spec. table + lda XDOS.DE.Filename,x move directory info to call spec. table sta (ZP.A3L),y dey cpy #$03 - bcs .2 if all info bytes moved, retn carry clr + bcs .2 if all info bytes moved, retn carry clr * clc @@ -525,17 +527,17 @@ XDOS.SetFileInfo lda GP.BUBIT see if backup bit can be cleared eor #$20 - and d_attr + and XDOS.DE.Access and #$20 sta bkbitflg or preserve current... ldy #$0D init pointer to user supplied list. .1 ldx inftabl-3,y get index to corresponding 'd.' table. - bmi .2 branch if parameter can't be set. + bmi .2 branch if parameter can't be set. lda (ZP.A3L),y - sta d_stor,x + sta XDOS.DE.Filename,x .2 dey has user's request been satisfied ? cpy #$03 @@ -549,10 +551,10 @@ XDOS.SetFileInfo .3 rts .4 ldy #$0B - lda (ZP.A3L),y was clock null input ? + lda (ZP.A3L),y was clock null input ? bne XDOS.SetFileInfoEx.8 - jmp drevise update with clock also... + jmp XDOS.DE.Update update with clock also... *-------------------------------------- XDOS.SetFileInfoEx jsr XDOS.FindFile @@ -562,12 +564,12 @@ XDOS.SetFileInfoEx ldy #S.FIEX.BLKPTR+2-1+3 .2 lda (ZP.A3L),y - sta d_stor,x + sta XDOS.DE.Filename,x dey dex bpl .2 XDOS.SetFileInfoEx.8 - jmp drevise1 + jmp XDOS.DE.UpdateNoMTime *-------------------------------------- XDOS.GetFileInfoEx jsr XDOS.FindFile @@ -579,7 +581,7 @@ XDOS.GetFileInfoEx .1 ldx #S.FIEX.BLKPTR+2-1 ldy #S.FIEX.BLKPTR+2-1+3 -.2 lda d_stor,x +.2 lda XDOS.DE.Filename,x sta (ZP.A3L),y dey dex @@ -590,7 +592,7 @@ XDOS.GetFileInfoEx .DO ACL=1 -.3 lda h_acl,x +.3 lda XDOS.DH.ACL,x sta (ZP.A3L),y dey dex @@ -617,31 +619,31 @@ XDOS.GetFileInfoVol bne .9 if not, then error. lda #$F0 - sta d_stor for get info, report proper storage type + sta XDOS.DE.Filename for get info, report proper storage type stz reql force a count of free blocks. stz reqh ldx XDOS.VCBPtr - jsr tkfrecnt get a fresh count of free blocks on + jsr XDOS.GetFreeCntVCBX get a fresh count of free blocks on - ldx XDOS.VCBPtr this volume. + ldx XDOS.VCBPtr this volume. lda XDOS.VCBs+VCB.FBLK+1,x return total blocks and total in use. sta reqh 1st transfer 'free' blocks to zpage lda XDOS.VCBs+VCB.FBLK,x for later subtraction to determine sta reql the 'used' count. lda XDOS.VCBs+VCB.TBLK+1,x transfer to 'd.' table as aux id - sta d_auxid+1 (total block count is considered aux id + sta XDOS.DE.AuxType+1 (total block count is considered aux id pha for the volume) lda XDOS.VCBs+VCB.TBLK,x - sta d_auxid + sta XDOS.DE.AuxType sec subtract and report the number of sbc reql blocks 'in use' - sta d_usage + sta XDOS.DE.BlkUsed pla sbc reqh - sta d_usage+1 + sta XDOS.DE.BlkUsed+1 clc @@ -650,7 +652,7 @@ XDOS.GetFileInfoVol XDOS.ACL jsr XDOS.FindDirOrVol bcs .9 - jsr XDOS.ReadGBuf_d_frst + jsr XDOS.ReadGBufDEKeyPtr bcs .9 ldx #7 @@ -662,7 +664,7 @@ XDOS.ACL jsr XDOS.FindDirOrVol ldy #S.FIEX.ACL+7+3 .1 lda (ZP.A3L),y - sta XDOS.GBuf+$14,x + sta XDOS.GBuf+20,x dey dex bpl .1 @@ -675,7 +677,7 @@ XDOS.ACL jsr XDOS.FindDirOrVol .2 ldy #S.FIEX.ACL+7+3 -.3 lda XDOS.GBuf+$14,x +.3 lda XDOS.GBuf+20,x sta (ZP.A3L),y dey dex @@ -693,12 +695,12 @@ XDOS.Rename jsr XDOS.CheckPath look for source (original) file. XDOS.RenameVol jsr XDOS.GetRenPath syntax new name. bcs L49FD rename error. - ldy XDOS.PathBuf find out if only rootname for new name + ldy XDOS.PathBuf find out if only rootname for new name iny - lda XDOS.PathBuf,y must be $FF if volume name only. + lda XDOS.PathBuf,y must be $FF if volume name only. bne L4A72 if not single name - ldx XDOS.VCBPtr check for open files before changing. + ldx XDOS.VCBPtr check for open files before changing. lda XDOS.VCBs+VCB.OFCNT,x beq L49FF if volume not busy. @@ -713,9 +715,9 @@ L49FF ldy #0 get newname's length bcs .9 rename error. ldy #$00 - ldx XDOS.VCBPtr update vcb also. + ldx XDOS.VCBPtr update vcb also. -.3 lda XDOS.PathBuf,y move new name to vcb. +.3 lda XDOS.PathBuf,y move new name to vcb. beq .8 sta XDOS.VCBs,x @@ -727,10 +729,10 @@ L49FF ldy #0 get newname's length .9 rts *-------------------------------------- XDOS.RenameFileDir - jsr getnamptr set y = 1st char of path, x = 0. + jsr XDOS.GetNamPtr set y = 1st char of path, x = 0. -L4A21 lda XDOS.PathBuf,y move original name to XDOS.GBuf - sta XDOS.GBuf,x for later comparison to new name. +L4A21 lda XDOS.PathBuf,y move original name to XDOS.GBuf + sta XDOS.GBuf,x for later comparison to new name. bmi L4A2D if last character has been moved iny otherwise, get the next one. @@ -740,11 +742,11 @@ L4A21 lda XDOS.PathBuf,y move original name to XDOS.GBuf L4A2D jsr XDOS.GetRenPath get new name syntaxed. bcs L4A74 rename error. - jsr getnamptr set y = path, x = 0. + jsr XDOS.GetNamPtr set y = path, x = 0. - lda XDOS.PathBuf,y now compare new name with old name + lda XDOS.PathBuf,y now compare new name with old name -L4A38 cmp XDOS.GBuf,x to make sure they are in the same dir. +L4A38 cmp XDOS.GBuf,x to make sure they are in the same dir. php save result of comparison. and #$F0 was last char really a count ? bne L4A46 if not. @@ -757,18 +759,18 @@ L4A46 plp result of last comparison ? inx bump pointers. iny - lda XDOS.PathBuf,y was it the last character ? + lda XDOS.PathBuf,y was it the last character ? bne L4A38 if not. clc no operation, names were the same. rts L4A52 ldy rnptr index to last name in the chain. - lda XDOS.PathBuf,y get last name length. + lda XDOS.PathBuf,y get last name length. sec adc rnptr tay - lda XDOS.PathBuf,y this byte should be $00 ! + lda XDOS.PathBuf,y this byte should be $00 ! bne L4A72 if not, bad path error. ldx namptr index to last of original name @@ -776,7 +778,7 @@ L4A52 ldy rnptr index to last name in the chain. sec adc namptr tax - lda XDOS.GBuf,x this byte should also be $00. + lda XDOS.GBuf,x this byte should also be $00. beq L4A76 if so, continue processing. L4A72 lda #MLI.E.INVPATH bad pathname error. @@ -795,11 +797,11 @@ L4A76 jsr XDOS.CheckPath test for duplicate file name. jsr XDOS.FindFile get all the info on this file. bcs L4A74 rename error. - jsr tstopen is file in use ? + jsr XDOS.IsOpened is file in use ? lda #MLI.E.OPEN anticipate file busy error. bcs L4A74 error if in use. - lda d_attr test bit which allows rename. + lda XDOS.DE.Access test bit which allows rename. and #$40 bne L4A9D branch if ok to rename @@ -809,7 +811,7 @@ L4A98 lda #MLI.E.INCFF sec rts -L4A9D lda d_stor find out which storage type. +L4A9D lda XDOS.DE.Filename find out which storage type. and #$F0 strip off name length. cmp #$D0 is it a directory ? beq L4AAE then ok. @@ -821,52 +823,76 @@ L4AAE jsr XDOS.GetRenPath since both names go into the directory, bcs L4A74 syntax the new name to get the local ldy rnptr name address. y = index to local name - ldx XDOS.PathBuf,y length. adj y to last char of new name. + ldx XDOS.PathBuf,y length. adj y to last char of new name. tya adc XDOS.PathBuf,y tay -L4ABE lda XDOS.PathBuf,y move local name to dir entry workspace. - sta d_stor,x +L4ABE lda XDOS.PathBuf,y move local name to dir entry workspace. + sta XDOS.DE.Filename,x dey dex bne L4ABE - lda d_stor preserve file storage type. + lda XDOS.DE.Filename preserve file storage type. and #$F0 strip off old name length. tax - ora XDOS.PathBuf,y add in new name's length. - sta d_stor + ora XDOS.PathBuf,y add in new name's length. + sta XDOS.DE.Filename cpx #$D0 that file must be changed also. bne L4AF0 branch if not directory type. - jsr XDOS.ReadGBuf_d_frst + jsr XDOS.ReadGBufDEKeyPtr bcs L4A74 errors. ldy rnptr change the header's name to match the - lda XDOS.PathBuf,y owner's new name. get local name length. + lda XDOS.PathBuf,y owner's new name. get local name length. ora #$E0 assume it's a header. jsr XDOS.UpdateHdr bcs L4A74 -L4AF0 jmp drevise1 end by updating all path directories. +L4AF0 jmp XDOS.DE.UpdateNoMTime end by updating all path directories. +*-------------------------------------- +XDOS.GetNamPtr ldy #$00 return pointer to 1st name of path. + bit prfxflg is this a prefixed name ? + bmi .1 branch if not. + + ldy GP.NEWPFXPTR + +.1 ldx #$00 + + rts +*-------------------------------------- +XDOS.UpdateHdr ldx #$00 + +.1 sta XDOS.GBuf+4,x + inx + iny + lda XDOS.PathBuf,y + bne .1 + + .DO LOWERCASE=1 + jmp XDOS.WriteGBufDir + .ELSE + jmp XDOS.WriteGBuf write changed header block. + .FIN *-------------------------------------- XDOS.Destroy jsr XDOS.FindFile look for file to be destroyed. - bcs L4B66 if error. + bcs L4B67 if error. - jsr tstopen is it open ? + jsr XDOS.IsOpened is it open ? lda totent bne L4B64 error if open. stz reql force proper free count in volume. - stz reqh (no disk access occurs if already - jsr tstfrblk proper) + stz reqh (no disk access occurs if already proper) + jsr XDOS.CheckFree bcc L4B39 no errors. cmp #MLI.E.VOLFULL was error a full disk ? bne L4B66 no, report error. -L4B39 lda d_attr make sure ok to destroy file. +L4B39 lda XDOS.DE.Access make sure ok to destroy file. * and #$80 * bne L4B45 bmi L4B45 @@ -876,23 +902,26 @@ L4B39 lda d_attr make sure ok to destroy file. L4B45 lda GP.DEVNUM last device used. jsr XDOS.TestWPA test for write protected hardware - bcs L4B66 before going thru deallocation. + bcs L4B67 before going thru deallocation. - lda d_frst 'detree' needs first block address + lda XDOS.DE.KeyPtr 'detree' needs first block address sta firstbl - lda d_frst+1 + lda XDOS.DE.KeyPtr+1 sta firstbh - lda d_stor find out which storage type. + lda XDOS.DE.Filename find out which storage type. and #$F0 strip off name length. cmp #$40 is it a seed, sapling or tree ? - bcc L4B68 branch if it is. - bra L4BCF otherwise, test for directory destroy. + bcc XDOS.DestroyFile branch if it is. + bra XDOS.DestroyDir otherwise, test for directory destroy. L4B64 lda #MLI.E.OPEN file busy error. -L4B66 sec can't be destroyed - rts -L4B68 sta stortyp destroy a tree file. save storage type. +L4B66 sec can't be destroyed + +L4B67 rts +*-------------------------------------- +XDOS.DestroyFile + sta stortyp destroy a tree file. save storage type. ldx #$05 @@ -917,16 +946,12 @@ L4B85 ldx firstbh jsr XDOS.FlushBM L4B93 pha save possible error code. - lda #$00 update directory to free entry space. - sta d_stor - cmp h_fcnt file entry wrap ? - bne L4BA1 branch if no carry adjustment. + stz XDOS.DE.Filename update directory to free entry space. - dec h_fcnt+1 take carry from hi byte of file entries. + jsr XDOS.DH.DecFileCnt 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 drevise error, if any) and update dir last. + jsr XDOS.SetVCB.FBLK go update block count in vcb (ignore + jsr XDOS.DE.Update error, if any) and update dir last. tax save possible new error code, pla restore possible old error code. bcc L4BAF branch if last call succeeded. @@ -934,37 +959,23 @@ L4BA1 dec h_fcnt mark header with one less file. L4BAF cmp #$01 adjust carry accordingly rts - -dvcbrev ldx XDOS.VCBPtr update block free count in vcb. point to vcb of correct device. - lda deblock get # of blocks recently freed. - adc XDOS.VCBs+VCB.FBLK,x - sta XDOS.VCBs+VCB.FBLK,x update current free block count. - lda deblock+1 - adc XDOS.VCBs+VCB.FBLK+1,x - sta XDOS.VCBs+VCB.FBLK+1,x - - stz XDOS.VCBs+VCB.BMAPIDX,x force re-scan from 1st bitmap - -* lda #0 ????? - - rts - +*-------------------------------------- L4BCD bcc L4B85 branch widened (always taken) -L4BCF cmp #$D0 is this a directory file ? +XDOS.DestroyDir cmp #$D0 is this a directory file ? bne L4C1B no, file incompatible. jsr XDOS.GetBM make sure a buffer available for bitmap bcs L4C1A if error. - jsr XDOS.ReadGBuf_d_frst read 1st block of directory into XDOS.GBuf + jsr XDOS.ReadGBufDEKeyPtr read 1st block of directory into XDOS.GBuf bcs L4C1A - lda XDOS.GBuf+37 do any files exist in this directory ? + lda XDOS.GBuf+37 do any files exist in this directory ? ora XDOS.GBuf+38 bne L4C1Abis if so, access error. -L4BF6 sta XDOS.GBuf+4 make it an invalid subdirectory +L4BF6 sta XDOS.GBuf+4 make it an invalid subdirectory .DO LOWERCASE=1 jsr XDOS.WriteGBufDir .ELSE @@ -972,9 +983,9 @@ L4BF6 sta XDOS.GBuf+4 make it an invalid subdirectory .FIN bcs L4C1A -L4BFE lda XDOS.GBuf+2 get forward link. +L4BFE lda XDOS.GBuf+2 get forward link. cmp #$01 test for null block into carry. - ldx XDOS.GBuf+3 get the rest of the block address. + ldx XDOS.GBuf+3 get the rest of the block address. bne L4C0A branch if not null. bcc L4BCD was the low part null as well ? @@ -992,11 +1003,12 @@ L4C1Abis lda #MLI.E.LOCKED access error. .HS 2C BIT ABS L4C1B lda #MLI.E.INCFF file incompatible jsr GP.SYSERR - -fcbused pha mark fcb as dirty so the directory will be flushed on 'flush'. +*-------------------------------------- +XDOS.SetFCB.DIRTY + pha mark fcb as dirty so the directory will be flushed on 'flush'. phy save regs. - ldy fcbptr + ldy XDOS.FCBPtr lda #$80 mark fcb as dirty. sta XDOS.FCBs+FCB.DIRTY,y save it back @@ -1005,27 +1017,18 @@ fcbused pha mark fcb as dirty so the directory will be flushed on 'flush pla rts *-------------------------------------- -XDOS.UpdateHdr ldx #$00 +XDOS.SetVCB.FBLK + ldx XDOS.VCBPtr update block free count in vcb. point to vcb of correct device. + lda deblock get # of blocks recently freed. + adc XDOS.VCBs+VCB.FBLK,x + sta XDOS.VCBs+VCB.FBLK,x update current free block count. + lda deblock+1 + adc XDOS.VCBs+VCB.FBLK+1,x + sta XDOS.VCBs+VCB.FBLK+1,x -.1 sta XDOS.GBuf+4,x - inx - iny - lda XDOS.PathBuf,y - bne .1 + stz XDOS.VCBs+VCB.BMAPIDX,x force re-scan from 1st bitmap - .DO LOWERCASE=1 - jmp XDOS.WriteGBufDir - .ELSE - jmp XDOS.WriteGBuf write changed header block. - .FIN -*-------------------------------------- -getnamptr ldy #$00 return pointer to 1st name of path. - bit prfxflg is this a prefixed name ? - bmi .1 branch if not. - - ldy GP.NEWPFXPTR - -.1 ldx #$00 +* lda #0 ????? rts *-------------------------------------- diff --git a/ProDOS.FX/ProDOS.S.XDOS.F.txt b/ProDOS.FX/ProDOS.S.XDOS.F.txt index 83a284cd..95df25f3 100644 --- a/ProDOS.FX/ProDOS.S.XDOS.F.txt +++ b/ProDOS.FX/ProDOS.S.XDOS.F.txt @@ -242,18 +242,21 @@ XDOS.DeallocBlkY lda ZP.BLKNUM+1 pha -.1 sty saptr save current index. - lda XDOS.GBuf,y get low address of block to deallocate. +.1 lda XDOS.GBuf,y get low address of block to deallocate. cmp #$01 test for null block into carry. ldx XDOS.GBuf+$100,y get remainder of block address. bne .2 branch if not null. bcc .3 was the low part null too ? -.2 jsr XDOS.DeallocAX free it up on volume bitmap. +.2 phy +* sty saptr save current index. + + jsr XDOS.DeallocAX free it up on volume bitmap. + ply bcs XDOS.PopBlkNumRTS return any error. - ldy saptr get index to sapling level index block. +* ldy saptr get index to sapling level index block. jsr XDOS.SwapGBUFY @@ -326,13 +329,13 @@ L4DFE dex set proper bits to 1 cpx ZP.DataPtr+1 set all 4 pages bne L4DFE - ldy fcbptr calculate buffer number + ldy XDOS.FCBPtr calculate buffer number lda XDOS.FCBs,y asl buffer number = (entnum) * 2. sta XDOS.FCBs+FCB.BUFID,y save it in fcb. tax use entnum * 2 as index to global lda ZP.DataPtr+1 buffer addr tables. get addr already - sta GB.BUFTABL-1,x validated as good. store hi addr + sta GP.BUFTABL-1,x validated as good. store hi addr clc (entnums start at 1, not 0) rts @@ -342,16 +345,16 @@ L4E1E lda #MLI.E.BADBUF buffer is in use or not legal rts *-------------------------------------- relbuffr tax index into global buffer table. - lda GB.BUFTABL-2,x - sta bufaddrl - lda GB.BUFTABL-1,x - sta bufaddrh + lda GP.BUFTABL-2,x + sta XDOS.BufAddr + lda GP.BUFTABL-1,x + sta XDOS.BufAddr+1 beq relbuffr.8 branch if unallocated buffer space. - stz GB.BUFTABL-1,x take address out of buffer list. - stz GB.BUFTABL-2,x (x was set up by getbufadr) + stz GP.BUFTABL-1,x take address out of buffer list. + stz GP.BUFTABL-2,x (x was set up by getbufadr) -freebuf ldx bufaddrh get hi buffer address +freebuf ldx XDOS.BufAddr+1 get hi buffer address inx add 4 pages to account for 1k space. inx inx @@ -359,13 +362,13 @@ freebuf ldx bufaddrh get hi buffer address .1 dex drop to next lower page. jsr XDOS.MemTablEOR - cpx bufaddrh all pages freed ? + cpx XDOS.BufAddr+1 all pages freed ? bne .1 no. relbuffr.8 clc no error. rts *-------------------------------------- -valdbuf lda usrbuf+1 high address of user's buffer +valdbuf lda ZP.UserBuf+1 high address of user's buffer cmp #$02 must be greater than page 2. bcc L4E1E report bad buffer @@ -377,9 +380,9 @@ valdbuf lda usrbuf+1 high address of user's buffer dex L4E76 clc - adc usrbuf calculate end of request address. + adc ZP.UserBuf calculate end of request address. txa do high address. - adc usrbuf+1 the final address + adc ZP.UserBuf+1 the final address tax must be less than $BFnn (globals) cpx #$BF bcs L4E1E report bad buffer. @@ -391,7 +394,7 @@ vldbuf1 dex check next lower page. and GP.MEMTABL,y if 0 then no conflict. bne L4E1E branch if conflict. - cpx usrbuf+1 was that the last (lowest) page ? + cpx ZP.UserBuf+1 was that the last (lowest) page ? bne vldbuf1 if not. clc all pages ok. @@ -421,10 +424,10 @@ XDOS.X2MemTablYA rts in a & y, pointer to memtabl in x. *-------------------------------------- XDOS.GetBuf ldy #$02 give user address of file buffer referenced by refnum. - lda bufaddrl + lda XDOS.BufAddr sta (ZP.A3L),y iny - lda bufaddrh + lda XDOS.BufAddr+1 sta (ZP.A3L),y clc no errors possible rts @@ -433,22 +436,22 @@ 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 + lda XDOS.BufAddr+1 + sta ZP.UserBuf+1 + lda XDOS.BufAddr + sta ZP.UserBuf jsr freebuf free address space of old buffer ldy #$00 ldx #$03 -.1 lda (usrbuf),y move all 4 pages of the buffer to +.1 lda (ZP.UserBuf),y move all 4 pages of the buffer to sta (ZP.DataPtr),y new location. iny bne .1 inc ZP.DataPtr+1 - inc usrbuf+1 + inc ZP.UserBuf+1 dex bpl .1 XDOS.SetBuf.CLCRTS @@ -654,7 +657,7 @@ XDOS.TBX.MemReset XDOS.TBX.EnumBlk jsr XDOS.ZPT.InitA - ldx h_maxent + ldx XDOS.DH.EPB lda (zpt) cmp #$E0 @@ -664,22 +667,23 @@ XDOS.TBX.EnumBlk ldx #3 .1 lda (zpt),y - sta h_entln,x + sta XDOS.DH.EL,x dey dex bpl .1 jsr XDOS.ZPT.Next skip header - ldx h_maxent + ldx XDOS.DH.EPB dex skip header .2 stx cntent XDOS.TBX.CheckFCnt - lda h_fcnt - ora h_fcnt+1 + lda XDOS.DH.FileCnt + ora XDOS.DH.FileCnt+1 beq XDOS.TBX.SECRTS + clc rts *-------------------------------------- @@ -716,12 +720,7 @@ XDOS.TBX.EnumNext pha jsr XDOS.ZPT.Next - lda h_fcnt+1 - bne .3 - - dec h_fcnt+1 - -.3 dec h_fcnt + jsr XDOS.DH.DecFileCnt pla * clc @@ -782,7 +781,7 @@ XDOS.ZPT.Unpack ldy #$1D MIN_VERSION .6 rts *-------------------------------------- -XDOS.ZPT.Next lda h_entln +XDOS.ZPT.Next lda XDOS.DH.EL XDOS.ZPT.NextA clc adc zpt @@ -794,6 +793,16 @@ XDOS.ZPT.NextA clc .8 rts *-------------------------------------- +XDOS.DH.DecFileCnt + lda XDOS.DH.FileCnt + bne .1 + + dec XDOS.DH.FileCnt+1 + +.1 dec XDOS.DH.FileCnt + + rts +*-------------------------------------- * data tables *-------------------------------------- XDOS.CmdNums .HS D3D4D5D6 table of valid mli command numbers. @@ -870,63 +879,58 @@ deathmsg.LEN .EQ *-deathmsg *-------------------------------------- XDOS.DATA .DUMMY *-------------------------------------- -own_blk .HS 0000 -own_ent .HS 00 -own_len .HS 00 +XDOS.OH.Blk .HS 0000 +XDOS.OH.EIB .HS 00 +XDOS.OH.EL .HS 00 *-------------------------------------- .DO ACL=1 -h_acl .BS 8 +XDOS.DH.ACL .BS 8 5700 UID GID MOD .FIN -h_credt .HS 0000 directory creation date - .HS 0000 directory creation time - .HS 00 version under which this dir created - .HS 00 earliest version that it's compatible -h_attr .HS 00 attributes (protect bit, etc.) -h_entln .HS 00 length of each entry in this directory -h_maxent .HS 00 maximum number of entries per block -h_fcnt .HS 0000 current # of files in this directory -h_bmap .HS 0000 address of first allocation bitmap -h_tblk .HS 0000 total number of blocks on this unit +XDOS.DH.CTime .HS 00000000 directory creation time + .HS 0000 Version/MVersion +XDOS.DH.Access .HS 00 attributes (protect bit, etc.) +XDOS.DH.EL .HS 00 length of each entry in this directory +XDOS.DH.EPB .HS 00 maximum number of entries per block +XDOS.DH.FileCnt .HS 0000 current # of files in this directory +XDOS.DH.BMPtr .HS 0000 address of first allocation bitmap +XDOS.DH.BlkCnt .HS 0000 total number of blocks on this unit *-------------------------------------- -d_dev .HS 00 device number of this directory entry -d_head .HS 0000 address of directory header -d_entblk .HS 0000 address of block which contains entry -d_entnum .HS 00 entry number within block +XDOS.DE.DevID .HS 00 device number of this directory entry +XDOS.DE.DirHBlk .HS 0000 address of directory header +XDOS.DE.DirEBlk .HS 0000 address of block which contains entry +XDOS.DE.DirEIB .HS 00 entry number within block *-------------------------------------- -d_stor .BS 16 file name -d_filid .HS 00 user's identification byte -d_frst .HS 0000 first block of file -d_usage .HS 0000 # of blocks allocated to this file -d_eof .HS 000000 current end of file marker -d_credt .HS 0000 file creation date - .HS 0000 file creation time -d_sosver .HS 00 sos version that created this file -d_comp .HS 00 backward version compatibility -d_attr .HS 00 attributes (protect, r/w, enable, etc.) -d_auxid .HS 0000 user auxilliary identification -d_moddt .HS 0000 file's last modification date - .HS 0000 file's last modification time -d_dhdr .HS 0000 file directory header block address +XDOS.DE.Filename .BS 16 +XDOS.DE.Type .HS 00 +XDOS.DE.KeyPtr .HS 0000 first block of file +XDOS.DE.BlkUsed .HS 0000 # of blocks allocated to this file +XDOS.DE.EOF .HS 000000 current end of file marker +XDOS.DE.CTime .HS 00000000 file creation time +XDOS.DE.Version .HS 00 version that created this file +XDOS.DE.MVersion .HS 00 +XDOS.DE.Access .HS 00 attributes (protect, r/w, enable, etc.) +XDOS.DE.AuxType .HS 0000 user auxilliary identification +XDOS.DE.MTime .HS 00000000 file's last modification time +XDOS.DE.BlkPtr .HS 0000 file directory header block address *-------------------------------------- scrtch .HS 00000000 scratch area for allocation address conversion. oldeof .HS 000000 temp used in r/w oldmark .HS 000000 *xvcbptr .HS 00 used in 'cmpvcb' as a temp *XDOS.VCBPtr .HS 00 -fcbptr .HS 00 +XDOS.FCBPtr .HS 00 fcbflg .HS 00 reql .HS 00 reqh .HS 00 levels .HS 00 totent .HS 00 -entcntl .HS 00 -entcnth .HS 00 +XDOS.FileCnt .HS 0000 cntent .HS 00 nofree .HS 00 *bmcnt .HS 00 -saptr .HS 00 +*saptr .HS 00 pathcnt .HS 00 -p_dev .HS 00 +*p_dev .HS 00 p_blok .HS 0000 *bmptr .HS 00 *basval .HS 00 @@ -934,17 +938,21 @@ half .HS 00 * bitmap info tables -bmastat .HS 00 -bmadev .HS 00 -bmadadr .HS 0000 -bmacmap .HS 00 +XDOS.BM.Status .HS 00 +XDOS.BM.DevID .HS 00 +XDOS.BM.BlkNum .HS 0000 +XDOS.BM.Idx .HS 00 + tposll .HS 00 tposlh .HS 00 tposhi .HS 00 + rwreql .HS 00 rwreqh .HS 00 + nlchar .HS 00 nlmask .HS 00 + ioaccess .HS 00 has a call been made to disk device handler ? cmdtemp .HS 00 bkbitflg .HS 00 used to set or clear backup bit @@ -963,10 +971,12 @@ cferr .HS 00 firstbl .HS 00 firstbh .HS 00 stortyp .HS 00 +*-------------------------------------- deblock .HS 0000 dtree .HS 00 dsap .HS 00 dseed .HS 0000 +*-------------------------------------- topdest .HS 00 dtmpx .HS 00 loklst .EQ * look list of recognized device numbers @@ -974,8 +984,7 @@ dealbufl .HS 0000000000000000 dealbufh .HS 0000000000000000 cbytes .HS 0000 .HS 00 cbytes+2 must = 0 -bufaddrl .HS 00 -bufaddrh .HS 00 +XDOS.BufAddr .HS 0000 delflag .HS 00 used by 'detree' to know if called from delete (destroy). *-------------------------------------- * variables used by SP remap & XRW Disk ][ to store last track used diff --git a/SYS/KERNEL.S.FS.txt b/SYS/KERNEL.S.FS.txt index 6978fd19..c5e4b895 100644 --- a/SYS/KERNEL.S.FS.txt +++ b/SYS/KERNEL.S.FS.txt @@ -366,7 +366,7 @@ FS.GFI.Src .DA #S.FI.T,#S.FI.AUXTYPE,#S.FI.AUXTYPE+1 .DA #S.FI.UBLKS,#S.FI.UBLKS+1 FS.GFI.Cnt .EQ *-FS.GFI.Src *-------------------------------------- -FS.DirEnt.Src .DA #S.FIEX.T,#S.FIEX.AUXTYPE,#S.FIEX.AUXTYPE+1 +FS.DirEnt.Src .DA #S.FIEX.TYPE,#S.FIEX.AUXTYPE,#S.FIEX.AUXTYPE+1 .DA #S.FIEX.BLKUSED,#S.FIEX.BLKUSED+1 .DA #S.FIEX.EOF,#S.FIEX.EOF+1,#S.FIEX.EOF+2 FS.DirEnt.Cnt .EQ *-FS.DirEnt.Src diff --git a/SYS/KERNEL.S.INIT.txt b/SYS/KERNEL.S.INIT.txt index ad2c9b22..394909c9 100644 --- a/SYS/KERNEL.S.INIT.txt +++ b/SYS/KERNEL.S.INIT.txt @@ -88,10 +88,12 @@ Kernel.Init2 sei .4 sta IO.CLRWRITEAUX - .ELSE + .FIN + .DO K8M=0 + sta IO.SETALTZP - + .FIN lda IO.RRAMWRAMBNK2 @@ -117,7 +119,12 @@ Kernel.Init2 sei lda IO.RROMBNK1 + .DO K8M=0 + sta IO.CLRALTZP + + .FIN + cli jsr KConfigLoad @@ -1411,8 +1418,7 @@ I.ENV.ROOT .AZ "ROOT" I.ENV.PATH .AZ "PATH=${BOOT}sbin/:${BOOT}bin/" I.ENV.LIB .AZ "LIB=${BOOT}lib/" I.ENV.DRV .AZ "DRV=${BOOT}drv/" -*SBININITD .AZ "${ROOT}sbin/initd" -SBININITD .AZ "/A2OSX.BUILD/sbin/initd" +SBININITD .AZ "${ROOT}sbin/initd" .DA #0 end of ARGV for ExecV *-------------------------------------- pMLIGFIEX .DA #2