Kernel 0.94

This commit is contained in:
Rémy GIBERT 2020-05-25 15:58:59 +02:00
parent e92224f139
commit 9d007ebf8e
16 changed files with 202 additions and 181 deletions

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

View File

@ -5,12 +5,12 @@ NEW
.OR $2000
.TF drv/uthernet.drv
*--------------------------------------
.INB INC/MACROS.I
.INB INC/A2OSX.I
.INB INC/MLI.E.I
.INB INC/NIC.I
.INB INC/NIC.8900A.I
.INB INC/ETH.I
.INB inc/macros.i
.INB inc/a2osx.i
.INB inc/mli.e.i
.INB inc/nic.i
.INB inc/nic.8900a.i
.INB inc/eth.i
*--------------------------------------
.DUMMY
.OR ZPBIN
@ -505,5 +505,5 @@ DCB .DA #S.DCB.T.NIC
*--------------------------------------
DRV.END
MAN
SAVE USR/SRC/DRV/UTHERNET.DRV.S
SAVE usr/src/drv/uthernet.drv.s
ASM

View File

@ -34,7 +34,7 @@ MLI.E.INVPARAM .EQ $53 Invalid Parameter
MLI.E.VCBFULL .EQ $55 Too Many Volumes
MLI.E.BADBUF .EQ $56 Bad Buffer Address
MLI.E.DUPVOL .EQ $57 Duplicate Volume
* .EQ $5A File Structure Damaged
MLI.E.BADFS .EQ $5A File Structure Damaged
*--------------------------------------
MAN
SAVE INC/MLI.E.I

View File

@ -379,6 +379,7 @@ PutBytePtr2 sta (ZPPtr2)
.8 rts
*--------------------------------------
D2WriteTrackPtr2
php
sei
ldy #TrkWriter.Size
@ -395,7 +396,7 @@ D2WriteTrackPtr2
jsr $200
cli
plp
rts
*--------------------------------------
MAN

View File

@ -90,7 +90,8 @@ p8date .HS 0000 bits 15-9=yr, 8-5=mo, 4-0=day
p8time .HS 0000 bits 12-8=hr, 5-0=min, low-hi format
flevel .DA #0 current file level
bubit .DA #0 backup bit disable, setfileinfo only
spare1 .DA #0 used to save acc
*spare1 .DA #0 used to save acc
.DA #0
newpfxptr .DA #0 appletalk alternate prefix ptr
machidbyte .DA #0 machine ID byte
rommap .DA #0 slot ROM bit map
@ -122,7 +123,7 @@ GP.MLICONT sec
sta bnkbyt2
lda RRAMWRAMBNK1 force ram card on
lda RRAMWRAMBNK1 with write allowed
jmp XDOS.MLI
jmp XDOS
*--------------------------------------
*GP.IrqExit lda bankid determine state of ram card (ROM/RAM)
*irqxit0

View File

