Kernel 0.93+ ProDOS 2.0.3 src

This commit is contained in:
Rémy GIBERT 2019-09-16 22:50:08 +02:00
parent 7743abc5fc
commit 17d71f1040
14 changed files with 701 additions and 10125 deletions

Binary file not shown.

View File

@ -315,7 +315,7 @@ CS.END
OptionList .AS "AaVv"
OptionVars .DA #bAll,#bAll,#bVerbose,#bVerbose
*--------------------------------------
MSG.USAGE .AS "Usage : CMP File1 File2 [SKIP1 [SKIP1]]\r\n"
MSG.USAGE .AS "Usage : CMP File1 File2 [SKIP1 [SKIP2]]\r\n"
.AS " -A : Shows All differences\r\n"
.AZ " -V : Verbose Mode\r\n"
MSG.DIFF .AZ "%H%h:%h %h\r\n"

View File

@ -1,5 +1,6 @@
NEW
AUTO 3,1
*--------------------------------------
H2000 jmp prostart
jmp atalkset appletalk setup for network boot
jmp p16start GQuit setup for gs/os
@ -422,8 +423,8 @@ H2367 .DA #$01 relocation table. 1=move src to dst
.DA GP src
.HS 00 0=clear buffers $D700-$DDFF
.DA pathbuf
.DA xdosorg-pathbuf
.DA $D700 start
.DA $0700 len
.DA #$01
.DA $DE00 dst
@ -770,6 +771,7 @@ not128 lda lookptr+1
H2620 clc
rts
LDR.Test128.len .EQ *-LDR.Test128
*--------------------------------------
MAN
SAVE USR/SRC/PRODOS.203/PRODOS.S.LDR.A
LOAD USR/SRC/PRODOS.203/PRODOS.S

View File

@ -905,6 +905,44 @@ L2C4D lda 1,s
.BS $2C80-*
RAMDRV.Install ldy #$99 move $9A bytesfrom lcsrc to lcdest.
.1 lda RAM,y transfer main bank portion of driver
sta RAMDRV,y
dey
cpy #$FF
bne .1
ldx #RAMX set up to move aux portion of driver
stx A1L
dex
stx A2L
ldx /RAMX
stx A1L+1
inx
stx A2L+1
lda #RAMXDRV
sta A4L
lda /RAMXDRV RAMX to RAMXDRV
sta A4L+1
sec irection = to aux bank.
jsr auxmove move aux bank portion of driver.
lda #RAMDRV put driver address into
sta drivertbl2+6 slot 3, drive 2.
lda /RAMDRV
sta drivertbl2+7
inc numdevs count (-1) active devices
ldx numdevs
lda #$BF unit num of /RAM
sta devlist,x
rts end of obj ram_1
RAM_1_END .EQ * end of /RAM installer
.BS $2D00-* pad 0's to page boundary
MAN
SAVE USR/SRC/PRODOS.203/PRODOS.S.LDR.B
LOAD USR/SRC/PRODOS.203/PRODOS.S

View File

@ -1,48 +0,0 @@
NEW
AUTO 3,1
* object code = ram_1
*
* /RAM installer - transfer part of the driver to the aux bank
* and front part of the driver to the main bank (language card).
RAMDRV.Install ldy #$99 move $9A bytesfrom lcsrc to lcdest.
.1 lda RAM,y transfer main bank portion of driver
sta RAMDRV,y
dey
cpy #$FF
bne .1
ldx #RAMX set up to move aux portion of driver
stx A1L
dex
stx A2L
ldx /RAMX
stx A1L+1
inx
stx A2L+1
lda #RAMXDRV
sta A4L
lda /RAMXDRV RAMX to RAMXDRV
sta A4L+1
sec irection = to aux bank.
jsr auxmove move aux bank portion of driver.
lda #RAMDRV put driver address into
sta drivertbl2+6 slot 3, drive 2.
lda /RAMDRV
sta drivertbl2+7
inc numdevs count (-1) active devices
ldx numdevs
lda #$BF unit num of /RAM
sta devlist,x
rts end of obj ram_1
RAM_1_END .EQ * end of /RAM installer
.BS $2D00-* pad 0's to page boundary
*--------------------------------------
MAN
SAVE USR/SRC/PRODOS.203/PRODOS.S.RAMI
LOAD USR/SRC/PRODOS.203/PRODOS.S
ASM

View File

@ -3,10 +3,7 @@ NEW
* object code = mli_2
* xdos mli system call processor
ofsX .EQ *-xdosorg offset to xdos org
xdosmli .EQ *-ofsX xdos MLI in aux ram
xdosobj cld no decimal.
xdosmli cld no decimal.
pla get processor status
sta spare1 save it temporarily
sty mliy save x and y
@ -94,9 +91,9 @@ exitmli stz bubit clear backup bit
lda bnkbyt1 restore language card status
jmp HBFA0 and return.
nodevice .EQ *-ofsX
lda #$28 no device connected.
nodevice lda #$28 no device connected.
jsr p8errv P8 error vector.
scnerr lda #$01 no such command.
bne H30B0
scperr lda #$04 parameter count is invalid
@ -105,8 +102,7 @@ H30B0 jsr gosyserr
* ProDOS Device Manager
devmgr .EQ *-ofsX
ldy #$05
devmgr ldy #$05
php do not allow interrupts.
sei the call spec for devices must
H30B9 lda (A3L),y be passed to drivers in page zero:
@ -129,10 +125,8 @@ H30CC jsr vldbuf1 make sure user buffer is not
rts
dvmgrerr plp restore interrupt status
gosyserr .EQ *-ofsX
jsr p8errv P8 error vector
dmgr .EQ *-ofsX interrupts must always be off.
lda unitnum get device # and
gosyserr jsr p8errv P8 error vector
dmgr lda unitnum get device # and
and #$F0 strip misc lower nibble
sta unitnum then save it.
lsr use as index to device table
@ -143,13 +137,11 @@ dmgr .EQ *-ofsX interrupts must always be off.
sta goadr
lda drivertbl1+1,x
sta goadr+1
gocmd .EQ *-ofsX
jmp (goadr) goto driver (or error if no driver)
gocmd jmp (goadr) goto driver (or error if no driver)
* ProDOS interrupt manager
intmgr .EQ *-ofsX
sta A4L interrupt command
intmgr sta A4L interrupt command
lsr allocate interrupt or deallocate?
bcs dealcint branch if deallocate.
ldx #$03 test for a free interrupt space in tbl.
@ -189,8 +181,8 @@ dealcint ldy #$01 zero out interrupt vector
sta inttbl-1,x
clc
rts
irqrecev .EQ *-ofsX
lda accsav get acc from where old ROM put it.
irqrecev lda accsav get acc from where old ROM put it.
sta p8areg
stx p8xreg entry point on ram card interrupt
sty p8yreg
@ -260,37 +252,27 @@ H31C6 lda irqflag check for old roms.
ldy p8yreg restore registers.
ldx p8xreg
lda CLRC8ROM re-enable i/o card.
irqdev .EQ *-ofsX
lda $C100 Cn is self modifying.
irqdev lda $C100 Cn is self modifying.
lda irqdev+2 restore device id.
sta mslot slot being accessed.
H31DD jmp irqexit do necessary bank switches and return.
irqflag .EQ *-ofsX
.HS 00 0 = old roms. 1 = new roms.
irqcount .EQ *-ofsX
.HS 00 # of unclaimed interrupts.
svstack .EQ *-ofsX temporary save area from stack
irqflag .HS 00 0 = old roms. 1 = new roms.
irqcount .HS 00 # of unclaimed interrupts.
svstack .HS 0000000000000000
.HS 0000000000000000
.HS 0000000000000000
svzerop .EQ *-ofsX temporary save area for zero page
.HS 000000000000
goint1 .EQ *-ofsX
jmp (inttbl) interrupt routine 1
goint2 .EQ *-ofsX
jmp (inttbl+2) interrupt routine 2
goint3 .EQ *-ofsX
jmp (inttbl+4) interrupt routine 3
goint4 .EQ *-ofsX
jmp (inttbl+6) interrupt routine 4
syserr1 .EQ *-ofsX
sta p8error P8 error code
svzerop .HS 000000000000
goint1 jmp (inttbl) interrupt routine 1
goint2 jmp (inttbl+2) interrupt routine 2
goint3 jmp (inttbl+4) interrupt routine 3
goint4 jmp (inttbl+6) interrupt routine 4
syserr1 sta p8error P8 error code
plx
plx pop 1 level of return
sec
rts
sysdeath1 .EQ *-ofsX
tax death error code.
sysdeath1 tax death error code.
sta CLR80DISP disable 80 col hardware.
lda SETTEXT switch in text.
lda cortflag is this a Cortland?
@ -316,8 +298,7 @@ H323E bra H323E end of xdos mli
* ProDOS Block File Manager
bfmgr .EQ *-ofsX
lda disptch,x translate into command address.
bfmgr lda disptch,x translate into command address.
asl bit 7 indicates pathname to process
sta cmdtemp
and #$3F bit 6 is refnum, 5 is time to process
@ -343,15 +324,16 @@ H3274 jsr gocmd execute command
errorsys jsr p8errv P8 error vector
goodop rts
setpath .EQ *-ofsX
ldy #$01 index to pathname pointer
setpath ldy #$01 index to pathname pointer
lda (A3L),y low pointer address
sta zpt
iny
lda (A3L),y hi pointer address
sta zpt+1
synpath .EQ *-ofsX entry used by rename for 2nd pathname.
ldx #$00 x = index to pathbuf
* entry used by rename for 2nd pathname.
synpath ldx #$00 x = index to pathbuf
ldy #$00 y = index to input pathname.
stx prfxflg assume prefix is in use.
stx pathbuf mark pathbuf = nothing processed.
@ -428,8 +410,7 @@ H3323 rts
* set prefix command
setprefx .EQ *-ofsX
jsr setpath call is made to detect if a null path.
setprefx jsr setpath call is made to detect if a null path.
bcc H3333 path ok.
ldy pathbuf is it a null pathname?
bne pfxerr error if not
@ -473,9 +454,8 @@ pfxerr sec
* get prefix command
getprefx .EQ *-ofsX calc how big a buffer is needed.
clc get index to users pathname buffer
ldy #$01
getprefx clc calc how big a buffer is needed.
ldy #$01 get index to users pathname buffer
lda (A3L),y
sta usrbuf user buffer ptr
iny
@ -508,8 +488,8 @@ H33B3 inx
sta (usrbuf),y
gotprfx clc no error
rts
findfcb .EQ *-ofsX
ldy #$01 index to ref#
findfcb ldy #$01 index to ref#
lda (A3L),y is it a valid file# ?
beq badref must not be 0.
cmp #$09 must be 1 to 8 only.
@ -525,8 +505,8 @@ findfcb .EQ *-ofsX
pla restore ref# in acc
cmp fcbbuf,y
bne errnoref
fndfcbuf .EQ *-ofsX get page address of file buffer.
lda fcbbuf+11,y
fndfcbuf lda fcbbuf+11,y get page address of file buffer.
jsr getbufadr get file's address into bufaddrl,h
ldx bufaddrh (y=fcbptr preserved)
beq fcbdead fcb corrupted
@ -564,8 +544,7 @@ badref lda #$43 requested refnum is
* online command
online .EQ *-ofsX move user spec'd buffer ptr to usrbuf.
jsr mvdbufr figure out how big buffer has to be.
online jsr mvdbufr figure out how big buffer has to be.
stz cbytes set this for valdbuf routine.
stz cbytes+1
ldy #$01
@ -586,7 +565,7 @@ H3449 dey
bne H3449
sta namptr used as pointer to user buffer.
lda devnum get device # again.
bne H3474 branch if only 1 device to process.
bne online1 branch if only 1 device to process.
jsr mvdevnums get list of currently recognized dev's.
H3459 phx save index to last item on list
lda loklst,x
@ -602,8 +581,8 @@ H3459 phx save index to last item on list
lda #$00 no errors for multiple on-line
clc
onlinerr rts
online1 .EQ *-ofsX
H3474 jsr fnddvcb see if it has already been logged in.
online1 jsr fnddvcb see if it has already been logged in.
bcs olinerr1 branch if vcb is full.
ldx #$00 read in root (volume) directory
lda #$02
@ -654,8 +633,8 @@ H34D9 lda vcbbuf,x move name to user's buffer
iny
dec namcnt
bpl H34D9
svdevn .EQ *-ofsX
ldy namptr index to 1st byte of this entry.
svdevn ldy namptr index to 1st byte of this entry.
lda devnum upper nibble = device# and
ora (usrbuf),y lower nibble = name length.
sta (usrbuf),y

