Kernel 0.93+

This commit is contained in:
Rémy GIBERT 2019-11-08 08:35:08 +01:00
parent 8f0ef5bbd2
commit bb6916c347
4 changed files with 215 additions and 349 deletions

Binary file not shown.

Binary file not shown.

View File

@ -21,8 +21,7 @@ LDR.MSG.IIgs .AT "IIgs"
LDR.MSG.Unknown .AT "Unknown" LDR.MSG.Unknown .AT "Unknown"
LDR.MSG.CLK .AT "Clk" LDR.MSG.CLK .AT "Clk"
LDR.MSG.RAM .AT "/RAM" LDR.MSG.RAM .AT "/RAM"
LDR.MSG.ROOTERR .AS -"Unable To read ROOT dir." LDR.MSG.ROOTERR .AT "ERR reading CATALOG"
LDR.MSG.ROOTERR.LEN .EQ *-LDR.MSG.ROOTERR
*-------------------------------------- *--------------------------------------
p16start inc LDR.BootFlag set = 2 for GQuit rts p16start inc LDR.BootFlag set = 2 for GQuit rts
atalkset inc LDR.BootFlag set = 1 for appletalk rts atalkset inc LDR.BootFlag set = 1 for appletalk rts
@ -87,8 +86,7 @@ prostart lda unitnum
lda auxsp lda auxsp
bne LDR.UNSUPP.HW NO 128k bne LDR.UNSUPP.HW NO 128k
LDR.CheckROM stz cortland LDR.CheckROM ldx #LDR.MSG.IIE
ldx #LDR.MSG.IIE
lda #MACHID.T.IIe+MACHID.M.128+MACHID.COL80 lda #MACHID.T.IIe+MACHID.M.128+MACHID.COL80
ldy $FBB3 check hardware id ldy $FBB3 check hardware id
@ -126,15 +124,15 @@ LDR.CheckROM stz cortland
jsr $FE1F //gs ???? jsr $FE1F //gs ????
bcs m128k no..... bcs m128k no.....
inc cortland inc LDR.cortland
ldx #LDR.MSG.IIGS ldx #LDR.MSG.IIGS
lda #MACHID.T.IIe+MACHID.M.128+MACHID.COL80+MACHID.CLK lda #MACHID.T.IIe+MACHID.M.128+MACHID.COL80+MACHID.CLK
bra m128k bra m128k
LDR.UNSUPP.HW ldx #LDR.MSG.UNSUPP LDR.UNSUPP.HW ldx #LDR.MSG.UNSUPP
jsr LDR.PrintX jsr LDR.PrintX
bmi * bra *
*--------------------------------------
m128k sta idapple Save MACHID in temp location m128k sta idapple Save MACHID in temp location
sta SETALTCHAR sta SETALTCHAR
@ -248,22 +246,20 @@ LDR.IRQ lda RROMWRAMBNK2
lda idapple lda idapple
sta MACHID sta MACHID
lda cortland lda LDR.cortland
beq LDR.II branch if // family beq LDR.II branch if // family
*--------------------------------------
LDR.IIGS LDR.IIGS sta cortflag
* lda RROMWRAMBNK2
* stz vmode force setvid to reset cursor
* jsr setvid reset output to screen
lda #calldisp lda #calldisp
sta cortdisp sta cortdisp
lda /calldisp lda /calldisp
sta cortdisp+1 sta cortdisp+1
lda #1
sta cortflag * lda RROMWRAMBNK2
* stz vmode force setvid to reset cursor
* jsr setvid reset output to screen
* jsr lc1in set language card bank 1 to r/w * jsr lc1in set language card bank 1 to r/w
@ -286,135 +282,32 @@ LDR.IIGS
ldx PAKME.SEL2 ldx PAKME.SEL2
ldy PAKME.SEL2+1 ldy PAKME.SEL2+1
jsr LDR.SetupQC jsr LDR.SetupQC
*--------------------------------------
lda LDR.BootFlag lda LDR.BootFlag
bne .1 branch if prodos 8 alone bne .1 branch if prodos 8 alone
* running from gs/os shell so zero out os_boot for appletalk * running from gs/os shell so zero out os_boot for appletalk
sta OS_BOOT indicates O/S initially booted. stz OS_BOOT indicates O/S initially booted.
jsr patch101 patch for gs/os - rev note #101 jsr patch101 patch for gs/os - rev note #101
.1 jmp BLKDEV.Install .1 bra LDR.Common
*-------------------------------------- *--------------------------------------
LDR.II ldx PAKME.SEL1 LDR.II ldx PAKME.SEL1
ldy PAKME.SEL1+1 ldy PAKME.SEL1+1
jsr LDR.SetupQC jsr LDR.SetupQC
* check for a rom in slot 3. if no rom, use internal $C300 firmware jsr LDR.ClkDevScan
sta CLRC3ROM
lda rommap slot ROM bit map
and #$08 mask all but slot 3
bne isromin3 taken if rom in slot 3
bra CLK.Install else continue booting
* found a rom in slot 3. is it an external, identifiable 80 col card
* with interrupt routines? if so, enable it else use internal $C300 firmware.
isromin3 sta SETC3ROM
lda $C305 check card id bytes
cmp #$38
bne hitswtch not terminal card
lda $C307
cmp #$18
bne hitswtch
lda $C30B
cmp #$01
bne hitswtch
lda $C30C is it an apple 80 col compatible card?
and #$F0
cmp #$80
bne hitswtch if not.
lda $C3FA
cmp #$2C does card have an interrupt handler?
beq docard yes
hitswtch sta CLRC3ROM
* verify that the card in aux slot is actually present
sta SET80STORE
sta SETPAGE2
lda #$EE
sta txtp2
asl
asl txtp2
cmp txtp2
bne .1
lsr
lsr txtp2
cmp txtp2
.1 sta CLRPAGE2
sta CLR80STORE
beq docard branch if card is there
lda #MACHID.COL80
lda machid machine ID byte
trb MACHID clear 80-col bit 2 (no card)
bra CLK.Install
docard lda #MACHID.COL80
tsb MACHID turn bit 2 on (80-col card is present)
*-------------------------------------- *--------------------------------------
CLK.Install jsr LDR.ClkDevScan LDR.Common jsr LDR.BlkDevScan
*--------------------------------------
BLKDEV.Install jsr LDR.BlkDevScan
*--------------------------------------
jsr lc1in
ldx PAKME.RAM jsr LDR.SetupRAM
ldy PAKME.RAM+1
stx ZPInBufPtr
sty ZPInBufPtr+1
lda #$FF00
sta ZPOutBufPtr
lda /$FF00
sta ZPOutBufPtr+1
jsr X.Unpak
sta SETWRITEAUX
ldx PAKME.RAMX
ldy PAKME.RAMX+1
stx ZPInBufPtr
sty ZPInBufPtr+1
lda #$0200
sta ZPOutBufPtr
lda /$0200
sta ZPOutBufPtr+1
jsr X.Unpak
sta CLRWRITEAUX
lda #RAMDRV put driver address into
sta drivertbl2+6 slot 3, drive 2.
lda /RAMDRV
sta drivertbl2+7
inc GP.numdevs count (-1) active devices
ldx GP.numdevs
lda #$BF unit num of /RAM
sta devlist,x
ldx #LDR.MSG.RAM
jsr LDR.PrintX
*-------------------------------------- *--------------------------------------
lda LDR.BootFlag get setup entry point flag lda LDR.BootFlag get setup entry point flag
beq LDR.ReadRoot taken if normal boot. beq LDR.ReadRoot taken if normal boot.
lda RROMBNK2 lda RROMBNK2
rts return to caller at setup entry point. rts return to caller at setup entry point.
*--------------------------------------
LDR.BootFlag .DA #$00 0 = normal boot, <>0 = return
* set prefix to boot device
LDR.ReadRoot lda LDR.MLIOL.P+1 place boot devnum in globals LDR.ReadRoot lda LDR.MLIOL.P+1 place boot devnum in globals
sta devnum last device used sta devnum last device used
@ -426,6 +319,7 @@ LDR.ReadRoot lda LDR.MLIOL.P+1 place boot devnum in globals
lda pbuf+1 get volume name length. lda pbuf+1 get volume name length.
and #$0F strip devnum and #$0F strip devnum
beq .9 beq .9
inc add 1 for leading '/' inc add 1 for leading '/'
sta pbuf save prefix length. sta pbuf save prefix length.
lda #'/' place leading '/' in prefix buffer lda #'/' place leading '/' in prefix buffer
@ -469,64 +363,10 @@ LDR.ReadRoot lda LDR.MLIOL.P+1 place boot devnum in globals
.8 jmp $800 jmp to "load interpreter" code .8 jmp $800 jmp to "load interpreter" code
.9 sta RROMBNK2 .9 ldx #LDR.MSG.ROOTERR
jsr home jsr LDR.PrintX
ldy #LDR.MSG.ROOTERR-1
.91 lda LDR.MSG.ROOTERR,y
sta vline12+4,y
dey
bpl .91
bmi * bmi *
*-------------------------------------- *--------------------------------------
LDR.PrintA ldy LDR.Print.CX
and #$7F
cmp #$60
bcs .2
and #$3F
.2 sta $400,y
inc LDR.Print.CX
rts
*--------------------------------------
LDR.PrintX ldy LDR.Print.CX
.1 lda $2000,x
pha
and #$7F
cmp #$60
bcs .2
and #$3F
.2 sta $400,y
inx
iny
pla
bpl .1
* lda #$20
* sta $400,y
iny Add a Space
sty LDR.Print.CX
rts
LDR.Print.CX .HS 00
*--------------------------------------
LDR.MLIOL.P .DA #2
.DA #$60
.DA pbuf+1
LDR.MLISETP.P .DA #1
.DA pbuf
.DO READCAT=1
LDR.MLIRB.P .DA #3
.DA #0 unit number
.DA 0 2 byte data buffer
.DA 0 2 byte block number
.FIN
cortland .BS 1 cortland loader flag (1 = Cortland)
*--------------------------------------
LDR.SetupQC bit RRAMWRAMBNK2 read/write RAM bank 2 LDR.SetupQC bit RRAMWRAMBNK2 read/write RAM bank 2
bit RRAMWRAMBNK2 bit RRAMWRAMBNK2
@ -544,7 +384,6 @@ LDR.SetupQC bit RRAMWRAMBNK2 read/write RAM bank 2
*-------------------------------------- *--------------------------------------
DS1216E.DATA1 .EQ $10 DS1216E.DATA1 .EQ $10
DS1216E.DATA2 .EQ A1L DS1216E.DATA2 .EQ A1L
DS1216E.SIG .HS 5CA33AC55CA33AC5 Reverted 7->0
*-------------------------------------- *--------------------------------------
LDR.ClkDevScan php LDR.ClkDevScan php
sei sei
@ -620,8 +459,8 @@ LDR.ClkDevScan php
lda #'N' lda #'N'
ldx PAKME.NCLK ldx PAKME.NCLK
ldy PAKME.NCLK+1 ldy PAKME.NCLK+1
jmp LDR.SetupCLK bra LDR.SetupCLK
*--------------------------------------
LDR.ClkDevTCLK lda CLRC8ROM switch out $C8 ROMs LDR.ClkDevTCLK lda CLRC8ROM switch out $C8 ROMs
stz idxl stz idxl
@ -674,87 +513,106 @@ LDR.SetupCLK stx ZPInBufPtr
LDR.SetupCLK.RTS LDR.SetupCLK.RTS
rts rts
*-------------------------------------- *--------------------------------------
* find all disk devices in system slots and set up address LDR.SetupRAM jsr lc1in
* and device table in prodos global page. if there is a disk
* card in slot 2 then limit the # of devices in slot 5 ldx PAKME.RAM
* smartport to only 2 ldy PAKME.RAM+1
stx ZPInBufPtr
sty ZPInBufPtr+1
lda #$FF00
sta ZPOutBufPtr
lda /$FF00
sta ZPOutBufPtr+1
jsr X.Unpak
sta SETWRITEAUX
ldx PAKME.RAMX
ldy PAKME.RAMX+1
stx ZPInBufPtr
sty ZPInBufPtr+1
lda #$0200
sta ZPOutBufPtr
lda /$0200
sta ZPOutBufPtr+1
jsr X.Unpak
sta CLRWRITEAUX
lda #RAMDRV put driver address into
sta drivertbl2+6 slot 3, drive 2.
lda /RAMDRV
sta drivertbl2+7
inc GP.numdevs count (-1) active devices
ldx GP.numdevs
lda #$BF unit num of /RAM
sta devlist,x
ldx #LDR.MSG.RAM
jmp LDR.PrintX
*-------------------------------------- *--------------------------------------
LDR.BlkDevScan stz dst * find all disk devices in system slots and set up address
stz dst+1 * and device table in prodos global page.
stz idxl *--------------------------------------
ldx #$FF init to no active devices. LDR.BlkDevScan stz idxl
stx GP.numdevs count (-1) active devices.
lda #$0E start disk // area at end of devlist.
sta d2idx
* check slot 2. if there is a disk card then clear the msb of diskins2. this
* will limit the # of devices in any slot 5 spartport card to 2.
lda #$C2
sta idxl+1 check slot 2
jsr cmpid is there a disk in slot 2 ?
ror diskins2 if so, clear msb else set it.
lda #$C7 search slots from high to low lda #$C7 search slots from high to low
sta idxl+1 sta idxl+1
H26AB jsr cmpid .1 jsr cmpid
bcs H270C if no ProDOS device in this slot. bcs .8 if no ProDOS device in this slot.
ldy #$ff
lda (idxl),y check last byte of $Cn rom (y = $ff) lda (idxl),y check last byte of $Cn rom (y = $ff)
beq diskii branch if 16 sector disk II. bne .2 branch if 16 sector disk II.
cmp #$FF if = $FF then 13 sector disk II.
bcs H270C ignore if 13 sector boot ROM
sta driveradr else assume it's an intelligent disk.
ldy #$07 check for a smartport device.
lda (idxl),y
bne H26C4 no smartport
jmp smartprt
H26C4 ldy #$FE sta devid =0 since disk ii's have null attributes
lda (idxl),y get attributes.
and #$03 verify it provides read and status calls.
cmp #$03
sec assume it's an off-brand disk
bne H270C
jsr setdevid set up the devid byte from attributes
clc
php remember that it's not a disk //.
lsr move # of units (0=1, 1=2) to carry.
lda idxl+1 store hi entry addr (low already done)
bne H26E6 branch always.
diskii sta devid =0 since disk ii's have null attributes
sec
php remember it's a disk //
lda #RWTS lda #RWTS
sta driveradr sta driveradr
lda /RWTS lda /RWTS
sec 2 devices
jsr installdev
bra .8
.2 cmp #$FF if = $FF then 13 sector disk II.
beq .8 ignore if 13 sector boot ROM
ldy #$07 check for a smartport device.
lda (idxl),y
bne .2 no smartport
jsr smartprt
bra .8
.2 ldy #$FE BLK device...
lda (idxl),y get attributes.
and #$03 verify it provides read and status calls.
cmp #$03
bne .7 assume it's an off-brand disk
jsr setdevid set up the devid byte from attributes
clc
php remember that it's not a disk //.
lsr move # of units (0=1, 1=2) to carry.
lda idxl+1 store hi entry addr (low already done)
sta driveradr+1
H26E6 sta driveradr+1
jsr installdev install 1 or 2 devices from this slot. jsr installdev install 1 or 2 devices from this slot.
plp get back if it's a disk // (carry).
bcc nxtdsk2 if not disk //.
dex move the list pointer back by 2 devices .7 lda idxl+1 mark a bit in slot byte
dex and #$07 to indicate rom present.
stx GP.numdevs count (-1) active devices tax
dec d2idx increase the disk two index lda sltbit,x
dec d2idx tsb rommap mark bit to flag rom present
ldy d2idx
inx adj since device count starts with $FF.
lda devlist+1,x get entries for disk //
sta devlist,y move then toward the end of the list
lda devlist,x
sta devlist+1,y
dex back to GP.numdevs again
nxtdsk2 clc .8 dec idxl+1 next lower slot.
H270C jsr sltrom test for ROM in given slot and set flags
dec idxl+1 next lower slot.
lda idxl+1 lda idxl+1
and #$07 have all slots been checked ? and #$07 have all slots been checked ?
bne H26AB no. bne .1
* perform the new device search, mapping unmounted smartport devices * perform the new device search, mapping unmounted smartport devices
* to empty slots in the device table. * to empty slots in the device table.
@ -765,10 +623,6 @@ H270C jsr sltrom test for ROM in given slot and set flags
* start by making the device count include disk //'s * start by making the device count include disk //'s
ldx GP.numdevs current device count - 1 ldx GP.numdevs current device count - 1
lda #$0E
sec
sbc d2idx
beq H2747 if there were no disk //'s then done.
clc clc
adc GP.numdevs sum of disk //'s and others. adc GP.numdevs sum of disk //'s and others.
@ -782,11 +636,6 @@ H272F lda devlist,y
sta devlist,y sta devlist,y
pla pla
sta devlist,x sta devlist,x
inx
dey
sty d2idx use as a temp
cpx d2idx
bcc H272F continue until indexes cross
H2747 ldy #$00 H2747 ldy #$00
ldx GP.numdevs now change the device order so that ldx GP.numdevs now change the device order so that
@ -799,6 +648,7 @@ H274C lda devlist,x the boot device will have highest
bne H275A bne H275A
pla pla
iny iny
H275A dex H275A dex
bpl H274C bpl H274C
@ -829,45 +679,22 @@ stadrv ora devid combine with attributes.
sta devlist,x sta devlist,x
asl now form drive 2 device number, if any. asl now form drive 2 device number, if any.
rts rts
*--------------------------------------
sltrom bcc H27F3 branch if disk drive
* test for any other rom
H27E4 ldx #$00
lda (idxl)
cmp #$FF apple /// non-slot?
beq H2801 invalid rom
H27EC cmp (idxl) look for floating bus
bne H2801 no rom
inx
bne H27EC
H27F3 lda idxl+1 mark a bit in slot byte
and #$07 to indicate rom present.
tax
lda sltbit,x
ora rommap mark bit to flag rom present
sta rommap slot ROM bit map
H2801 rts
* id bytes: evens for clock, odds for disk
dskid .HS 082028005803703C
* slot bits
sltbit .HS 0002040810204080
installdev php how many drives (carry). installdev php how many drives (carry).
lda idxl+1 get index to global device table lda idxl+1 get index to global device table
and #$07 for this slot... and #$07 for this slot...
asl asl
tay into y reg. tay into y reg.
asl asl
asl now form device # = slot # asl now form device # = slot #
asl in high nibble. asl in high nibble.
jsr stadrv OR in low nibble, store in dev list. jsr stadrv OR in low nibble, store in dev list.
plp restore # of devices in carry. plp restore # of devices in carry.
ror if 2 drives, then bit 7=1. ror if 2 drives, then bit 7=1.
bpl .1 branch if a 1 drive device (e.g. hard drive) bpl .1 branch if a 1 drive device (e.g. hard drive)
inx else presume that 2nd drive is present. inx else presume that 2nd drive is present.
sta devlist,x active device list. sta devlist,x active device list.
@ -884,11 +711,11 @@ installdev php how many drives (carry).
sta drivertbl2+1,y sta drivertbl2+1,y
.3 rts .3 rts
*--------------------------------------
* query smartport status to determine # of devices * query smartport status to determine # of devices
* and install up to 4 units in table if card is in slot 5 * and install up to 4 units in table if card is in slot 5
* otherwise only 2 units. this includes a patch #74 * otherwise only 2 units. this includes a patch #74
*--------------------------------------
smartprt jsr setdevid setup the devid byte from attributes smartprt jsr setdevid setup the devid byte from attributes
lda idxl+1 lda idxl+1
sta driveradr+1 sta driveradr+1
@ -912,18 +739,13 @@ smartprt jsr setdevid setup the devid byte from attributes
lda #$10 lda #$10
sta buf+1 dummy pointer should be <> 0 sta buf+1 dummy pointer should be <> 0
* do a prodos status call patched in from above
pscall jsr $0000 self modifying code pscall jsr $0000 self modifying code
ldy #$FB ldy #$FB
lda (idxl),y check device id lda (idxl),y check device id
and #$02 SCSI? and #$02 SCSI?
beq .1 no, no need to init Cocoon beq .1 no, no need to init Cocoon
sta statunit device = 2 for SCSI sta statunit device = 2 for SCSI
* initialize SCSI Cocoon to build internal device tables
* and report true # of devices attached
jsr spvect status of Cocoon jsr spvect status of Cocoon
.HS 00 .HS 00
.DA spcparms ignore any errors. .DA spcparms ignore any errors.
@ -941,13 +763,6 @@ pscall jsr $0000 self modifying code
cmp #$C5 cmp #$C5
bne donesp if not slot 5 bne donesp if not slot 5
* for slot 5, if there is a disk card in slot 2
* then only install 2 devices otherwise map
* extra devices as slot 2
bit diskins2 disk in slot 2 ?
bpl donesp yes - so done
lda numdev2 lda numdev2
cmp #$03 carry set if 3,4,... cmp #$03 carry set if 3,4,...
bcc donesp bcc donesp
@ -959,8 +774,8 @@ pscall jsr $0000 self modifying code
lda #$C5 lda #$C5
sta idxl+1 sta idxl+1
donesp jmp nxtdsk2 it's a disk device. donesp rts
*--------------------------------------
setdevid ldy #$FE check attributes byte. setdevid ldy #$FE check attributes byte.
lda (idxl),y lda (idxl),y
@ -970,48 +785,27 @@ setdevid ldy #$FE check attributes byte.
lsr lsr
sta devid sta devid
rts rts
*--------------------------------------
* check unknown card to see if disk id = $Cn00:nn 20 nn 00 nn 03
cmpid lda CLRC8ROM switch out $C8 ROMs cmpid lda CLRC8ROM switch out $C8 ROMs
ldy #$05 ldy #$05
.1 lda (idxl),y compare id bytes .1 lda (idxl),y compare id bytes
cmp dskid,y cmp dskid,y
sec set if no disk card sec set if no disk card
bne .2 bne .2
dey dey
dey dey
bpl .1 loop until all 4 id bytes match. bpl .1 loop until all 4 id bytes match.
clc clear if disk card clc clear if disk card
.2 rts .2 rts
*--------------------------------------
* smartport call parameters
spcparms .DA #$03 # of parms
statunit .DA #$00 unit number (code for smartport stat)
.DA numdev2
.DA #00 status code (0 = general status)
* indexes into driver table
driveridx .DA #$06
.DA #$1E
.DA #$0E
.DA #$1C
.DA #$0C
.DA #$1A
.DA #$0A
.DA #$14
.DA #$04
.DA #$12
.DA #$02
.DA #$18
.DA #$08
* self modifying jmp = smartport entry address * self modifying jmp = smartport entry address
*--------------------------------------
spvect jmp $0000 self modifying spvect jmp $0000 self modifying
*--------------------------------------
newmount stz idxl newmount stz idxl
lda #$C7 start with slot 7 ($C700) lda #$C7 start with slot 7 ($C700)
sta idxl+1 sta idxl+1
@ -1040,15 +834,6 @@ H291F jsr H29EB is there a smartport device here?
inc add 1 for comparisons. inc add 1 for comparisons.
sta driveradr # of devices + 1. sta driveradr # of devices + 1.
lda #$03 start at unit #3 (non-slot 5)
ldx spvect+2
cpx #$C5 is this slot 5?
bne H295B no, start at 3.
bit diskins2 disk controller in slot 2?
bpl H295B yes, so allow remapping of s5 devices
lda #$05 else start looking at unit #5
* find block devices on this smartport * find block devices on this smartport
H295B cmp driveradr have we done all units in this slot? H295B cmp driveradr have we done all units in this slot?
@ -1070,7 +855,7 @@ H2974 dec idxl+1
cmp #$C0 searched down to slot 0? cmp #$C0 searched down to slot 0?
bne H291F if not. bne H291F if not.
rts rts
*--------------------------------------
mount ldx #$0C mount ldx #$0C
.1 ldy driveridx,x .1 ldy driveridx,x
@ -1138,11 +923,83 @@ H29EB jsr cmpid is it a disk controller?
bne .9 if not. bne .9 if not.
clc smartport found clc smartport found
.9 rts .9 rts
*--------------------------------------
LDR.PrintA ldy LDR.Print.CX
and #$7F
cmp #$60
bcs .2
and #$3F
.2 sta $400,y
inc LDR.Print.CX
rts
*--------------------------------------
LDR.PrintX ldy LDR.Print.CX
numdev2 .HS 0000000000000000 8 bytes for smartport call .1 lda $2000,x
pha
and #$7F
cmp #$60
bcs .2
and #$3F
.2 sta $400,y
inx
iny
pla
bpl .1
* lda #$20
* sta $400,y
iny Add a Space
sty LDR.Print.CX
rts
*--------------------------------------
DS1216E.SIG .HS 5CA33AC55CA33AC5 Reverted 7->0
*--------------------------------------
* id bytes: evens for clock, odds for disk
dskid .HS 082028005803703C
sltbit .HS 0002040810204080
*--------------------------------------
LDR.MLIOL.P .DA #2
.DA #$60
.DA pbuf+1
LDR.MLISETP.P .DA #1
.DA pbuf
.DO READCAT=1
LDR.MLIRB.P .DA #3
.DA #0 unit number
.DA 0 2 byte data buffer
.DA 0 2 byte block number
.FIN
spcparms .DA #$03 # of parms
statunit .DA #$00 unit number (code for smartport stat)
.DA numdev2
.DA #00 status code (0 = general status)
driveridx .DA #$06
.DA #$1E
.DA #$0E
.DA #$1C
.DA #$0C
.DA #$1A
.DA #$0A
.DA #$14
.DA #$04
.DA #$12
.DA #$02
.DA #$18
.DA #$08
*--------------------------------------
LDR.Print.CX .BS 1
numdev2 .BS 8 8 bytes for smartport call
driveradr .DA 0 driveradr .DA 0
d2idx .DA #0
diskins2 .DA #0 msb clear if drive in slot 2 LDR.cortland .DA #0 cortland loader flag (1 = Cortland)
LDR.BootFlag .DA #0 0 = normal boot, <>0 = return
*-------------------------------------- *--------------------------------------
* 16 bytes moved to $03F0 vectors * 16 bytes moved to $03F0 vectors
*-------------------------------------- *--------------------------------------