@ -1,12 +1,14 @@
NEW
AUTO 3,1
*--------------------------------------
XDOS.START
XDOS.MLI cld no decimal.
pla get processor status
sta spare1 save it temporarily
XDOS cld no decimal.
sty mliy save x and y
stx mlix
* pla get processor status
* sta spare1 save it temporarily
ply
pla find out the address of the caller
sta A3L
clc preserve the address of the call spec.
@ -16,8 +18,11 @@ XDOS.MLI cld no decimal.
sta A3L+1
adc #$00
sta mliretn+1
lda spare1
pha pull processor status
* lda spare1
* pha pull processor status
phy
plp to re-enable interrupts.
cld still no decimal
@ -255,6 +260,7 @@ XDOS.bfmgr lda XDOS.CmdFlags,x translate into command address.
sta H3274+1
lda cmdtable+1,x high byte
sta H3274+2
lda #$20 init backup bit flag
sta bkbitflg to say 'file modified'
bcc nopath
@ -272,6 +278,7 @@ nopreref asl cmdtemp check for necessity of time stamp
bcc H3274
jsr clockv date/time
H3274 jsr $FFFF SELF MODIFIED : execute command
bcc goodop
@ -602,7 +609,7 @@ online1 jsr fnddvcb see if it has already been logged in.
ldx #$00 read in root (volume) directory
lda #$02
jsr rdblk read it into general purpose buffer.
jsr XDOS.ReadGBufAX read it into general purpose buffer.
ldx vcbptr index to the vcb entry.
bcc volfound branch if read was ok.
@ -719,7 +726,7 @@ H352A lda bloknml preserve disk address of current (last)
sta gbuf+2 save block address in y,a to
sty gbuf+3 current directory.
jsr wrtgbuf update directory block with new link.
jsr XDOS.WriteGBuf update directory block with new link.
bcs H351D if error
ldx #$01
@ -738,12 +745,12 @@ clrdir sta gbuf+2,x
inx
bne clrdir
jsr wrtgbuf write prepared directory extension.
jsr XDOS.WriteGBuf write prepared directory extension.
bcs H351D if error
lda own_blk
ldx own_blk+1
jsr rdblk read in parent directory block
jsr XDOS.ReadGBufAX read in parent directory block
ldx own_ent and calc entry address.
lda /gbuf
sta zpt+1
@ -766,7 +773,7 @@ H3588 lda (zpt),y
eor #$18 done with usage/eof update?
bne H3588 branch if not.
jsr wrtgbuf go update parent.
jsr XDOS.WriteGBuf go update parent.
bcs crerr2
jmp XDOS.Create
@ -912,7 +919,7 @@ cralcblk jsr alc1blk get address of file's data block
sty d_frst+1
sta bloknml
sty bloknml+1
jsr wrtgbuf go write data block of file
jsr XDOS.WriteGBuf go write data block of file
bcs crerr3
inc h_fcnt add 1 to total # of files in this dir
@ -954,23 +961,24 @@ modtime lda p8date,x move last modification date/time
dex
bpl modtime
drevise1 lda d_attr mark entry as backupable
ora bkbitflg (bit 5 = backup needed)
sta d_attr
drevise1 lda bkbitflg (bit 5 = backup needed)
tsb d_attr mark entry as backupable
lda d_dev get device # of directory
sta devnum to be revised
lda d_entblk and address of direcotry block.
ldx d_entblk+1
jsr rdblk read block into general purpose buffer
jsr XDOS.ReadGBufAX read block into general purpose buffer
bcs crerr3
jsr entcalc fix up ptr to entry location within gbuf.
ldy h_entln now move 'd.' info to directory.
.1 lda d_stor-1,y
dey
.1 lda d_stor,y
sta (zpt),y
dey
bpl .1
lda d_head is the entry block same as
@ -981,12 +989,12 @@ drevise1 lda d_attr mark entry as backupable
cmp bloknml+1
beq uphead branch if they are the same block.
H36E0 jsr wrtgbuf go write updated directory block.
H36E0 jsr XDOS.WriteGBuf go write updated directory block.
bcs crerr3
lda d_head get address of header block and
ldx d_head+1
jsr rdblk go read in header block to modify.
jsr XDOS.ReadGBufAX go read in header block to modify.
bcs crerr3
uphead ldy #$01 update current # of files in this dir.
@ -998,7 +1006,7 @@ H36F2 lda h_fcnt,y
lda h_attr also update header's attributes.
sta gbuf+34
jsr wrtgbuf go write updated header
jsr XDOS.WriteGBuf go write updated header
bcs H375A
ripple lda gbuf+4 test for 'root' directory because
@ -1008,14 +1016,16 @@ ripple lda gbuf+4 test for 'root' directory because
lda gbuf+41 get entry #
sta d_entnum
lda gbuf+42 and the length of ertries in that dir
lda gbuf+42 and the length of entries in that dir
sta h_entln
lda gbuf+39 get addr of parent entry's dir block
ldx gbuf+40
jsr rdblk read it
jsr XDOS.ReadGBufAX read it
bcs H375A
jsr entcalc get indirect ptr to parent entry in gbuf
lda p8date don't touch mod
beq H373B if no clock...
@ -1028,7 +1038,7 @@ H3732 lda p8date,x
dex
bpl H3732
H373B jsr wrtgbuf write updated entry back to disk.
H373B jsr XDOS.WriteGBuf write updated entry back to disk.
bcs H375A if error.
ldy #$25 compare current block # to this
@ -1044,7 +1054,7 @@ H373B jsr wrtgbuf write updated entry back to disk.
H3751 lda (zpt),y not same so read in this dir's header.
sta bloknml+1
jsr rdgbuf
jsr XDOS.ReadGBuf
bcc ripple continue if read was good
H375A rts