View File

@ -3,8 +3,7 @@ NEW
* create file
create .EQ *-ofsX
jsr lookfile check for duplicate, get free entry
create jsr lookfile check for duplicate, get free entry
bcs tstfnf error code may be 'file not found'
lda #$47 name already exists
crerr1 sec
@ -26,6 +25,7 @@ tstdspc lda devnum make sure destination device
ctyperr lda #$4B filetype error
sec
H351D rts
xtndir lda own_blk before extending directory,
ora own_blk+1 make sure it's a subdirectory.
bne H352A
@ -88,8 +88,8 @@ H3588 lda (zpt),y
bcs crerr2
jmp create
crerr2 rts return and report errors
creat1 .EQ *-ofsX
ldx #$00 zero out gbuf
creat1 ldx #$00 zero out gbuf
H35A0 stz gbuf,x
stz gbuf+$100,x and data block of file.
inx
@ -188,8 +188,8 @@ cralcblk jsr alc1blk get address of file's data block
credone jsr drevise go revise directories with new file
bcs crerr3
jmp upbmap lastly, update volume bitmap
entcalc .EQ *-ofsX
lda /gbuf set high address of dir entry
entcalc lda /gbuf set high address of dir entry
sta zpt+1 index pointer.
lda #$04 calc address of entry based
ldx d_entnum on the entry #.
@ -202,16 +202,16 @@ H368A dex addr = gbuf + ((d_entnum-1) * h_entln)
bcs H3689 always.
H3696 sta zpt newly calculated low address.
crerr3 rts carry set if error.
drevise .EQ *-ofsX
lda p8date
beq H36A9 if no clock, then don't mod date/time.
drevise lda p8date
beq drevise1 if no clock, then don't mod date/time.
ldx #$03
modtime lda p8date,x move last modification date/time
sta d_moddt,x to entry being updated.
dex
bpl modtime
drevise1 .EQ *-ofsX
H36A9 lda d_attr mark entry as backupable
drevise1 lda d_attr mark entry as backupable
ora bkbitflg (bit 5 = backup needed)
sta d_attr
lda d_dev get device # of directory
@ -289,8 +289,8 @@ H375A rts
tsterr lda #$52 not tree or dir, unrecognized type
sec
rts
tstsos .EQ *-ofsX test if xdos disk.
lda gbuf pointer to previous dir block
tstsos lda gbuf pointer to previous dir block
ora gbuf+1 must be null
bne tsterr
lda gbuf+4 test for header
@ -299,21 +299,21 @@ tstsos .EQ *-ofsX test if xdos disk.
bne tsterr
H3770 clc no error
rts
findfile .EQ *-ofsX
jsr lookfile see if file exists
findfile jsr lookfile see if file exists
bcs nofind
moventry .EQ *-ofsX
ldy h_entln
moventry ldy h_entln
H377A lda (zpt),y move entry into storage
sta d_stor,y
dey
bpl H377A
lda #$00 no errors
nofind rts
lookfile .EQ *-ofsX
jsr preproot go find volume
lookfile jsr preproot go find volume
bcs fnderr
bne L37C5 branch if more than root
bne lookfil0 branch if more than root
lda /gbuf otherwise, report a bad path error
sta zpt+1 (but 1st create a phantom entry
lda #$04 for open)
@ -340,8 +340,8 @@ phantm2 lda rootstuf-$10,y
sta d_usage
H37C2 lda #$40 bad path (carry set)
rts
lookfil0 .EQ *-ofsX
L37C5 stz nofree reset free entry indicator.
lookfil0 stz nofree reset free entry indicator.
sec dir to be searched has header in this block.
L37C9 stz totent reset entry counter.
jsr looknam look for name pointed to by pnptr.
@ -358,6 +358,7 @@ L37E2 dec entcnth should be at least one
errdir lda #$51 directory error
fnderr sec
rts
L37EB sta entcntl keep a running count.
lda /gbuf reset indirect pointer
sta zpt+1
@ -424,8 +425,8 @@ fnderr1 sec
rts
movhead jsr movhed0 move directory info.
jmp lookfil0 do next local pathname.
movhed0 .EQ *-ofsX
ldx #$0A move this directory info
movhed0 ldx #$0A move this directory info
L387F lda gbuf+28,x
sta h_credt,x
dex
@ -440,7 +441,8 @@ L3893 lda gbuf+39,x this header.
dex
bpl L3893
L389C rts
entadr .EQ *-ofsX
entadr .EQ *
filfound lda h_maxent figure out which entry # this is
sec
sbc cntent max entries - count entries + 1
@ -452,8 +454,8 @@ filfound lda h_maxent figure out which entry # this is
sta d_entblk+1
clc
rts
looknam .EQ *-ofsX reset count of files per block
lda h_maxent
looknam lda h_maxent reset count of files per block
sta cntent
lda /gbuf
sta zpt+1
@ -493,8 +495,8 @@ L38F8 dec cntent checked all entries in this block?
inc zpt+1 look on 2nd page.
clc carry should always be clear before
bcc L38C1 looking at next.
preproot .EQ *-ofsX
jsr findvol search vcb's and dev's for spec'd volume
preproot jsr findvol search vcb's and dev's for spec'd volume
bcs novolume
lda #$00 zero out directory temps
ldy #$42
@ -518,12 +520,11 @@ L3929 lda vcbbuf+18,x misc info includes
dex
dey
bpl L3929
nxtpname .EQ *-ofsX
jsr nxtpnam1 get new namptr in y and namlen in acc.
nxtpname jsr nxtpnam1 get new namptr in y and namlen in acc.
sty namptr save new pathname pointer.
rts (status reg according to accumulator)
nxtpnam1 .EQ *-ofsX
ldy namptr inc pathname pointer to next name
nxtpnam1 ldy namptr inc pathname pointer to next name
lda pathbuf,y in the path.
sec
adc namptr if this addition results in zero,
@ -534,8 +535,7 @@ nxtpnam1 .EQ *-ofsX
L395F lda pathbuf,y test for end of name.
clc no errors
novolume rts
findvol .EQ *-ofsX
lda #$00
findvol lda #$00
ldy preflag use prefix volume name to look up vcb.
bit prfxflg is this a prefixed path?
bpl L396F branch if it is
@ -625,8 +625,7 @@ L3A16 lda #$02 go read root dir into gbuf
jsr cmppnam is this the volume ?
bcs L39E2 if not
L3A29 rts
mvdevnums .EQ *-ofsX
ldx numdevs copy all dev #'s to be checked.
mvdevnums ldx numdevs copy all dev #'s to be checked.
L3A2D lda devlist,x active device list.
and #$F0 strip device type info.
sta loklst,x copy them to a temp workspace
@ -634,8 +633,8 @@ L3A2D lda devlist,x active device list.
bpl L3A2D
ldx numdevs
rts
fnddvcb .EQ *-ofsX look for vcb with this device#
lda #$00
fnddvcb lda #$00 look for vcb with this device#
ldy #$FF
L3A40 tax new index to next vcb
lda vcbbuf+16,x check all devnums
@ -669,8 +668,8 @@ L3A70 stx vcbptr save entry index.
L3A79 clc no error.
L3A7A lda #$55 # vcb full error
rts
cmppnam .EQ *-ofsX
ldx #$00 index to directory name.
cmppnam ldx #$00 index to directory name.
ldy namptr index to pathname.
lda gbuf+4 get dir name length and type.
cmp #$E0 is it a directory?
@ -689,14 +688,13 @@ L3A95 cmp pathbuf,y
bpl L3A92 if more to compare.
clc match found
rts
logvcb .EQ *-ofsX
ldx vcbptr previously logged in volume?
logvcb ldx vcbptr previously logged in volume?
lda vcbbuf,x (acc = 0?)
beq L3AB0 no, go prepare vcb.
beq logvcb1 no, go prepare vcb.
jsr cmpvcb does vcb match vol read?
bcc L3B05 yes, do not disturb.
logvcb1 .EQ *-ofsX
L3AB0 ldy #$1F zero out vcb entry
logvcb1 ldy #$1F zero out vcb entry
L3AB2 stz vcbbuf,x
inx
dey
@ -734,8 +732,8 @@ L3ACE lda gbuf+4,y
sta vcbbuf+27,x
L3B04 clc indicate logged if possible
L3B05 rts
cmpvcb .EQ *-ofsX compare volume name in vcb
lda gbuf+4 with name in directory.
cmpvcb lda gbuf+4 with name in directory.
and #$0F
cmp vcbbuf,x are they the same length?
stx xvcbptr (see rev note #23)
@ -753,8 +751,8 @@ L3B1E sec anticipate different names.
clc indicate match.
L3B26 ldx xvcbptr offset to start of vcb (rev note #23)
rts
tstdupvol .EQ *-ofsX check for other logged in volumes
lda #$00 with the same name.
tstdupvol lda #$00 check for other logged in volumes with the same name.
L3B2C tax
jsr cmpvcb
bcs L3B41 if no match.
@ -775,13 +773,13 @@ L3B4B sta duplflag duplicate has been found.
stx vcbentry save pointer to conflicting vcb.
sec error.
rts
tstfrblk .EQ *-ofsX test if enough free blocks available
ldx vcbptr for request.
tstfrblk ldx vcbptr test if enough free blocks available for request.
lda vcbbuf+21,x check if proper count for this volume.
ora vcbbuf+20,x
bne L3BAD branch if count is non-zero.
tkfrecnt .EQ *-ofsX
jsr cntbms get # of bitmaps
tkfrecnt jsr cntbms get # of bitmaps
sta bmcnt and save.
stz scrtch start count at 0
stz scrtch+1
@ -822,8 +820,8 @@ L3BAD lda vcbbuf+20,x compare total available free blocks
L3BBE lda #$48 disk full
sec
L3BC1 rts
count .EQ *-ofsX
ldy #$00
count ldy #$00
L3BC4 lda gbuf,y bit pattern.
beq L3BCC don't count
jsr cntfree
@ -842,17 +840,17 @@ L3BD4 iny
sbc bmcnt
sta nofree
L3BEE rts
cntfree .EQ *-ofsX
L3BEF asl count the # of bits in this byte
cntfree asl count the # of bits in this byte
bcc L3BFA
inc scrtch
bne L3BFA
inc scrtch+1
L3BFA ora #$00
bne L3BEF loop until all bits counted
bne cntfree loop until all bits counted
rts
cntbms .EQ *-ofsX
ldx vcbptr
cntbms ldx vcbptr
ldy vcbbuf+19,x return the # of bitmaps
lda vcbbuf+18,x possible with the total count
bne L3C0B found in the vcb.

View File

@ -4,8 +4,7 @@ NEW
* deallocate a block's entry in bitmap
* on entry, x,a = address of block
dealloc .EQ *-ofsX
stx bmcnt high address of block.
dealloc stx bmcnt high address of block.
pha save low address.
ldx vcbptr check that bitmap block address is
lda vcbbuf+19,x valid given the total # of blocks
@ -43,12 +42,12 @@ dealloc .EQ *-ofsX
L3C64 ldy bmptr index to byte
lsr half
lda nofree (get indiviual bit)
bcc L3C77 branch if on page 1 of bitmap
bcc bmbufhi branch if on page 1 of bitmap
ora bmbuf+$100,y
sta bmbuf+$100,y
bcs L3C7D always.
bmbufhi .EQ *-ofsX this address + 2 is used as an
L3C77 ora bmbuf,y absolute reference to bmbuf high byte.
bmbufhi ora bmbuf,y this address + 2 is used as an absolute reference to bmbuf high byte.
sta bmbuf,y
L3C7D lda #$80 mark bitmap as modified
tsb bmastat
@ -60,8 +59,8 @@ L3C8B rts
L3C8C lda #$5A bitmap block # impossible.
sec bitmap disk address wrong
rts (maybe data masquerading as indx block)
alc1blk .EQ *-ofsX
jsr fndbmap get address of bitmap.
alc1blk jsr fndbmap get address of bitmap.
bcs L3CB8 error.
L3C95 ldy #$00 begin search at start of bitmap block.
sty half which half (page) to search
@ -122,8 +121,8 @@ L3D10 clc no errors.
lda scrtch return address in y,a of newly
ldy scrtch+1 allocated block.
rts
nxtbmap .EQ *-ofsX inc to next bitmap
ldy vcbptr but 1st make sure there is another one.
nxtbmap ldy vcbptr inc to next bitmap, but 1st make sure there is another one.
lda vcbbuf+19,y
lsr
lsr
@ -135,8 +134,8 @@ nxtbmap .EQ *-ofsX inc to next bitmap
inc
sta vcbbuf+28,y
jsr upbmap
fndbmap .EQ *-ofsX
ldy vcbptr
fndbmap ldy vcbptr
lda vcbbuf+16,y get device #.
cmp bmadev does this map match this device ?
beq L3D4A yes.
@ -158,8 +157,8 @@ L3D5F rts
L3D60 lda #$48 request can't be filled
sec error
rts
upbmap .EQ *-ofsX
clc
upbmap clc
lda bmastat is current map modified ?
bpl L3D5F no.
jsr wrtbmap update device.
@ -167,8 +166,8 @@ upbmap .EQ *-ofsX
lda #$00
sta bmastat mark bitmap buffer as free
rts
gtbmap .EQ *-ofsX read bitmap specified by dev and vcb.
sta bmadev
gtbmap sta bmadev read bitmap specified by dev and vcb.
ldy vcbptr get lowest map # with free blocks in it
lda vcbbuf+28,y
sta bmacmap associate offset with bitmap ctrl block.
@ -196,23 +195,23 @@ L3D92 sta A4L
bcc L3DB6 and return it if no error.
txa error code
L3DB6 rts
rdblk .EQ *-ofsX
sta bloknml
rdblk sta bloknml
stx bloknml+1
jsr rdgbuf
rts
wrtbmap .EQ *-ofsX write bitmap.
lda #$02 write command.
wrtbmap lda #$02 write command.
bne L3D92 always.
wrtgbuf .EQ *-ofsX
lda #$02 write command
wrtgbuf lda #$02 write command
bne L3DC9 always.
rdgbuf .EQ *-ofsX
lda #$01 read command.
rdgbuf lda #$01 read command.
L3DC9 sta A4L pass to device handler.
lda /gbuf general buffer.
dobitmap .EQ *-ofsX
php no interrupts
dobitmap php no interrupts
sei
sta buf+1 buffer high.
stz buf buffer low (always on page boundary)
@ -231,8 +230,7 @@ L3DE8 plp file i/o error. restore interrupts.
rts
* get mark command
getmark .EQ *-ofsX
XDOS.GetMark ldx fcbptr index to open fcb.
getmark ldx fcbptr index to open fcb.
ldy #$02 index to user's mark parmeter.
.1 lda fcbbuf+18,x transfer current position
sta (A3L),y to user's parameter list
@ -246,8 +244,7 @@ L3DFD lda #$4D invalid position
sec
rts
* set mark command
setmark .EQ *-ofsX
XDOS.SetMark ldy #$04 index to user's desired position.
setmark ldy #$04 index to user's desired position.
ldx fcbptr file's control block index.
inx inc by 2 for index to hi eof
inx
@ -263,8 +260,8 @@ 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 .EQ *-ofsX
ldy fcbptr test to see if new position is
rdposn ldy fcbptr test to see if new position is
lda fcbbuf+19,y within the same (current) data block.
and #$FE
sta scrtch
@ -383,11 +380,11 @@ L3F18 ldy fcbptr set status to show what's missing
lsr discard bit that says data block
lsr unallocated because carry indicates if
jsr zipdata index block is invalid and needs to be
bcc L3F61 zeroed. branch if it doesn't need zeroed
bcc svmark zeroed. branch if it doesn't need zeroed
jsr zeroindex zero index block in user's i/o buffer
bra L3F61
zeroindex .EQ *-ofsX
lda #$00
bra svmark
zeroindex lda #$00
tay
L3F30 sta (zpt),y zero out the index half of the user's
iny i/o buffer
@ -398,8 +395,8 @@ L3F37 sta (zpt),y
bne L3F37
dec zpt+1 restore proper address
rts
zipdata .EQ *-ofsX
lda #$00
zipdata lda #$00
tay
L3F42 sta (datptr),y zero out data area
iny
@ -413,13 +410,11 @@ L3F49 sta (datptr),y
L3F51 sta bloknml get data block of new position
lda (zpt),y (high address)
dec zpt+1
rnewpos .EQ *-ofsX
sta bloknml+1
rnewpos sta bloknml+1
jsr rfcbdat
bcs L3F86 if error.
jsr clrstats show whole chain is allocated.
svmark .EQ *-ofsX
L3F61 ldy fcbptr update position in fcb
svmark ldy fcbptr update position in fcb
iny
iny
ldx #$02
@ -438,14 +433,12 @@ L3F68 lda fcbbuf+18,y save old mark in case calling routine
adc datptr+1
sta sos+1
L3F86 rts carry set if error
clrstats .EQ *-ofsX
ldy fcbptr clear allocation states for data block
clrstats ldy fcbptr clear allocation states for data block
lda fcbbuf+8,y and both levels of indexes/
and #$F8
sta fcbbuf+8,y indicates that either they exist now
rts or unnecessary for current position.
dirmark .EQ *-ofsX
cmp #$0D is it a directory ?
dirmark cmp #$0D is it a directory ?
beq L3F9C yes...
lda #$4A no, so compatability problem.
jsr p8errv should not have been opened !!!
@ -460,15 +453,14 @@ L3FAB ldy #$00 read directory file in reverse order.
bcs L3FD6 if error.
inc cntent count up to 128.
bpl L3FAB loop if more blocks to pass over.
bmi L3F61 always.
bmi svmark always.
L3FB9 ldy #$02 position is forward from current.
jsr dirpos1 read next directory block
bcs L3FD6 if error.
dec cntent
bne L3FB9 loop if position not found in this block
beq L3F61 branch always.
dirpos1 .EQ *-ofsX
lda (datptr),y get link address of previous or next
beq svmark branch always.
dirpos1 lda (datptr),y get link address of previous or next
sta bloknml directory block.
cmp #$01 test for null byte into carry
iny but first be sure there is a link.
@ -482,8 +474,7 @@ L3FD8 sta bloknml+1
* read file's data block
rfcbdat .EQ *-ofsX
lda #$01 read command
rfcbdat lda #$01 read command
sta A4L
ldx #datptr points at address of data buffer.
jsr fileio1 go do file input.
@ -494,8 +485,8 @@ rfcbdat .EQ *-ofsX
lda bloknml+1
sta fcbbuf+17,y
L3FF2 rts
rfcbidx .EQ *-ofsX prepare to read index block.
lda #$01 read command
rfcbidx lda #$01 prepare to read index block : read command
sta A4L
ldx #$48 address of current index buffer.
jsr fileio1 go read index block.
@ -509,16 +500,16 @@ rfcbidx .EQ *-ofsX prepare to read index block.
L400C rts
L400D lda #$02 write command
.HS 2C skip next instruction
rfcbfst .EQ *-ofsX
lda #$01 read command.
rfcbfst lda #$01 read command.
pha save the command
lda #$0C
ora fcbptr add offset to fcbptr
tay
pla
ldx #$48 rd block into index portion of file buf
dofileio .EQ *-ofsX
sta A4L command
dofileio sta A4L command
lda fcbbuf,y get disk block address from fcb.
sta bloknml block 0 not legal
cmp fcbbuf+1,y
@ -529,8 +520,8 @@ dofileio .EQ *-ofsX
jsr sysdeath doesn't return...
L4031 lda fcbbuf+1,y high address of disk block
sta bloknml+1
fileio1 .EQ *-ofsX
php no interrupts
fileio1 php no interrupts
sei
lda $00,x get memory address of buffer from
sta buf page zero pointed to by x register
@ -552,11 +543,10 @@ fileio1 .EQ *-ofsX
L405E plp restore interrupts
sec
rts
wfcbfst .EQ *-ofsX
jsr upbmap update the bitmap
wfcbfst jsr upbmap update the bitmap
bra L400D and write file's 1st block.
wfcbdat .EQ *-ofsX
ldx #datptr point at memory address with x and
wfcbdat ldx #datptr point at memory address with x and
lda #$10 disk address with y.
ora fcbptr add offset to fcbptr
tay and put in y.
@ -565,8 +555,7 @@ wfcbdat .EQ *-ofsX
bcs L4096 if errors.
lda #$BF mark data status as current.
bra L408D
wfcbidx .EQ *-ofsX
jsr upbmap update bitmap.
wfcbidx jsr upbmap update bitmap.
ldx #$48 point to address of index buffer
lda #$0E and block address of that index block.
ora fcbptr
@ -580,8 +569,7 @@ L408D ldy fcbptr change status byte to reflect
sta fcbbuf+8,y (carry is unaffected)
L4096 rts
openf .EQ *-ofsX
jsr findfile look up the file.
openf jsr findfile look up the file.
bcc L40A0 if ok.
cmp #$40 is this opening a root directory ?
bne L40A7 if not, then error.
@ -693,8 +681,7 @@ L4163 ldx vcbptr index to vcb.
* test open
* is there an open file?
tstopen .EQ *-ofsX
lda #$00
tstopen lda #$00
sta cntent returns the ref # of a free fcb.
sta totent flag to indicate file already open.
sta fcbflg flag indicates a free fcb is available.

View File

@ -3,8 +3,7 @@ NEW
* read command
readf .EQ *-ofsX
jsr mvdbufr xfer buffer address and request count
readf jsr mvdbufr xfer buffer address and request count
jsr mvcbytes to a more accessable location, also
pha get fcb attributes and save on stack.
jsr calcmrk calc mark after read, test if mark > eof
@ -73,7 +72,7 @@ L4269 dec cmdtemp has all been read fast ?
jsr fxdatptr go fix up data pointer to xdos buffer.
lda rwreql test for end of read.
ora rwreqh are both 0 ?
beq L42C3 yes, done.
beq rwdone yes, done.
bne L421F no, read last partial block
L427B bcs L4249
lda tposhi get index to next block address
@ -110,14 +109,13 @@ L42B6 plp restore interrupts.
L42B7 pha save error code.
jsr fxdatptr go restore data pointers, etc.
pla
errfix1 .EQ *-ofsX
pha save error code
errfix1 pha save error code
jsr rwdone pass back # of bytes actually read
pla
sec error
rts
rwdone .EQ *-ofsX
L42C3 ldy #$06 return total # of bytes actually read
rwdone ldy #$06 return total # of bytes actually read
sec derived from cbytes-rwreq.
lda cbytes
sbc rwreql
@ -127,8 +125,8 @@ L42C3 ldy #$06 return total # of bytes actually read
sbc rwreqh
sta (A3L),y
jmp rdposn leave with valid position in fcb.
preprw .EQ *-ofsX
ldy fcbptr adj pointer to user's buffer to make
preprw ldy fcbptr adj pointer to user's buffer to make
sec the transfer
lda usrbuf
sbc tposll
@ -147,8 +145,7 @@ L42F9 ldy tposll index to 1st data.
sta sos beginning of page.
ldx rwreql get low order count of requested bytes.
rts return statuses.
readpart .EQ *-ofsX
txa x = low count of bytes to move.
readpart txa x = low count of bytes to move.
bne L430F branch if request is not an even page.
lda rwreqh a call of 0 bytes should never get here!
beq L435D branch if nothing to do.
@ -205,10 +202,9 @@ L4366 stx rwreql and remainder of request count.
bcc L4374
inc usrbuf+1 adjust hi address as needed.
L4374 plp restore return statuses.
setvflg .EQ *-ofsX this byte ($60) is used to set v flag.
rts
fxdatptr .EQ *-ofsX put current user buffer
lda datptr address back to normal
setvflg rts this byte ($60) is used to set v flag.
fxdatptr lda datptr put current user buffer address back to normal
sta usrbuf
lda datptr+1
sta usrbuf+1 bank pair byte should be moved also.
@ -217,12 +213,11 @@ fxdatptr .EQ *-ofsX put current user buffer
* read directory file
dread .EQ *-ofsX
L4384 jsr rdposn
dread jsr rdposn
bcs L43B8 pass back any errors.
jsr preprw prepare for transfer.
jsr readpart move data to user's buffer.
bvc L4384 repeat until request is satisfied.
bvc dread repeat until request is satisfied.
jsr rwdone update fcb as to new position.
bcc L43B6 branch if done with no errors.
cmp #$4C was last read to end of file ?
@ -243,8 +238,7 @@ L43A6 lda fcbbuf+16,x
L43B6 clc no error
L43B7 rts
L43B8 jmp errfix1 report how much xfer'd before error.
mvcbytes .EQ *-ofsX move request count to a more
ldy #$04 accessable location
mvcbytes ldy #$04 move request count to a more accessable location
lda (A3L),y
sta cbytes
sta rwreql
@ -256,15 +250,14 @@ mvcbytes .EQ *-ofsX move request count to a more
lda fcbbuf+9,y a = attributes
clc and carry clear...
rts
mvdbufr .EQ *-ofsX move the pointer to user's buffer
ldy #$02 to the block file manager
lda (A3L),y
mvdbufr ldy #$02 move the pointer to user's buffer
lda (A3L),y to the block file manager
sta usrbuf z-page area
iny
lda (A3L),y
sta usrbuf+1
gfcbstyp .EQ *-ofsX
ldy fcbptr return storage type
gfcbstyp ldy fcbptr return storage type
lda fcbbuf+7,y
rts
@ -275,8 +268,7 @@ gfcbstyp .EQ *-ofsX
* y,x,a is unknown
* carry set indicates scrtch > eof
calcmrk .EQ *-ofsX
ldx #$00
calcmrk ldx #$00
ldy fcbptr
clc
L43EE lda fcbbuf+18,y
@ -286,21 +278,21 @@ L43EE lda fcbbuf+18,y
sta scrtch,x
txa
eor #$02 cbytes+2 always=0
beq L4406
beq eoftest
iny
inx
bne L43EE always.
eoftest .EQ *-ofsX
L4406 lda scrtch,x new mark in scrtch.
eoftest lda scrtch,x new mark in scrtch.
cmp fcbbuf+21,y is new position > eof ?
bcc L4414 no, proceed.
bne L4414 yes, adjust 'cbytes' request
dey
dex all tree bytes compared ?
bpl L4406 no, test next lowest
bpl eoftest no, test next lowest
L4414 rts
werreof .EQ *-ofsX
jsr plus2fcb reset eof to pre-error position.
werreof jsr plus2fcb reset eof to pre-error position.
L4418 lda oldeof,x place oldeof back into fcb
sta fcbbuf+21,y
lda oldmark,x also reset mark to last best
@ -314,8 +306,7 @@ L4418 lda oldeof,x place oldeof back into fcb
* drop into wadjeof to adjust eof to mark if necessary
wadjeof .EQ *-ofsX
jsr plus2fcb get y=fcbptr+2, x=2, a=y.
wadjeof jsr plus2fcb get y=fcbptr+2, x=2, a=y.
L4434 lda fcbbuf+21,y copy eof to old eof
sta oldeof,x
bcc L4442 and if carry set...
@ -325,8 +316,7 @@ L4442 dey
dex copy all 3 bytes
bpl L4434
rts
plus2fcb .EQ *-ofsX
lda #$02 on exit both a and y = fcbptr+2.
plus2fcb lda #$02 on exit both a and y = fcbptr+2.
tax x = 2
ora fcbptr
tay
@ -334,8 +324,7 @@ plus2fcb .EQ *-ofsX
* write command
writef .EQ *-ofsX first determine if requested
jsr mvcbytes write is legal.
writef jsr mvcbytes first determine if requested write is legal.
pha
jsr calcmrk save a copy of eof to old eof, set/clr
jsr wadjeof carry to determine if new mark > eof.
@ -408,8 +397,8 @@ L44E9 jsr preprw
jsr wrtpart
bvc L4479
jmp rwdone update fcb with new position
wrtpart .EQ *-ofsX
txa
wrtpart txa
bne L44FF branch if request is not even pages
lda rwreqh a call of 0 bytes should never get here!
beq L4546 do nothing
@ -466,8 +455,8 @@ L4549 sty tposll save low position
L4564 jsr fcbused set directory flush bit.
plp restore return statuses
rts
topdown .EQ *-ofsX
jsr swapdown make current 1st block an entry in new
topdown jsr swapdown make current 1st block an entry in new
bcs L45B1 top. branch if errors.
jsr gfcbstyp get storage type
@ -498,15 +487,15 @@ L457A jsr alcwblk get another block address for the sap
jsr wfcbfst save new top of tree
bcs L45B1
jmp zeroindex zero index block in user's i/o buffer.
sapdown .EQ *-ofsX
jsr gfcbstyp find out if dealing with a tree.
sapdown jsr gfcbstyp find out if dealing with a tree.
cmp #$01 if seed then adj to file type is needed.
beq L45B2 branch if seed
beq swapdown branch if seed
jsr rfcbfst otherwise read in top of tree.
bcc L457A if no error.
L45B1 rts return errors.
swapdown .EQ *-ofsX make current seed into a sapling.
L45B2 jsr alcwblk allocate a block before swap.
swapdown jsr alcwblk make current seed into a sapling, allocate a block before swap.
bcs L45F6 return errors.
ldy fcbptr get previous first block
lda fcbbuf+12,y address into index block.
@ -537,8 +526,8 @@ L45B2 jsr alcwblk allocate a block before swap.
sta fcbbuf+8,y
clc no error
L45F6 rts
alcwblk .EQ *-ofsX
jsr alc1blk
alcwblk jsr alc1blk
bcs L4616
jsr gfcbstat mark usage as modified
ora #$10
@ -553,16 +542,13 @@ alcwblk .EQ *-ofsX
L4615 clc no error
L4616 rts
tstwprot .EQ *-ofsX check for 'never been modified'
XDOS.tstwprot jsr gfcbstat condition
tstwprot jsr gfcbstat check for 'never been modified' condition
and #$F0
bne L4615 ordinary rts if known write ok.
lda fcbbuf+1,y get file's dev #.
sta devnum get current status of block device.
twrprot1 .EQ *-ofsX make the device status call
XDOS.twrprot1 sta unitnum
twrprot1 sta unitnum make the device status call
lda bloknml+1
pha
lda bloknml save the current block values

View File

@ -3,10 +3,10 @@ NEW
* close command
closef .EQ *-ofsX close all ?
ldy #$01
closef ldy #$01 close all ?
lda (A3L),y
bne L4683 no, just one of them.
sta cferr clear global close error.
lda #$00 start at the beginning.
L4654 sta fcbptr save current low byte of pointer.
@ -32,8 +32,8 @@ L4675 lda fcbptr inc pointer to next fcb
rts (carry already set).
L4683 jsr flush1 flush file 1st (including updating
bcs L46B6 bitmap). branch if errors.
close2 .EQ *-ofsX
ldy fcbptr
close2 ldy fcbptr
lda fcbbuf+11,y release file buffer
jsr relbuffr
bcs L46B6
@ -55,10 +55,9 @@ L46B6 bcs L46E6 don't report close all error now.
* flush command
flushf .EQ *-ofsX
ldy #$01 flush all ?
flushf ldy #$01 flush all ?
lda (A3L),y
bne L46E9 no, just one of them.
bne flush1 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.
@ -76,12 +75,12 @@ L46D9 clc
beq L46E0 branch if no logged errors.
sec report error now
L46E0 rts
flush2 .EQ *-ofsX
jsr fndfcbuf must set up vcb & buffer locations 1st.
flush2 jsr fndfcbuf must set up vcb & buffer locations 1st.
bcc L46F1 branch if no error.
L46E6 jmp glberr error so check for close or flush all.
flush1 .EQ *-ofsX for normal refnum flush,
L46E9 stz cferr clear global error.
flush1 stz cferr for normal refnum flush, clear global error.
jsr findfcb setup pointer to fcb user references.
bcs L46E6 return any errors.
L46F1 lda fcbbuf+9,y test to see if file is modified.
@ -154,7 +153,7 @@ L4780 lda fcbbuf+5,y the last thing to update is storage
ora scrtch add in the new type
sta d_stor and put it away.
jsr drevise go update directory.
bcs L47B4 error.
bcs glberr error.
ldy fcbptr mark
lda fcbbuf+28,y fcb/directory
and #$7F as
@ -163,14 +162,13 @@ L4780 lda fcbbuf+5,y the last thing to update is storage
cmp bmadev is it in same as current file ?
bne L47B2 yes, put it on the disk if necessary.
jsr upbmap go put it away.
bcs L47B4 flush error
bcs glberr flush error
L47B2 clc
rts
* report error only if not a close all or flush all
glberr .EQ *-ofsX
L47B4 ldy #$01
glberr ldy #$01
pha
lda (A3L),y
bne L47C1 not an 'all' so report now
@ -180,16 +178,15 @@ L47B4 ldy #$01
rts
L47C1 pla
rts
gfcbstat .EQ *-ofsX
ldy fcbptr index to fcb.
gfcbstat ldy fcbptr index to fcb.
lda fcbbuf+8,y return status byte.
rts
L47CA lda #$4E access error
sec
L47CD rts
seteof .EQ *-ofsX can only move end of tree, sapling
jsr gfcbstyp or seed.
seteof jsr gfcbstyp can only move end of tree, sapling or seed.
cmp #$04 tree type ?
bcs L47CA if not then access error
asl
@ -221,12 +218,12 @@ L47FD lda (A3L),y position mark to new eof
ldx #$02 point to 3rd byte.
L4808 lda oldeof,x see if eof moved backwards so blocks
cmp tposll,x can be released.
bcc L4815 (branch if not)
bcc eofset (branch if not)
bne purge branch if blocks to be released
dex
bpl L4808 all 3 bytes
eofset .EQ *-ofsX
L4815 ldy #$04
eofset ldy #$04
ldx fcbptr place new end of file into fcb
inx
inx
@ -360,8 +357,7 @@ L491C pla report any errors that may have
plp appeared.
rts
geteof .EQ *-ofsX
ldx fcbptr index to end of file mark
geteof ldx fcbptr index to end of file mark
ldy #$02 and index to user's call parameters
L4924 lda fcbbuf+21,x
sta (A3L),y
@ -372,8 +368,7 @@ L4924 lda fcbbuf+21,x
clc no errors
rts
newline .EQ *-ofsX
ldy #$02 adjust newline status for open file.
newline ldy #$02 adjust newline status for open file.
lda (A3L),y on or off ?
ldx fcbptr it will be 0 if off.
sta fcbbuf+31,x set new line mask
@ -383,8 +378,7 @@ newline .EQ *-ofsX
clc no error possible
rts
getinfo .EQ *-ofsX
jsr findfile look for file.
getinfo jsr findfile look for file.
bcc L4988 no error.
cmp #$40 was it a root directory file ?
sec (in case of no match)
@ -428,8 +422,7 @@ L4994 lda inftabl-3,y
bcs L4994 if all info bytes moved, retn carry clr
L49A4 rts
setinfo .EQ *-ofsX
jsr findfile get the file to work on.
setinfo jsr findfile get the file to work on.
bcs L49CF if error.
lda bubit see if backup bit can be cleared
eor #$20
@ -455,8 +448,7 @@ L49D0 ldy #$0B
jmp drevise1 end by updating directory.
L49D9 jmp drevise update with clock also...
rename .EQ *-ofsX
jsr lookfile look for source (original) file.
rename jsr lookfile look for source (original) file.
bcc L4A1E if found.
cmp #$40 trying to rename a volume ?
bne L49FD no, return error.
@ -585,24 +577,24 @@ L4ABE lda pathbuf,y move local name to dir entry workspace.
jsr mvrotnam
bcs L4A74
L4AF0 jmp drevise1 end by updating all path directories.
mvrotnam .EQ *-ofsX
ldx #$00
mvrotnam ldx #$00
L4AF5 sta gbuf+4,x
inx
iny
lda pathbuf,y
bne L4AF5
jmp wrtgbuf write changed header block.
renpath .EQ *-ofsX
ldy #$03 get address to new pathname
renpath ldy #$03 get address to new pathname
lda (A3L),y
iny
sta zpt
lda (A3L),y set up for syntaxing routine (synpath)
sta zpt+1
jmp synpath do syntax (returns y = local namelength)
getnamptr .EQ *-ofsX
ldy #$00 return pointer to 1st name of path.
getnamptr ldy #$00 return pointer to 1st name of path.
bit prfxflg is this a prefixed name ?
bmi L4B1A branch if not.
ldy newpfxptr

View File

@ -1,8 +1,7 @@
NEW
AUTO 3,1
destroy .EQ *-ofsX
jsr findfile look for file to be destroyed.
destroy jsr findfile look for file to be destroyed.
bcs L4B66 if error.
jsr tstopen is it open ?
lda totent
@ -65,8 +64,7 @@ L4BA1 dec h_fcnt mark header with one less file.
txa last call failed, use it's error code.
L4BAF cmp #$01 adjust carry accordingly
rts
dvcbrev .EQ *-ofsX update block free count in vcb.
ldy vcbptr point to vcb of correct device.
dvcbrev ldy vcbptr update block free count in vcb. point to vcb of correct device.
lda deblock get # of blocks recently freed.
adc vcbbuf+20,y
sta vcbbuf+20,y update current free block count.
@ -110,8 +108,8 @@ L4C0A jsr dealloc free this block.
L4C1A rts
L4C1B lda #$4A file incompatible
jsr p8errv (returns to caller)
fcbused .EQ *-ofsX mark fcb as dirty so the directory
pha will be flushed on 'flush'.
fcbused pha mark fcb as dirty so the directory will be flushed on 'flush'.
tya save regs.
pha
ldy fcbptr
@ -143,8 +141,7 @@ fcbused .EQ *-ofsX mark fcb as dirty so the directory
* to trim a tree to a seed file, both dtree and dsap must be zero.
* to go from tree to sapling, dtree alone must be zero.
detree .EQ *-ofsX
lda stortyp which kind of tree ?
detree lda stortyp which kind of tree ?
cmp #$20 is it a 'seed' ?
bcc L4C46 if yes.
cmp #$30 a sapling ?
@ -233,8 +230,7 @@ L4CC3 ldy dtree deallocate all sapling blocks greater
rts
L4CEB jsr shrink shrink tree to sapling
bcs L4CC2
sapdel0 .EQ *-ofsX
jsr drdfrst read specified sapling level index
sapdel0 jsr drdfrst read specified sapling level index
bcs L4CC2 into gbuf. branch if error.
L4CF5 ldy dsap pointer to last of desirable indexes.
iny inc to 1st undesirable.
@ -258,8 +254,7 @@ 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.
seedel0 .EQ *-ofsX
jsr drdfrst go read data block.
seedel0 jsr drdfrst go read data block.
bcs L4D52 if error.
L4D2E ldy dseed+1 check high byte for no deletion.
beq L4D39 branch if all of 2nd page to be deleted.
@ -278,16 +273,14 @@ L4D49 sta gbuf,y
bne L4D49
L4D4F jmp wrtgbuf update data block to disk.
L4D52 rts return error status.
drdfrst .EQ *-ofsX read specified 1st block into gbuf
lda firstbl
drdfrst lda firstbl read specified 1st block into gbuf
ldx firstbh
jmp rdblk 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.
shrink .EQ *-ofsX
ldx firstbh first deallocate top index block
shrink ldx firstbh first deallocate top index block
txa
pha
lda firstbl
@ -310,10 +303,8 @@ shrink .EQ *-ofsX
sta stortyp
jsr wrtgbuf write the (deallocated) old top index.
L4D8D rts return error status.
dealblk .EQ *-ofsX
ldy #$00 start at beginning.
dalblk1 .EQ *-ofsX
lda bloknml save disk address of gbuf's data.
dealblk ldy #$00 start at beginning.
dalblk1 lda bloknml save disk address of gbuf's data.
pha
lda bloknml+1
pha
@ -337,8 +328,7 @@ L4DB4 tax save error code, if any.
sta bloknml
txa restore return code
rts
swapme .EQ *-ofsX
lda delflag swapping or zeroing ?
swapme lda delflag swapping or zeroing ?
bne L4DC5 skip if swapping.
tax make x = 0.
beq L4DCB zero the index (always taken).
@ -349,6 +339,425 @@ L4DCB sta gbuf+$100,y save index high
sta gbuf,y save index low
rts done.
* MEMMGR memory manager
*
* allocate buffer in memory tables
alcbuffr ldy #$04 index to user specified buffer.
alcbufr1 lda (A3L),y this buffer must be on a page boundary.
tax save for validation.
cmp #$08
bcc L4E1E cannot be lower than video !
cmp #$BC nor greater than $BB00
bcs L4E1E since it would wipe out globals...
sta datptr+1
dey
lda (A3L),y low address should be zero !
sta datptr
bne L4E1E error if not page boundary.
inx add 4 pages for 1k buffer.
inx
inx
inx
L4DED dex test for conflicts.
jsr cmembit test for free buffer space
and memmap,y P8 memory bitmap
bne L4E1E report memory conflict, if any.
cpx datptr+1 test all 4 pages.
bne L4DED
inx add 4 pages again for allocation.
inx
inx
inx
L4DFE dex set proper bits to 1
jsr cmembit
ora memmap,y to mark it's allocation.
sta memmap,y
cpx datptr+1 set all 4 pages
bne L4DFE
ldy fcbptr calculate buffer number
lda fcbbuf,y
asl buffer number = (entnum) * 2.
sta fcbbuf+11,y save it in fcb.
tax use entnum * 2 as index to global
lda datptr+1 buffer addr tables. get addr already
sta buftbl-1,x validated as good. store hi addr
clc (entnums start at 1, not 0)
rts
L4E1E lda #$56 buffer is in use or not legal
sec
rts
getbufadr tax index into global buffer table.
lda buftbl-2,x
sta bufaddrl
lda buftbl-1,x
sta bufaddrh
rts
relbuffr jsr getbufadr preserve buffer address in 'bufaddr'
tay returns high buffer address in acc.
beq L4E54 branch if unallocated buffer space.
stz buftbl-1,x take address out of buffer list.
stz buftbl-2,x (x was set up by getbufadr)
freebuf ldx bufaddrh get hi buffer address
inx add 4 pages to account for 1k space.
inx
inx
inx
L4E43 dex drop to next lower page.
jsr cmembit get bit and position to memtable of
eor #$FF this page. invert mask.
and memmap,y mark address as free space.
sta memmap,y
cpx bufaddrh all pages freed ?
bne L4E43 no.
L4E54 clc no error.
rts
* calculate memory allocation bit position.
* on entry: x = high address of buffer, low address assumed zero.
* on exit: acc = allocation bit mask, x = unchanged, y = pointer to memtabl byte
cmembit txa page address
and #$07 which page in any 2k set ?
tay use as index to determine
lda whichbit,y bit position representation.
pha save bit position mask for now.
txa page address.
lsr
lsr determine 2k set
lsr
tay return it in y.
pla restore bit mask. return bit position
rts in a & y, pointer to memtabl in x.
valdbuf lda usrbuf+1 high address of user's buffer
cmp #$02 must be greater than page 2.
bcc L4E1E report bad buffer
ldx cbytes+1
lda cbytes get cbytes-1 value.
sbc #$01 (carry is set)
bcs L4E76
dex
L4E76 clc
adc usrbuf calculate end of request address.
txa do high address.
adc usrbuf+1 the final address
tax must be less than $BFnn (globals)
cpx #$BF
bcs L4E1E report bad buffer.
inx loop thru all affected pages.
vldbuf1 dex check next lower page.
jsr cmembit
and memmap,y if 0 then no conflict.
bne L4E1E branch if conflict.
cpx usrbuf+1 was that the last (lowest) page ?
bne vldbuf1 if not.
clc all pages ok.
rts
getbuf ldy #$02 give user address of file buffer referenced by refnum.
lda bufaddrl
sta (A3L),y
iny
lda bufaddrh
sta (A3L),y
clc no errors possible
rts
setbuf ldy #$03
jsr alcbufr1 allocate new buffer address over old one
bcs L4EC7 report any errors immediately
lda bufaddrh
sta usrbuf+1
lda bufaddrl
sta usrbuf
jsr freebuf free address space of old buffer
ldy #$00
ldx #$03
L4EB8 lda (usrbuf),y move all 4 pages of the buffer to
sta (datptr),y new location.
iny
bne L4EB8
inc datptr+1
inc usrbuf+1
dex
bpl L4EB8
clc no errors
L4EC7 rts
* move 3 pages of dispatcher from 'displc2' to 'dispadr'
* this move routine must be resident above $E000 at all times
calldisp lda RRAMWRAMBNK2 read/write RAM bank 2
lda RRAMWRAMBNK2
lda /dispadr
sta A2L+1
lda #dispadr
sta A2L
lda /displc2
sta A1L+1
stz A1L
ldy #$00
ldx #$03 3 pages to move.
L4EE0 dey move a page of code.
lda (A1L),y
sta (A2L),y
tya
bne L4EE0
inc A1L+1 pointers to next page
inc A2L+1
dex move all pages needed
bne L4EE0
lda RRAMWRAMBNK1 read/write RAM bank 1
lda RRAMWRAMBNK1 swap mli space back in
stz mliact MLI active flag
stz softev
lda /dispadr point RESET to dispatch entry
sta softev+1
eor #$A5
sta pwredup power up byte
jmp dispadr
* translate a prodos call into a smartport call
* to access unseen smartport devices
remap_sp ldx #$03 assume 3 parameters.
lda A4L command number
sta cmdnum
bne L4F1B taken if not status call
ldy #spstatlist set up memory for the status list buffer
sty buf fake up the prodos parameters
ldy /spstatlist
sty buf+1
stz bloknml set statcode = 0 for simple status call
L4F1B cmp #$03 format command ?
bne L4F21 no.
ldx #$01 format has only 1 parameter.
L4F21 stx statparms set # of parms.
lda unitnum
lsr turn unit number into an index
lsr
lsr
lsr
tax
lda spunit-1,x get the smartport unit number and
sta sp_unitnum store into smartport parm list.
lda spvectlo-1,x
sta sp_vector+1 copy smartport entry address
lda spvecthi-1,x
sta sp_vector+2
ldx #$04 copy buffer pointer and block #
L4F3F lda buf-1,x from prodos parameters
sta sp_bufptr-1,x to smartport parameter block
dex
bne L4F3F
sp_vector jsr $0000 smartport call (entry address gets modified)
cmdnum .HS 00 command #
.DA statparms
bcs L4F6E
ldx cmdnum status call ?
bne L4F6E no...
ldx spstatlist+1 else get the block count
ldy spstatlist+2
lda spstatlist get the returned status.
bit #$10 is there a disk present ?
bne L4F65 yes, check for write protected.
lda #$2F return offline error.
bra L4F6D
L4F65 and #$44 mask all but write allowed and write
eor #$40 protected bits. if allowed and not
beq L4F6E protected, exit with carry clear
lda #$2B else return write protected error.
L4F6D sec
L4F6E rts
spvectlo .HS 0000000000000000 storage for low byte of smartport entry.
.HS 00000000000000
spvecthi .HS 0000000000000000 storage for high byte of smartport entry.
.HS 00000000000000
statparms .HS 03 # of parms (always 3 except format)
sp_unitnum .HS 00 unit number
sp_bufptr .HS 0000 data buffer
.HS 000000 block number (3 bytes)
* data tables
scnums .HS D3000000 table of valid mli command numbers.
.HS 40410000808182
.HS 65C0C1C2C3C4C5C6
.HS C7C8C9CACBCCCDCE
.HS CF00D0D1D2
pcntbl .HS 02FFFF parameter counts for the calls
.HS FF0201FFFF030300
.HS 04070102070A0201
.HS 0103030404010102
.HS 02FF020202
* command table
cmdtable .DA create
.DA destroy
.DA rename
.DA setinfo
.DA getinfo
.DA online
.DA setprefx
.DA getprefx
.DA openf
.DA newline
.DA readf
.DA writef
.DA closef
.DA flushf
.DA setmark
.DA getmark
.DA seteof
.DA geteof
.DA setbuf
.DA getbuf
* corresponding command function bytes
disptch .HS A0A1A2A3
.HS 84050607
.HS 88494A4B
.HS 2C2D4E4F
.HS 50515253
dinctbl .HS 0100000200 table to increment directory usage/eof counts
pass .HS 75
xdosver .HS 00
compat .HS 00
.HS C3270D000000
rootstuf .HS 0F02000400000800
whichbit .HS 8040201008040201
ofcbtbl .HS 0C0D1819151617
inftabl .HS 1E101F2080939421
.HS 22232418191A1B
deathmsg .HS 20
.AS -"RESTART SYSTEM-$01"
.HS 20
*** work space ***
* note: this area is accessed by code that depends on the order of these
* variables in the file control block and temporary directory.
own_blk .HS 0000
own_ent .HS 00
own_len .HS 00
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
d_dev .HS 00 device number of this directory entry
d_head .HS 0000 address of <sub> directory header
d_entblk .HS 0000 address of block which contains entry
d_entnum .HS 00 entry number within block
d_stor .HS 0000000000000000 file name
.HS 0000000000000000
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
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
vcbptr .HS 00
fcbptr .HS 00
fcbflg .HS 00
reql .HS 00
reqh .HS 00
levels .HS 00
totent .HS 00
entcntl .HS 00
entcnth .HS 00
cntent .HS 00
nofree .HS 00
bmcnt .HS 00
saptr .HS 00
pathcnt .HS 00
p_dev .HS 00
p_blok .HS 0000
bmptr .HS 00
basval .HS 00
half .HS 00
* bitmap info tables
bmastat .HS 00
bmadev .HS 00
bmadadr .HS 0000
bmacmap .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
duplflag .HS 00
vcbentry .HS 00
* xdos temporary variables
namcnt .HS 00
rnptr .HS 00
namptr .HS 00
vnptr .HS 00
prfxflg .HS 00
cferr .HS 00
* deallocation temporary variables
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
dealbufl .HS 0000000000000000
dealbufh .HS 0000000000000000
cbytes .HS 0000
.HS 00 cbytes+2 must = 0
bufaddrl .HS 00
bufaddrh .HS 00
goadr .HS 0000
delflag .HS 00 used by 'detree' to know if called from delete (destroy).
* zero fill to page boundary - 3 ($FEFD). so that cortland flag stays
* within page boundary.
.HS 00000000000000
.HS 0000000000
.DA calldisp
cortflag .HS 00 cortland flag. 1 = Cortland system (must stay within page boundary)
*--------------------------------------
MAN
SAVE USR/SRC/PRODOS.203/PRODOS.S.XDOS.F
LOAD USR/SRC/PRODOS.203/PRODOS.S

View File

@ -1,545 +0,0 @@
NEW
AUTO 3,1
* MEMMGR memory manager
*
* allocate buffer in memory tables
alcbuffr .EQ *-ofsX
ldy #$04 index to user specified buffer.
alcbufr1 .EQ *-ofsX
lda (A3L),y this buffer must be on a page boundary.
tax save for validation.
cmp #$08
bcc L4E1E cannot be lower than video !
cmp #$BC nor greater than $BB00
bcs L4E1E since it would wipe out globals...
sta datptr+1
dey
lda (A3L),y low address should be zero !
sta datptr
bne L4E1E error if not page boundary.
inx add 4 pages for 1k buffer.
inx
inx
inx
L4DED dex test for conflicts.
jsr cmembit test for free buffer space
and memmap,y P8 memory bitmap
bne L4E1E report memory conflict, if any.
cpx datptr+1 test all 4 pages.
bne L4DED
inx add 4 pages again for allocation.
inx
inx
inx
L4DFE dex set proper bits to 1
jsr cmembit
ora memmap,y to mark it's allocation.
sta memmap,y
cpx datptr+1 set all 4 pages
bne L4DFE
ldy fcbptr calculate buffer number
lda fcbbuf,y
asl buffer number = (entnum) * 2.
sta fcbbuf+11,y save it in fcb.
tax use entnum * 2 as index to global
lda datptr+1 buffer addr tables. get addr already
sta buftbl-1,x validated as good. store hi addr
clc (entnums start at 1, not 0)
rts
L4E1E lda #$56 buffer is in use or not legal
sec
rts
getbufadr .EQ *-ofsX
tax index into global buffer table.
lda buftbl-2,x
sta bufaddrl
lda buftbl-1,x
sta bufaddrh
rts
relbuffr .EQ *-ofsX preserve buffer address in 'bufaddr'
jsr getbufadr
tay returns high buffer address in acc.
beq L4E54 branch if unallocated buffer space.
stz buftbl-1,x take address out of buffer list.
stz buftbl-2,x (x was set up by getbufadr)
freebuf .EQ *-ofsX
ldx bufaddrh get hi buffer address
inx add 4 pages to account for 1k space.
inx
inx
inx
L4E43 dex drop to next lower page.
jsr cmembit get bit and position to memtable of
eor #$FF this page. invert mask.
and memmap,y mark address as free space.
sta memmap,y
cpx bufaddrh all pages freed ?
bne L4E43 no.
L4E54 clc no error.
rts
* calculate memory allocation bit position.
* on entry: x = high address of buffer, low address assumed zero.
* on exit: acc = allocation bit mask, x = unchanged, y = pointer to memtabl byte
cmembit .EQ *-ofsX
txa page address
and #$07 which page in any 2k set ?
tay use as index to determine
lda whichbit,y bit position representation.
pha save bit position mask for now.
txa page address.
lsr
lsr determine 2k set
lsr
tay return it in y.
pla restore bit mask. return bit position
rts in a & y, pointer to memtabl in x.
valdbuf .EQ *-ofsX
lda usrbuf+1 high address of user's buffer
cmp #$02 must be greater than page 2.
bcc L4E1E report bad buffer
ldx cbytes+1
lda cbytes get cbytes-1 value.
sbc #$01 (carry is set)
bcs L4E76
dex
L4E76 clc
adc usrbuf calculate end of request address.
txa do high address.
adc usrbuf+1 the final address
tax must be less than $BFnn (globals)
cpx #$BF
bcs L4E1E report bad buffer.
inx loop thru all affected pages.
vldbuf1 .EQ *-ofsX
L4E82 dex check next lower page.
jsr cmembit
and memmap,y if 0 then no conflict.
bne L4E1E branch if conflict.
cpx usrbuf+1 was that the last (lowest) page ?
bne L4E82 if not.
clc all pages ok.
rts
getbuf .EQ *-ofsX give user address of file buffer
ldy #$02 referenced by refnum.
lda bufaddrl
sta (A3L),y
iny
lda bufaddrh
sta (A3L),y
clc no errors possible
rts
setbuf .EQ *-ofsX
ldy #$03
jsr alcbufr1 allocate new buffer address over old one
bcs L4EC7 report any errors immediately
lda bufaddrh
sta usrbuf+1
lda bufaddrl
sta usrbuf
jsr freebuf free address space of old buffer
ldy #$00
ldx #$03
L4EB8 lda (usrbuf),y move all 4 pages of the buffer to
sta (datptr),y new location.
iny
bne L4EB8
inc datptr+1
inc usrbuf+1
dex
bpl L4EB8
clc no errors
L4EC7 rts
* move 3 pages of dispatcher from 'displc2' to 'dispadr'
* this move routine must be resident above $E000 at all times
calldisp .EQ *-ofsX
lda RRAMWRAMBNK2 read/write RAM bank 2
lda RRAMWRAMBNK2
lda /dispadr
sta A2L+1
lda #dispadr
sta A2L
lda /displc2
sta A1L+1
stz A1L
ldy #$00
ldx #$03 3 pages to move.
L4EE0 dey move a page of code.
lda (A1L),y
sta (A2L),y
tya
bne L4EE0
inc A1L+1 pointers to next page
inc A2L+1
dex move all pages needed
bne L4EE0
lda RRAMWRAMBNK1 read/write RAM bank 1
lda RRAMWRAMBNK1 swap mli space back in
stz mliact MLI active flag
stz softev
lda /dispadr point RESET to dispatch entry
sta softev+1
eor #$A5
sta pwredup power up byte
jmp dispadr
* translate a prodos call into a smartport call
* to access unseen smartport devices
remap_sp .EQ *-ofsX
ldx #$03 assume 3 parameters.
lda A4L command number
sta cmdnum
bne L4F1B taken if not status call
ldy #spstatlist set up memory for the status list buffer
sty buf fake up the prodos parameters
ldy /spstatlist
sty buf+1
stz bloknml set statcode = 0 for simple status call
L4F1B cmp #$03 format command ?
bne L4F21 no.
ldx #$01 format has only 1 parameter.
L4F21 stx statparms set # of parms.
lda unitnum
lsr turn unit number into an index
lsr
lsr
lsr
tax
lda spunit-1,x get the smartport unit number and
sta sp_unitnum store into smartport parm list.
lda spvectlo-1,x
sta sp_vector+1 copy smartport entry address
lda spvecthi-1,x
sta sp_vector+2
ldx #$04 copy buffer pointer and block #
L4F3F lda buf-1,x from prodos parameters
sta sp_bufptr-1,x to smartport parameter block
dex
bne L4F3F
sp_vector .EQ *-ofsX smartport call
jsr $0000 (entry address gets modified)
cmdnum .EQ *-ofsX
.HS 00 command #
.DA statparms
bcs L4F6E
ldx cmdnum status call ?
bne L4F6E no...
ldx spstatlist+1 else get the block count
ldy spstatlist+2
lda spstatlist get the returned status.
bit #$10 is there a disk present ?
bne L4F65 yes, check for write protected.
lda #$2F return offline error.
bra L4F6D
L4F65 and #$44 mask all but write allowed and write
eor #$40 protected bits. if allowed and not
beq L4F6E protected, exit with carry clear
lda #$2B else return write protected error.
L4F6D sec
L4F6E rts
spvectlo .EQ *-ofsX storage for low byte of smartport
.HS 0000000000000000 entry.
.HS 00000000000000
spvecthi .EQ *-ofsX storage for high byte of smartport
.HS 0000000000000000 entry.
.HS 00000000000000
statparms .EQ *-ofsX # of parms (always 3 except format)
.HS 03
sp_unitnum .EQ *-ofsX
.HS 00 unit number
sp_bufptr .EQ *-ofsX
.HS 0000 data buffer
.HS 000000 block number (3 bytes)
* data tables
scnums .EQ *-ofsX table of valid mli command numbers.
.HS D3000000
.HS 40410000808182
.HS 65C0C1C2C3C4C5C6
.HS C7C8C9CACBCCCDCE
.HS CF00D0D1D2
pcntbl .EQ *-ofsX parameter counts for the calls
.HS 02FFFF
.HS FF0201FFFF030300
.HS 04070102070A0201
.HS 0103030404010102
.HS 02FF020202
* command table
cmdtable .EQ *-ofsX
.DA create
.DA destroy
.DA rename
.DA setinfo
.DA getinfo
.DA online
.DA setprefx
.DA getprefx
.DA openf
.DA newline
.DA readf
.DA writef
.DA closef
.DA flushf
.DA setmark
.DA getmark
.DA seteof
.DA geteof
.DA setbuf
.DA getbuf
* corresponding command function bytes
disptch .EQ *-ofsX
.HS A0A1A2A3
.HS 84050607
.HS 88494A4B
.HS 2C2D4E4F
.HS 50515253
dinctbl .EQ *-ofsX table to increment
.HS 0100000200 directory usage/eof counts
pass .EQ *-ofsX
.HS 75
xdosver .EQ *-ofsX
.HS 00
compat .EQ *-ofsX
.HS 00
.HS C3270D000000
rootstuf .EQ *-ofsX
.HS 0F02000400000800
whichbit .EQ *-ofsX
.HS 8040201008040201
ofcbtbl .EQ *-ofsX
.HS 0C0D1819151617
inftabl .EQ *-ofsX
.HS 1E101F2080939421
.HS 22232418191A1B
deathmsg .EQ *-ofsX
.HS 20
.AS -"RESTART SYSTEM-$01"
.HS 20
*** work space ***
* note: this area is accessed by code that depends on the order of these
* variables in the file control block and temporary directory.
own_blk .EQ *-ofsX
.HS 0000
own_ent .EQ *-ofsX
.HS 00
own_len .EQ *-ofsX
.HS 00
h_credt .EQ *-ofsX
.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 .EQ *-ofsX attributes (protect bit, etc.)
.HS 00
h_entln .EQ *-ofsX length of each entry in this directory
.HS 00
h_maxent .EQ *-ofsX maximum number of entries per block
.HS 00
h_fcnt .EQ *-ofsX current # of files in this directory
.HS 0000
h_bmap .EQ *-ofsX address of first allocation bitmap
.HS 0000
h_tblk .EQ *-ofsX total number of blocks on this unit
.HS 0000
d_dev .EQ *-ofsX device number of this directory entry
.HS 00
d_head .EQ *-ofsX address of <sub> directory header
.HS 0000
d_entblk .EQ *-ofsX address of block which contains entry
.HS 0000
d_entnum .EQ *-ofsX entry number within block
.HS 00
d_stor .EQ *-ofsX
.HS 0000000000000000 file name
.HS 0000000000000000
d_filid .EQ *-ofsX user's identification byte
.HS 00
d_frst .EQ *-ofsX first block of file
.HS 0000
d_usage .EQ *-ofsX # of blocks allocated to this file
.HS 0000
d_eof .EQ *-ofsX current end of file marker
.HS 000000
d_credt .EQ *-ofsX
.HS 0000 file creation date
.HS 0000 file creation time
d_sosver .EQ *-ofsX sos version that created this file
.HS 00
d_comp .EQ *-ofsX backward version compatibility
.HS 00
d_attr .EQ *-ofsX attributes (protect, r/w, enable, etc.)
.HS 00
d_auxid .EQ *-ofsX user auxilliary identification
.HS 0000
d_moddt .EQ *-ofsX
.HS 0000 file's last modification date
.HS 0000 file's last modification time
d_dhdr .EQ *-ofsX file directory header block address
.HS 0000
scrtch .EQ *-ofsX scratch area for
.HS 00000000 allocation address conversion.
oldeof .EQ *-ofsX temp used in r/w
.HS 000000
oldmark .EQ *-ofsX
.HS 000000
xvcbptr .EQ *-ofsX used in 'cmpvcb' as a temp
.HS 00
vcbptr .EQ *-ofsX
.HS 00
fcbptr .EQ *-ofsX
.HS 00
fcbflg .EQ *-ofsX
.HS 00
reql .EQ *-ofsX
.HS 00
reqh .EQ *-ofsX
.HS 00
levels .EQ *-ofsX
.HS 00
totent .EQ *-ofsX
.HS 00
entcntl .EQ *-ofsX
.HS 00
entcnth .EQ *-ofsX
.HS 00
cntent .EQ *-ofsX
.HS 00
nofree .EQ *-ofsX
.HS 00
bmcnt .EQ *-ofsX
.HS 00
saptr .EQ *-ofsX
.HS 00
pathcnt .EQ *-ofsX
.HS 00
p_dev .EQ *-ofsX
.HS 00
p_blok .EQ *-ofsX
.HS 0000
bmptr .EQ *-ofsX
.HS 00
basval .EQ *-ofsX
.HS 00
half .EQ *-ofsX
.HS 00
* bitmap info tables
bmastat .EQ *-ofsX
.HS 00
bmadev .EQ *-ofsX
.HS 00
bmadadr .EQ *-ofsX
.HS 0000
bmacmap .EQ *-ofsX
.HS 00
tposll .EQ *-ofsX
.HS 00
tposlh .EQ *-ofsX
.HS 00
tposhi .EQ *-ofsX
.HS 00
rwreql .EQ *-ofsX
.HS 00
rwreqh .EQ *-ofsX
.HS 00
nlchar .EQ *-ofsX
.HS 00
nlmask .EQ *-ofsX
.HS 00
ioaccess .EQ *-ofsX has a call been made to
.HS 00 disk device handler ?
cmdtemp .EQ *-ofsX
.HS 00
bkbitflg .EQ *-ofsX used to set or clear backup bit
.HS 00
duplflag .EQ *-ofsX
.HS 00
vcbentry .EQ *-ofsX
.HS 00
* xdos temporary variables
namcnt .EQ *-ofsX
.HS 00
rnptr .EQ *-ofsX
.HS 00
namptr .EQ *-ofsX
.HS 00
vnptr .EQ *-ofsX
.HS 00
prfxflg .EQ *-ofsX
.HS 00
cferr .EQ *-ofsX
.HS 00
* deallocation temporary variables
firstbl .EQ *-ofsX
.HS 00
firstbh .EQ *-ofsX
.HS 00
stortyp .EQ *-ofsX
.HS 00
deblock .EQ *-ofsX
.HS 0000
dtree .EQ *-ofsX
.HS 00
dsap .EQ *-ofsX
.HS 00
dseed .EQ *-ofsX
.HS 0000
topdest .EQ *-ofsX
.HS 00
dtmpx .EQ *-ofsX
.HS 00
loklst .EQ *-ofsX look list of recognized device numbers
dealbufl .EQ *-ofsX
.HS 0000000000000000
dealbufh .EQ *-ofsX
.HS 0000000000000000
cbytes .EQ *-ofsX
.HS 0000
.HS 00 cbytes+2 must = 0
bufaddrl .EQ *-ofsX
.HS 00
bufaddrh .EQ *-ofsX
.HS 00
goadr .EQ *-ofsX
.HS 0000
delflag .EQ *-ofsX used by 'detree' to know if called
.HS 00 from delete (destroy).
* zero fill to page boundary - 3 ($FEFD). so that cortland flag stays
* within page boundary.
.HS 00000000000000
.HS 0000000000
.DA calldisp
cortflag .EQ *-ofsX cortland flag. 1 = Cortland system
.HS 00 (must stay within page boundary)
* end of obj mli_2
*--------------------------------------
MAN
SAVE USR/SRC/PRODOS.203/PRODOS.S.XDOS.M
LOAD USR/SRC/PRODOS.203/PRODOS.S
ASM

View File

@ -159,7 +159,6 @@ fcbbuf .EQ $D800 fcb buffer
vcbbuf .EQ $D900 vcb buffer
bmbuf .EQ $DA00 512 byte bitmap buffer
gbuf .EQ $DC00 general purpose 512 byte block buffer
xdosorg .EQ $DE00 xdos MLI in aux memory
*--------------------------------------
* $2000 mli_0 mli loader/relocator
* $2C80 ram_1 installer for /RAM
@ -175,10 +174,8 @@ xdosorg .EQ $DE00 xdos MLI in aux memory
* $5D00 sel_1 enhanced quit code (Bird's Better Bye)
* $6000 sel_2 GQuit dispatcher support
*--------------------------------------
.INB USR/SRC/PRODOS.203/PRODOS.S.LDR.A
.INB USR/SRC/PRODOS.203/PRODOS.S.LDR.B
.INB USR/SRC/PRODOS.203/PRODOS.S.RAMI
RAM .PH $FF00
.INB USR/SRC/PRODOS.203/PRODOS.S.RAM
@ -207,7 +204,6 @@ XDOS .PH $DE00
.INB USR/SRC/PRODOS.203/PRODOS.S.XDOS.D
.INB USR/SRC/PRODOS.203/PRODOS.S.XDOS.E
.INB USR/SRC/PRODOS.203/PRODOS.S.XDOS.F
.INB USR/SRC/PRODOS.203/PRODOS.S.XDOS.M
.EP
RAMX .PH $200

File diff suppressed because it is too large Load Diff