View File

@ -169,26 +169,35 @@ cmvauxid iny move auxillary identification bytes
lda d_stor storage type. lda d_stor storage type.
and #$E0 is it a directory? and #$E0 is it a directory?
beq cralcblk branch if seed file. beq cralcblk branch if seed file.
ldx #$1E move header to data block ldx #$1E move header to data block
cmvheadr lda d_stor,x cmvheadr lda d_stor,x
sta gbuf+4,x sta gbuf+4,x
dex dex
bpl cmvheadr bpl cmvheadr
eor #$30 eor #$30
sta gbuf+4 make it a directory header mark. sta gbuf+4 make it a directory header mark.
ldx #$07 overwrite password area and other ldx #$07 overwrite password area and other
cmvpass lda pass,x header info. cmvpass lda pass,x header info.
sta gbuf+20,x sta gbuf+20,x
lda xdosver,x lda xdosver,x
sta gbuf+32,x sta gbuf+32,x
dex dex
bpl cmvpass bpl cmvpass
ldx #$02 and include info about parent directory ldx #$02 and include info about parent directory
stx d_eof+1 stx d_eof+1
cmvparnt lda d_entblk,x cmvparnt lda d_entblk,x
sta gbuf+39,x sta gbuf+39,x
dex dex
bpl cmvparnt bpl cmvparnt
lda h_entln lastly, the length of parent's lda h_entln lastly, the length of parent's
sta gbuf+42 directory entries. sta gbuf+42 directory entries.
cralcblk jsr alc1blk get address of file's data block cralcblk jsr alc1blk get address of file's data block