View File

@ -86,7 +86,7 @@ L37EB sta entcntl keep a running count.
beq errdir then not all entries were acct'd for.
L37FC ldx gbuf+3 acc has value for block# (low).
jsr rdblk go read the next linked directory.
jsr XDOS.ReadGBufAX go read the next linked directory.
bcc L37C9 if no error.
rts return error in acc.
@ -132,7 +132,7 @@ namfound jsr nxtpname adj index to next name in path.
sta bloknml+1
sta d_head+1
jsr rdgbuf read subdirectory into gbuf.
jsr XDOS.ReadGBuf read subdirectory into gbuf.
bcs lookfil0.RTS if error.
lda gbuf+37 get the # of files contained in this
@ -400,7 +400,7 @@ L39AC tay if prefix then find ptr to prefixed
* verify volume name
L39C2 jsr rdgbuf read in directory (or prefix dir)
L39C2 jsr XDOS.ReadGBuf read in directory (or prefix dir)
bcs L39CC if error then look on other devices.
jsr XDOS.CheckVolName compare dir name with path name.
@ -448,7 +448,7 @@ L39FE sta devnum preserve device to be checked next.
L3A16 lda #$02 go read root dir into gbuf
ldx #$00
jsr rdblk
jsr XDOS.ReadGBufAX
bcs L39E2 ignore if unable to read.
jsr logvcb go log in volume name.
@ -619,24 +619,24 @@ L3ACE .DO LOWERCASE=1
lda bloknml+1
sta VCBs+VCB.ROOT+1,x
ldy #0
* ldy #0
.1 lda gbuf+39,y
sta VCBs+VCB.BMAP,x
iny
inx
cpy #4
bne .1
* lda gbuf+39,y save address of the 1st bitmap.
*.1 lda gbuf+39,y
* sta VCBs+VCB.BMAP,x
* lda gbuf+40
* sta VCBs+VCB.BMAP+1,x
* iny
* inx
* cpy #4
* bne .1
* lda gbuf+41 total # of blocks on this unit.
* sta VCBs+VCB.TBLK,x
* lda gbuf+42
* sta VCBs+VCB.TBLK+1,x
lda gbuf+39,y save address of the 1st bitmap.
sta VCBs+VCB.BMAP,x
lda gbuf+40
sta VCBs+VCB.BMAP+1,x
lda gbuf+41 total # of blocks on this unit.
sta VCBs+VCB.TBLK,x
lda gbuf+42
sta VCBs+VCB.TBLK+1,x
L3B04 clc indicate logged if possible
rts
@ -727,7 +727,7 @@ tkfrecnt jsr cntbms get # of bitmaps
lda VCBs+VCB.BMAP+1,x
sta bloknml+1
L3B81 jsr rdgbuf use general buffer for temp space to
L3B81 jsr XDOS.ReadGBuf use general buffer for temp space to
bcs L3BC1 count free blocks (bits).
jsr count

View File

@ -4,7 +4,7 @@ NEW
dealloc stx bmcnt high address of block.
pha save low address.
ldx vcbptr check that bitmap block address is
lda VCBs+VCB.TBLK+1,x valid given the total # of blocks
lda VCBs+VCB.TBLK+1,x valid given the total # of blocks
cmp bmcnt on the volume.
pla
bcc L3C8C branch if invalid
@ -64,7 +64,7 @@ L3C7D lda #$80 mark bitmap as modified
L3C8A clc
L3C8B rts
L3C8C lda #$5A bitmap block # impossible.
L3C8C lda #MLI.E.BADFS bitmap block # impossible.
sec bitmap disk address wrong
rts (maybe data masquerading as indx block)
*--------------------------------------
@ -146,18 +146,16 @@ L3CF7 lda #$80 indicate map is modified.
clc no errors.
rts
*--------------------------------------
nxtbmap ldy vcbptr inc to next bitmap, but 1st make sure there is another one.
lda VCBs+VCB.TBLK+1,y
nxtbmap ldx vcbptr inc to next bitmap, but 1st make sure there is another one.
lda VCBs+VCB.TBLK+1,x
lsr
lsr
lsr
lsr
cmp VCBs+VCB.BMAPIDX,y are there more maps ?
cmp VCBs+VCB.BMAPIDX,x are there more maps ?
beq L3D60 if no more to look at.
lda VCBs+VCB.BMAPIDX,y add 1 to current map
inc
sta VCBs+VCB.BMAPIDX,y
inc VCBs+VCB.BMAPIDX,x add 1 to current map
jsr upbmap
fndbmap ldy vcbptr
@ -202,18 +200,24 @@ upbmap clc
rts
*--------------------------------------
gtbmap sta bmadev read bitmap specified by dev and vcb.
ldy vcbptr get lowest map # with free blocks in it
lda VCBs+VCB.BMAPIDX,y
sta bmacmap associate offset with bitmap ctrl block.
clc add this # to the base address of
adc VCBs+VCB.BMAP,y 1st bitmap and save in bmadadr which
sta bmadadr is address of bitmap to be used.
lda VCBs+VCB.BMAP+1,y
adc #$00
sta bmadadr+1
lda #$01 read device command
L3D92 sta A4L
lda #$01 read device command
.HS 2C BIT ABS
wrtbmap lda #$02 write command.
sta A4L
lda devnum save current dev #
pha
lda bmadev get bitmap's dev #
@ -222,8 +226,10 @@ L3D92 sta A4L
sta bloknml
lda bmadadr+1
sta bloknml+1
lda bmbufhi+2 address of the buffer (low = 0)
jsr dobitmap
lda /bmbuf
* lda bmbufhi+2 address of the buffer (low = 0)
jsr XDOS.RWBlock
tax error code (if any).
pla restore current dev #
sta devnum
@ -231,39 +237,39 @@ L3D92 sta A4L
txa error code
L3DB6 rts
rdblk sta bloknml
*--------------------------------------
rdblk
XDOS.ReadGBufAX sta bloknml
stx bloknml+1
jsr rdgbuf
rts
wrtbmap lda #$02 write command.
bne L3D92 always.
wrtgbuf lda #$02 write command
rdgbuf
XDOS.ReadGBuf lda #$01 read command.
.HS 2C BIT ABS
wrtgbuf
XDOS.WriteGBuf lda #$02 write command
rdgbuf lda #$01 read command.
sta A4L pass to device handler.
lda /gbuf general buffer.
dobitmap php no interrupts
dobitmap
XDOS.RWBlock php no interrupts
sei
sta buf+1 buffer high.
stz buf buffer low (always on page boundary)
stz p8error clear global error code.
lda #$FF indicates reg call made to dev handler
sta ioaccess
lda devnum transfer dev # for dispatcher to
sta unitnum convert to unit #.
jsr dmgr call the driver.
bcs L3DE8 if error.
bcs .9 if error.
plp restore interrupts.
clc
rts
L3DE8 plp file i/o error. restore interrupts.
.9 plp file i/o error. restore interrupts.
sec
rts
*--------------------------------------
@ -281,7 +287,7 @@ XDOS.GetMark ldx fcbptr index to open fcb.
clc
rts
L3DFD lda #$4D invalid position
L3DFD lda #MLI.E.BEYEOF invalid position
sec
rts
*--------------------------------------
@ -555,10 +561,13 @@ rfcbidx lda #$01 prepare to read index block : read command
clc
L400C rts
L400D lda #$02 write command
wfcbfst jsr upbmap update the bitmap and write file's 1st block.
lda #$02 write command
.HS 2C skip next instruction
rfcbfst lda #$01 read command.
pha save the command
lda #$0C
ora fcbptr add offset to fcbptr
@ -573,8 +582,10 @@ dofileio sta A4L command
bne L4031
cmp #$00 are both bytes 0 ?
bne L4031 no, continue request
lda #$0C otherwise, allocation error.
jsr sysdeath doesn't return...
L4031 lda fcbbuf+1,y high address of disk block
sta bloknml+1
@ -603,9 +614,6 @@ L405E plp restore interrupts
sec
rts
wfcbfst jsr upbmap update the bitmap
bra L400D and write file's 1st block.
wfcbdat ldx #datptr point at memory address with x and
lda #$10 disk address with y.
ora fcbptr add offset to fcbptr

View File

@ -133,23 +133,22 @@ L4723 lda fcbbuf,y note: this code depends on the defined
bne L4723
sta devnum
lda d_head read the directory header for this file
ldx d_head+1
jsr rdblk into the general purpose buffer.
jsr XDOS.ReadGBufAX into the general purpose buffer.
bcs L46E6 if error.
jsr movhed0 move header info.
lda d_entblk get address of directory block that
ldy d_entblk+1 contains the file entry.
ldx d_entblk+1 contains the file entry.
cmp d_head test to see if it's the same block the
bne L474E header is in. branch if not.
bne .1 header is in. branch if not.
cpy d_head+1
cpx d_head+1
beq L4755 branch if header block = entry block
L474E sta bloknml
sty bloknml+1
jsr rdgbuf get block with file entry in general
.1 jsr XDOS.ReadGBufAX get block with file entry in general
L4755 jsr entcalc buffer. set up pointer to entry.
@ -607,12 +606,14 @@ L49FF ldy #0 get newname's length
ldy #$00
ldx vcbptr update vcb also.
.1 iny next character
.1 lda pathbuf,y move new name to vcb.
beq .8
sta VCBs,x
iny next character
inx
lda pathbuf-1,y move new name to vcb.
sta VCBs-1,x
bne .1
bra .1
.8
* clc no errors
.9 rts
*--------------------------------------
@ -735,7 +736,7 @@ L4ABE lda pathbuf,y move local name to dir entry workspace.
lda d_frst read in 1st header block of subdir
ldx d_frst+1
jsr rdblk
jsr XDOS.ReadGBufAX
bcs L4A74 errors.
ldy rnptr change the header's name to match the
@ -787,7 +788,7 @@ XDOS.UpdateHdr .DO LOWERCASE=1
eor #$20
bra .1
.8 jmp wrtgbuf write changed header block.
.8 jmp XDOS.WriteGBuf write changed header block.
.ELSE
@ -799,7 +800,7 @@ L4AF5 sta gbuf+4,x
lda pathbuf,y
bne L4AF5
jmp wrtgbuf write changed header block.
jmp XDOS.WriteGBuf write changed header block.
.FIN
*--------------------------------------
getnamptr ldy #$00 return pointer to 1st name of path.

View File

@ -19,6 +19,7 @@ XDOS.Destroy jsr findfile look for file to be destroyed.
L4B39 lda d_attr make sure ok to destroy file.
and #$80
bne L4B45 branch if ok to destroy.
lda #MLI.E.LOCKED access error
jsr GP.P8errv
@ -92,6 +93,9 @@ dvcbrev ldx vcbptr update block free count in vcb. point to vcb of correct
sta VCBs+VCB.FBLK+1,x
stz VCBs+VCB.BMAPIDX,x force re-scan from 1st bitmap
* lda #0 ?????
rts
L4BCD bcc L4B85 branch widened (always taken)
@ -103,23 +107,16 @@ L4BCF cmp #$D0 is this a directory file ?
bcs L4C1A if error.
lda d_frst read 1st block of directory into gbuf
sta bloknml
lda d_frst+1
sta bloknml+1
jsr rdgbuf
ldx d_frst+1
jsr XDOS.ReadGBufAX
bcs L4C1A
lda gbuf+37 do any files exist in this directory ?
bne L4BF1 if so, access error.
lda gbuf+38
beq L4BF6
L4BF1 lda #MLI.E.LOCKED access error.
jsr GP.P8errv
ora gbuf+38
bne L4C1Abis if so, access error.
L4BF6 sta gbuf+4 make it an invalid subdirectory
jsr wrtgbuf
jsr XDOS.WriteGBuf
bcs L4C1A
L4BFE lda gbuf+2 get forward link.
@ -133,11 +130,13 @@ L4C0A jsr dealloc free this block.
lda gbuf+2
ldx gbuf+3
jsr rdblk
jsr XDOS.ReadGBufAX
bcc L4BFE loop until all freed
L4C1A rts
L4C1Abis lda #MLI.E.LOCKED access error.
.HS 2C BIT ABS
L4C1B lda #MLI.E.INCFF file incompatible
jsr GP.P8errv
@ -152,7 +151,7 @@ fcbused pha mark fcb as dirty so the directory will be flushed on 'flush
tay
pla
rts
*--------------------------------------
* 'detree' deallocates blocks from tree files. it is assumed that the device has
* been pre-selected and the 'gbuf' may be used.
*
@ -172,7 +171,7 @@ fcbused pha mark fcb as dirty so the directory will be flushed on 'flush
*
* to trim a tree to a seed file, both dtree and dsap must be zero.
* to go from tree to sapling, dtree alone must be zero.
*--------------------------------------
detree lda stortyp which kind of tree ?
cmp #$20 is it a 'seed' ?
bcc L4C46 if yes.
@ -186,7 +185,7 @@ detree lda stortyp which kind of tree ?
lda #$0C block allocation error.
jsr sysdeath P8 system death vector
* seedling file type - make sure first desireable block is the only
* seedling file type - make sure first desirable block is the only
* block available in a seedling file.
L4C46 lda dsap
@ -195,7 +194,7 @@ L4C46 lda dsap
jmp seedel0
* sapling file type - make sure first desireable block is within the range of
* sapling file type - make sure first desirable block is within the range of
* blocks available in a sapling file
L4C51 lda dtree can't have any blocks in this range
@ -238,7 +237,9 @@ L4C8A stz dealbufl,x fill rest of dealc buffer with null addresses.
L4C93 dey decrement to prepare for next time.
sty topdest save index.
ldx #$07
L4C99 stx dtmpx save index to dealc buf.
lda dealbufl,x
sta bloknml
@ -247,13 +248,13 @@ L4C99 stx dtmpx save index to dealc buf.
lda dealbufh,x complete address with high byte,
sta bloknml+1
jsr rdgbuf read sapling level into gbuf.
jsr XDOS.ReadGBuf read sapling level into gbuf.
bcs L4CC2 return errors.
jsr dealblk go free all data indexes in this block
bcs L4CC2
jsr wrtgbuf write the flipped index block
jsr XDOS.WriteGBuf write the flipped index block
bcs L4CC2
ldx dtmpx restore index to dealc buff.
@ -269,20 +270,20 @@ L4CC3 ldy dtree deallocate all sapling blocks greater
jsr dalblk1 (master index in gbuf)
bcs L4CC2 if errors.
jsr wrtgbuf write updated master index back to disk.
jsr XDOS.WriteGBuf write updated master index back to disk.
bcs L4CC2
ldy dtree figure out if tree can become sapling.
beq L4CEB branch if it can.
lda gbuf,y otherwise, continue with partial.
sta bloknml deallocation of last sapling index.
lda gbuf,y otherwise, continue with partial, deallocation of last sapling index.
ora gbuf+$100,y is there such a sapling index block ?
beq L4CC2 all done if not.
lda gbuf+$100,y read in sapling level to be modified.
sta bloknml+1
jsr rdgbuf read highest sapling index into gbuf.
lda gbuf,y
ldx gbuf+$100,y read in sapling level to be modified.
jsr XDOS.ReadGBufAX read highest sapling index into gbuf.
bcc L4CF5
rts
@ -300,38 +301,38 @@ L4CF5 ldy dsap pointer to last of desirable indexes.
jsr dalblk1 deallocate all indexes above specified.
bcs L4CC2
jsr wrtgbuf write out the index block
jsr XDOS.WriteGBuf write out the index block
bcs L4CC2
L4D05 ldy dsap prepare to clean up last data block.
beq L4D1F branch if possibility of making a seed.
L4D0A lda gbuf,y fetch low order data block address.
sta bloknml
ora gbuf+$100,y is it a real block ?
beq L4CC2 if not, then done.
lda gbuf+$100,y
sta bloknml+1
jsr rdgbuf go read data block into gbuf.
lda gbuf,y
ldx gbuf+$100,y
jsr XDOS.ReadGBufAX go read data block into gbuf.
bcc L4D2E branch if good read
rts or return error.
L4D1E rts or return error.
L4D1F lda dtree are both tree and sap levels zero ?
bne L4D0A if not.
jsr shrink reduce this sap to a seed.
bcs L4D52 if error.
bcs L4D1E if error.
seedel0 jsr drdfrst go read data block.
bcs L4D52 if error.
bcs L4D1E if error.
L4D2E ldy dseed+1 check high byte for no deletion.
beq L4D39 branch if all of 2nd page to be deleted.
dey if dseed > $200 then all were done.
bne L4D52 branch if that is the case.
bne L4D1E branch if that is the case.
ldy dseed clear only bytes >= dseed.
@ -350,13 +351,13 @@ L4D49 sta gbuf,y
iny
bne L4D49
L4D4F jmp wrtgbuf update data block to disk.
L4D4F jmp XDOS.WriteGBuf update data block to disk.
L4D52 rts return error status.
drdfrst lda firstbl read specified 1st block into gbuf
ldx firstbh
jmp rdblk go read it
jmp XDOS.ReadGBufAX go read it
* beware that dealloc may bring in a new bitmap block and may destroy
* locations 46 and 47 which are used to point to the current index block.
@ -371,7 +372,7 @@ shrink ldx firstbh first deallocate top index block
sta bloknml set master of sapling
pla index block address.
sta bloknml+1
bcs L4D8D report errors.
bcs L4D1E report errors.
lda gbuf get # of new 1st block from old index.
sta firstbl
@ -383,9 +384,7 @@ shrink ldx firstbh first deallocate top index block
lda stortyp from tree to sapling,
sbc #$10 or from sapling to seed.
sta stortyp
jsr wrtgbuf write the (deallocated) old top index.
L4D8D rts return error status.
jmp XDOS.WriteGBuf write the (deallocated) old top index.
dealblk ldy #$00 start at beginning.
dalblk1 lda bloknml save disk address of gbuf's data.
@ -1031,7 +1030,7 @@ XDOS.FREE .EQ $FEFD-*-XDOS.DATA.LEN (2.0.3 = $0C)
cortdisp .EQ $FEFD
cortflag .EQ $FEFF cortland flag. 1 = Cortland system (must stay within page boundary)
*--------------------------------------
XDOS.LEN .EQ *-XDOS.START
XDOS.LEN .EQ *-XDOS
MAN
SAVE USR/SRC/PRODOS.FX/PRODOS.S.XDOS.F
LOAD USR/SRC/PRODOS.FX/PRODOS.S

View File

@ -73,17 +73,18 @@ L59BD jsr XRW.AllPhaseOff make sure all motor phases are off.
pha save sector # across call
jsr regrwts
pla
plx
bcs .3 if error
inc buf+1
txa
adc #$02
jsr regrwts get 2nd half of block
dec buf+1
.3 lda ibstat
rts
.3 rts
.9 lda #MLI.E.IO
sec
@ -220,9 +221,8 @@ L53D5 lda XRW.AddrField.S is this the right sector ?
L53E7 lda #$00
.HS D0 bne branch never taken (skip 1 byte)
hndlerr sec
sta ibstat error #
ldx A2L slot offset
lda IO.D2.DrvOff,x turn off
bit IO.D2.DrvOff,x turn off
rts
*--------------------------------------
L53F4 jsr XRW.Write
@ -940,8 +940,8 @@ XRW.AddrField.S .HS 00 AddrField Sector
XRW.AddrField.T .HS 00 AddrField Track
XRW.AddrField.V .HS 00 AddrField Volume
.HS 6C
* .HS FF
ibstat .HS 00
.HS FF
*ibstat .HS 00
.HS 707478
.HS FFFFFF
.HS 7C

View File

@ -139,14 +139,15 @@ prefixbuf .EQ $D742+125
fcbbuf .EQ $D800 fcb buffer
VCBs .EQ $D900
VCB.DEV .EQ 16
VCB.OFCNT .EQ 17
VCB.ROOT .EQ 18
VCB.BMAP .EQ 20
VCB.TBLK .EQ 22
VCB.FBLK .EQ 24
VCB.BMAPIDX .EQ 26
*VCB.OF .EQ 17
VCB.TBLK .EQ 18
VCB.FBLK .EQ 20
VCB.ROOT .EQ 22
VCB.BMAP .EQ 26
VCB.BMAPIDX .EQ 28
VCB.OFCNT .EQ 30
*
VCB .EQ 27
VCB .EQ 32
*--------------------------------------
bmbuf .EQ $DA00 512 byte bitmap buffer
gbuf .EQ $DC00 general purpose 512 byte block buffer
@ -175,38 +176,38 @@ X.Unpak.XatYA sty ZPOutBufPtr
.INB usr/src/shared/x.unpak.s
*--------------------------------------
PAKME.Table
PAKME.ILDR .DA ILDR
PAKME.GP .DA GP
PAKME.XRW .DA XRW
PAKME.XDOS .DA XDOS
PAKME.IRQ .DA IRQ
PAKME.RAM .DA RAM
PAKME.RAMX .DA RAMX
PAKME.NCLK .DA NCLK
PAKME.TCLK .DA TCLK
PAKME.CCLK .DA CCLK
PAKME.SEL1 .DA SEL1
PAKME.SEL2 .DA SEL2
PAKME.ILDR .DA ILDR.PAK
PAKME.GP .DA GP.PAK
PAKME.XRW .DA XRW.PAK
PAKME.XDOS .DA XDOS.PAK
PAKME.IRQ .DA IRQ.PAK
PAKME.RAM .DA RAM.PAK
PAKME.RAMX .DA RAMX.PAK
PAKME.NCLK .DA NCLK.PAK
PAKME.TCLK .DA TCLK.PAK
PAKME.CCLK .DA CCLK.PAK
PAKME.SEL1 .DA SEL1.PAK
PAKME.SEL2 .DA SEL2.PAK
ILDR .DA #0
ILDR.PAK .DA #0
.DA ILDR.LEN
.PH $800
.INB usr/src/prodos.fx/prodos.s.ildr
.EP
GP .DA #0
GP.PAK .DA #0
.DA GP.LEN
.PH $BF00
.INB usr/src/prodos.fx/prodos.s.gp
.EP
XRW .DA #0
XRW.PAK .DA #0
.DA XRW.LEN
.PH $D000
.INB usr/src/prodos.fx/prodos.s.xrw
.EP
XDOS .DA #0
XDOS.PAK .DA #0
.DA XDOS.LEN
.PH $DE00
.INB usr/src/prodos.fx/prodos.s.xdos.a
@ -217,49 +218,49 @@ XDOS .DA #0
.INB usr/src/prodos.fx/prodos.s.xdos.f
.EP
IRQ .DA #0
IRQ.PAK .DA #0
.DA IRQ.LEN
.PH $FF9B
.INB usr/src/prodos.fx/prodos.s.irq
.EP
RAM .DA #0
RAM.PAK .DA #0
.DA RAM.LEN
.PH $FF00
.INB usr/src/prodos.fx/prodos.s.ram
.EP
RAMX .DA #0
RAMX.PAK .DA #0
.DA RAMX.LEN
.PH $200
.INB usr/src/prodos.fx/prodos.s.ramx
.EP
NCLK .DA #0
NCLK.PAK .DA #0
.DA NCLK.LEN
.PH XDOS.ClockDrv
.INB usr/src/prodos.fx/prodos.s.nclk
.EP
TCLK .DA #0
TCLK.PAK .DA #0
.DA TCLK.LEN
.PH XDOS.ClockDrv
.INB usr/src/prodos.fx/prodos.s.tclk
.EP
CCLK .DA #0
CCLK.PAK .DA #0
.DA CCLK.LEN
.PH XDOS.ClockDrv
.INB usr/src/prodos.fx/prodos.s.cclk
.EP
SEL1 .DA #0
SEL1.PAK .DA #0
.DA SEL1.LEN
.PH $1000
.INB usr/src/prodos.fx/prodos.s.sel1
.EP
SEL2 .DA #0
SEL2.PAK .DA #0
.DA SEL2.LEN
.PH $1000
.INB usr/src/prodos.fx/prodos.s.sel2