Kernel 0.93+ ProDOS 2.0.3 src

This commit is contained in:
Rémy GIBERT 2019-09-16 08:06:02 +02:00
parent 78fbcb711b
commit 7743abc5fc
10 changed files with 230 additions and 384 deletions

Binary file not shown.

View File

@ -4,10 +4,7 @@ NEW
* Cortland clock driver * Cortland clock driver
* $2F80-$2FFC moved to $D742 * $2F80-$2FFC moved to $D742
*-------------------------------------- *--------------------------------------
ofsC .EQ *-tclk_in offset to Cortland clock org CCLK.START >SHORTMX 8 bit mode.
cclock_0
>SHORTMX 8 bit mode.
lda statereg state register. lda statereg state register.
sta savestate save for restore after tool call. sta savestate save for restore after tool call.
and #$CF clear the read/write aux memory bits. and #$CF clear the read/write aux memory bits.
@ -30,11 +27,12 @@ cclock_0
pla pla
sta p8time+1 hours sta p8time+1 hours
pla year pla year
H2FB1 cmp #100 out of range? .1 cmp #100 out of range?
bcc H2FB9 no, go ahead and store bcc .2 no, go ahead and store
sbc #$64 else put back in range. sbc #$64 else put back in range.
bra H2FB1 try again bra .1 try again
H2FB9 sta p8date+1 year
.2 sta p8date+1 year
pla pla
inc increment day for Prodos 8 format. inc increment day for Prodos 8 format.
sta p8date day sta p8date day
@ -53,13 +51,12 @@ H2FB9 sta p8date+1 year
sec go back to emulation mode sec go back to emulation mode
xce to continue with Prodos 8 xce to continue with Prodos 8
rts rts
savestate .EQ *-ofsC savestate .HS 00 state of the state register
.HS 00 state of the state register
.AS "JIMJAYKERRY&MIKE" .AS "JIMJAYKERRY&MIKE"
.HS 0000000000000000 pad 0's until length .HS 0000000000000000 pad 0's until length
.HS 0000000000000000 of driver = 125 bytes. .HS 0000000000000000 of driver = 125 bytes.
.HS 000000000000 .HS 000000000000
cclk_end .EQ * end of obj cclock_0. CCLK.END .EQ * end of obj cclock_0.
.HS 000000 pad to page boundary .HS 000000 pad to page boundary
*-------------------------------------- *--------------------------------------
MAN MAN

View File

@ -3,8 +3,6 @@ NEW
* disk ii driver. object code = xrw_0 * disk ii driver. object code = xrw_0
* $5300-5A00 moved to language card bank 1 at $D000 * $5300-5A00 moved to language card bank 1 at $D000
*-------------------------------------- *--------------------------------------
ofsD .EQ *-rwts offset to disk ii driver or
blockio cld $D8 to flag language card bank 1 (main) blockio cld $D8 to flag language card bank 1 (main)
jsr rsetphse jsr rsetphse
lda q7l,x turn off write enable lda q7l,x turn off write enable
@ -40,8 +38,7 @@ L5334 lda #$27 i/o error
* read/write a track/sector * read/write a track/sector
regrwts .EQ *-ofsD regrwts ldy #$01 retry count
ldy #$01 retry count
sty seekcnt only one recalibrate per call sty seekcnt only one recalibrate per call
sta ibsect sta ibsect
lda unitnum get slot # for this operation lda unitnum get slot # for this operation
@ -162,8 +159,7 @@ hndlerr sec
lda motoroff,x turn off lda motoroff,x turn off
rts rts
L53F4 jsr write16 write nibbles L53F4 jsr write16 write nibbles
statdne .EQ *-ofsD statdne bcc L53E7 if no errors.
bcc L53E7 if no errors.
lda #$2B disk write protected. lda #$2B disk write protected.
bne hndlerr always bne hndlerr always
L53FD ldx A2L L53FD ldx A2L
@ -172,8 +168,7 @@ L53FD ldx A2L
rol write protect-->carry-->bit 0=1 rol write protect-->carry-->bit 0=1
lda q6l,x keep in read mode lda q6l,x keep in read mode
jmp statdne jmp statdne
myseek .EQ *-ofsD myseek asl assume two phase stepper
asl assume two phase stepper
sta track save destination track * 2 sta track save destination track * 2
jsr alloff turn all phases off to be sure. jsr alloff turn all phases off to be sure.
jsr drvindx get index to previous track jsr drvindx get index to previous track
@ -182,8 +177,7 @@ myseek .EQ *-ofsD
lda track where to go next. lda track where to go next.
sta iobpdn,x sta iobpdn,x
jsr seek move head there jsr seek move head there
alloff .EQ *-ofsD alloff ldy #$03 turn off all phases before returning.
ldy #$03 turn off all phases before returning.
L5427 tya (send phase in acc) L5427 tya (send phase in acc)
jsr clrphase carry clear, phases should be turned off jsr clrphase carry clear, phases should be turned off
dey dey
@ -209,10 +203,9 @@ L5427 tya (send phase in acc)
* *
* variables used: curtrk, trkn, countn, prior, A2L, montimel, montimeh * variables used: curtrk, trkn, countn, prior, A2L, montimel, montimeh
seek .EQ *-ofsD seek sta trkn save target track.
sta trkn save target track.
cmp curtrk on desired track ? cmp curtrk on desired track ?
beq L5487 yes, energize phase and return beq setphase yes, energize phase and return
lda #$00 lda #$00
sta trkcnt half track count. sta trkcnt half track count.
L5440 lda curtrk save curtrk for delayed turnoff L5440 lda curtrk save curtrk for delayed turnoff
@ -244,11 +237,11 @@ L5468 jsr setphase
inc trkcnt count of 'tracks moved' inc trkcnt count of 'tracks moved'
bne L5440 always taken bne L5440 always taken
L5483 jsr mswait settle 25 msec L5483 jsr mswait settle 25 msec
clc set for phase off clc set for phase off
setphase .EQ *-ofsD
L5487 lda curtrk get current track setphase lda curtrk get current track
clrphase .EQ *-ofsD clrphase and #$03 mask for 1 of 4 phases
and #$03 mask for 1 of 4 phases
rol double for phaseon/off index rol double for phaseon/off index
ora A2L ora A2L
tax tax
@ -264,25 +257,20 @@ clrphase .EQ *-ofsD
* nibles in the ranges of $A0-$A3, $C0-$C7, $E0-$E3 are used for * nibles in the ranges of $A0-$A3, $C0-$C7, $E0-$E3 are used for
* other tables since no valid nibles are in these ranges. * other tables since no valid nibles are in these ranges.
dnibl .EQ *-ofsD aligned to page boundary minus $96 dnibl .HS 0004FFFF080CFF10 aligned to page boundary minus $96
.HS 0004FFFF080CFF10
.HS 1418 .HS 1418
twobit3 .EQ *-ofsD used in fast prenib as lookup for twobit3 .HS 008040C0FFFF used in fast prenib as lookup for 2-bit quantities.
.HS 008040C0FFFF 2-bit quantities.
.HS 1C20FFFFFF24282C .HS 1C20FFFFFF24282C
.HS 3034FFFF383C4044 .HS 3034FFFF383C4044
.HS 484CFF5054585C60 .HS 484CFF5054585C60
.HS 6468 .HS 6468
twobit2 .EQ *-ofsD used in fast prenib. twobit2 .HS 00201030 used in fast prenib.
.HS 00201030 endmrks .HS DEAAEBFF table using 'unused' nibbles ($C4,$C5,$C6,$C7)
endmrks .EQ *-ofsD table using 'unused' nibbles:
.HS DEAAEBFF ($C4,$C5,$C6,$C7)
.HS FFFFFF6CFF70 .HS FFFFFF6CFF70
.HS 7478FFFFFF7CFFFF .HS 7478FFFFFF7CFFFF
.HS 8084FF888C909498 .HS 8084FF888C909498
.HS 9CA0 .HS 9CA0
twobit1 .EQ *-ofsD used in fast prenib. twobit1 .HS 0008040CFFA4 used in fast prenib.
.HS 0008040CFFA4
.HS A8ACFFB0B4B8BCC0 .HS A8ACFFB0B4B8BCC0
.HS C4C8FFFFCCD0D4D8 .HS C4C8FFFFCCD0D4D8
.HS DCE0FFE4E8ECF0F4 .HS DCE0FFE4E8ECF0F4
@ -297,20 +285,16 @@ twobit1 .EQ *-ofsD used in fast prenib.
* origin = $D200 (page boundary) * origin = $D200 (page boundary)
* page align the following tables: * page align the following tables:
dnibl2 .EQ *-ofsD dnibl2 .HS 00
.HS 00 dnibl3 .HS 00
dnibl3 .EQ *-ofsD dnibl4 .HS 00
.HS 00
dnibl4 .EQ *-ofsD
.HS 00
* 6-bit to 7-bit nibl conversion table * 6-bit to 7-bit nibl conversion table
* *
* codes with more than one pair of adjacent zeroes * codes with more than one pair of adjacent zeroes
* or with no adjacent ones (except B7) are excluded. * or with no adjacent ones (except B7) are excluded.
nibl .EQ *-ofsD nibl .HS 960200
.HS 960200
.HS 00970100009A0300 .HS 00970100009A0300
.HS 009B0002009D0202 .HS 009B0002009D0202
.HS 009E0102009F0302 .HS 009E0102009F0302
@ -346,52 +330,34 @@ nibl .EQ *-ofsD
* nibl buffer 'nbuf2' must be on a page boundary !!! * nibl buffer 'nbuf2' must be on a page boundary !!!
nbuf2 .EQ *-ofsD nibl buffer for read/write of low nbuf2 .BS 86 nibl buffer for read/write of low 2-bits of each byte.
.BS 86 2-bits of each byte. ibtrk .HS 00
ibtrk .EQ *-ofsD ibsect .HS 00
.HS 00 ibstat .HS 00
ibsect .EQ *-ofsD iobpdn .HS 00
.HS 00 curtrk .HS 00
ibstat .EQ *-ofsD
.HS 00
iobpdn .EQ *-ofsD
.HS 00
curtrk .EQ *-ofsD
.HS 00
.HS 00000000000000 for slots 1 thru 7 .HS 00000000000000 for slots 1 thru 7
.HS 00000000000000 drives 1 & 2 .HS 00000000000000 drives 1 & 2
retrycnt .EQ *-ofsD retrycnt .HS 00
.HS 00 seekcnt .HS 00
seekcnt .EQ *-ofsD trkcnt .EQ * halftracks moved count.
.HS 00 countn .EQ * 'must find' count.
trkcnt .EQ *-ofsD halftracks moved count. last .HS 00 'odd bit' nibls.
countn .EQ *-ofsD 'must find' count. csum .HS 00 used for address header cksum
last .EQ *-ofsD 'odd bit' nibls. csstv .HS 00
.HS 00 sect .HS 00
csum .EQ *-ofsD used for address header cksum track .EQ *
.HS 00 montimel .HS 00
csstv .EQ *-ofsD montimeh .HS 00 also 'volume'
.HS 00 prior .HS 00
sect .EQ *-ofsD trkn .HS 00
.HS 00
track .EQ *-ofsD
montimel .EQ *-ofsD
.HS 00
montimeh .EQ *-ofsD also 'volume'
.HS 00
prior .EQ *-ofsD
.HS 00
trkn .EQ *-ofsD
.HS 00
* phase on, off time tables * phase on, off time tables
* in 100 usec intervals (seek) * in 100 usec intervals (seek)
ontable .EQ *-ofsD ontable .HS 013028
.HS 013028
.HS 24201E1D1C1C .HS 24201E1D1C1C
offtable .EQ *-ofsD offtable .HS 702C
.HS 702C
.HS 26221F1E1D1C1C .HS 26221F1E1D1C1C
* mswait subroutine * mswait subroutine
@ -402,16 +368,15 @@ offtable .EQ *-ofsD
* montimel, montimeh are incremented once per 100 usec interval * montimel, montimeh are incremented once per 100 usec interval
* for motor on timing. * for motor on timing.
mswait .EQ *-ofsD mswait ldx #$11 delay 86 usec
L5685 ldx #$11 delay 86 usec .1 dex
L5687 dex bne .1
bne L5687
inc montimel inc montimel
bne L5692 bne .2
inc montimeh inc montimeh
L5692 sec .2 sec
sbc #$01 sbc #$01
bne L5685 bne mswait
rts rts
* read address field subroutine (16-sector format) * read address field subroutine (16-sector format)
@ -425,8 +390,7 @@ L5692 sec
* expects: original 10-sector normal density nibls (4-bit) odd bits then even. * expects: original 10-sector normal density nibls (4-bit) odd bits then even.
* observe 'no page cross' warnings on some branches !!! * observe 'no page cross' warnings on some branches !!!
rdadr16 .EQ *-ofsD rdadr16 ldy #$FC
ldy #$FC
sty countn 'must find' count sty countn 'must find' count
L569D iny L569D iny
bne L56A5 low order of count. bne L56A5 low order of count.
@ -485,8 +449,7 @@ rderr sec
* acc=$AA, x=unchanged, y=0, carry clear. * acc=$AA, x=unchanged, y=0, carry clear.
* observe 'no page cross' on some branches !! * observe 'no page cross' on some branches !!
read16 .EQ *-ofsD read16 txa get slot #
txa get slot #
ora #$8C prepare mods to read routine. ora #$8C prepare mods to read routine.
sta rd4+1 warning: the read routine is sta rd4+1 warning: the read routine is
sta rd5+1 self modified !! sta rd5+1 self modified !!
@ -529,54 +492,49 @@ L574A lda q6l,x
ldy #$AA ldy #$AA
lda #$00 lda #$00
L5757 sta pcl use z-page for keeping checksum L5757 sta pcl use z-page for keeping checksum
rd4 .EQ *-ofsD rd4 ldx q6l+$60 warning: self modified
L5759 ldx q6l+$60 warning: self modified bpl rd4
bpl L5759
lda dnibl-$96,x lda dnibl-$96,x
sta nbuf2-$AA,y save the two-bit groups in nbuf. sta nbuf2-$AA,y save the two-bit groups in nbuf.
eor pcl update checksum. eor pcl update checksum.
iny next position in nbuf. iny next position in nbuf.
bne L5757 loop for all $56 two-bit groups. bne L5757 loop for all $56 two-bit groups.
ldy #$AA now read directly into user buffer. ldy #$AA now read directly into user buffer.
bne L5772 always taken. bne rd5 always taken.
L576D sec error L576D sec error
rts rts
ref1 .EQ *-ofsD ref1 sta $1000,y warning: self modified
L576F sta $1000,y warning: self modified rd5 ldx q6l+$60 warning: self modified
rd5 .EQ *-ofsD bpl rd5
L5772 ldx q6l+$60 warning: self modified
bpl L5772
eor dnibl-$96,x get actual 6-bit data from dnib table. eor dnibl-$96,x get actual 6-bit data from dnib table.
ldx nbuf2-$AA,y get associated two-bit pattern ldx nbuf2-$AA,y get associated two-bit pattern
eor dnibl2,x and combine to form whole byte. eor dnibl2,x and combine to form whole byte.
iny iny
bne L576F loop for $56 bytes. bne ref1 loop for $56 bytes.
pha save for now, no time to store... pha save for now, no time to store...
and #$FC strip low bits. and #$FC strip low bits.
ldy #$AA prepare for next $56 bytes ldy #$AA prepare for next $56 bytes
rd6 .EQ *-ofsD
L5788 ldx q6l+$60 warning: self modified rd6 ldx q6l+$60 warning: self modified
bpl L5788 bpl rd6
eor dnibl-$96,x eor dnibl-$96,x
ldx nbuf2-$AA,y ldx nbuf2-$AA,y
eor dnibl3,x eor dnibl3,x
ref2 .EQ *-ofsD ref2 sta $1000,y warning: self modified
sta $1000,y warning: self modified
iny iny
bne L5788 loop unil this group of $56 read bne rd6 loop unil this group of $56 read
rd7 .EQ *-ofsD
L579C ldx q6l+$60 warning: self modified rd7 ldx q6l+$60 warning: self modified
bpl L579C bpl rd7
and #$FC and #$FC
ldy #$AC last group is $54 long ldy #$AC last group is $54 long
L57A5 eor dnibl-$96,x L57A5 eor dnibl-$96,x
ldx nbuf2-$AC,y ldx nbuf2-$AC,y
eor dnibl4,x combine to form full byte eor dnibl4,x combine to form full byte
ref3 .EQ *-ofsD ref3 sta $1000,y warning: self modified
sta $1000,y warning: self modified
rd8 .EQ *-ofsD rd8 ldx q6l+$60 warning: self modified
L57B1 ldx q6l+$60 warning: self modified bpl rd8
bpl L57B1
iny iny
bne L57A5 bne L57A5
and #$FC and #$FC
@ -596,8 +554,7 @@ L57CD pla place last byte into user buffer
* set the slot dependent track location * set the slot dependent track location
settrk .EQ *-ofsD settrk jsr drvindx get index to drive #
jsr drvindx get index to drive #
sta iobpdn,x sta iobpdn,x
rts rts
@ -606,23 +563,20 @@ settrk .EQ *-ofsD
* if stopped, controller's shift register will not be changing. * if stopped, controller's shift register will not be changing.
* return y = 0 and zero flag set if it is stopped. * return y = 0 and zero flag set if it is stopped.
chkdrv .EQ *-ofsD chkdrv ldx A2L
ldx A2L chkdrv0 ldy #$00 init loop counter.
chkdrv0 .EQ *-ofsD .1 lda q6l,x read the shift register.
ldy #$00 init loop counter.
L57DE lda q6l,x read the shift register.
jsr ckdrts delay jsr ckdrts delay
pha pha
pla more delay. pla more delay.
cmp q6l,x has shift reg changed ? cmp q6l,x has shift reg changed ?
bne L57F0 yes, motor is moving. bne ckdrts yes, motor is moving.
lda #$28 anticipate error. lda #$28 anticipate error.
dey no, dec retry counter dey no, dec retry counter
bne L57DE and try 256 times. bne .1 and try 256 times.
ckdrts .EQ *-ofsD ckdrts rts
L57F0 rts
drvindx .EQ *-ofsD drvindx pha preserve acc across call
pha preserve acc across call
lda A4L+1 lda A4L+1
lsr lsr
lsr lsr
@ -645,8 +599,7 @@ drvindx .EQ *-ofsD
* on exit: carry set if error (write protect violation). * on exit: carry set if error (write protect violation).
* if no error, acc=uncertain, x=unchanged, y=0, carry clear. * if no error, acc=uncertain, x=unchanged, y=0, carry clear.
write16 .EQ *-ofsD write16 sec anticipate write protect error
sec anticipate write protect error
lda q6h,x lda q6h,x
lda q7l,x sense write protect flag lda q7l,x sense write protect flag
bpl L580C bpl L580C
@ -694,21 +647,17 @@ L583D eor nbuf2-1,y (5) xor with current
* end of write byte loop * end of write byte loop
lda pcl (3) get prior nibl (from nbuf2) lda pcl (3) get prior nibl (from nbuf2)
wrefd1 .EQ *-ofsD wrefd1 ldy #$00 (2) warning: load value modified by prenib.
ldy #$00 (2) warning: load value modified by prenib. wrefa1 eor $1000,y (4) warning: address modified by prenib.
wrefa1 .EQ *-ofsD
L5853 eor $1000,y (4) warning: address modified by prenib.
and #$FC (2) strip low 2 bits and #$FC (2) strip low 2 bits
tax (2) index to nibl table tax (2) index to nibl table
lda nibl,x (4) lda nibl,x (4)
wrefd2 .EQ *-ofsD wrefd2 ldx #$60 (2) warning: value modified by prenib.
ldx #$60 (2) warning: value modified by prenib.
sta q6h,x (5) write nibl sta q6h,x (5) write nibl
lda q6l,x (4) handshake lda q6l,x (4) handshake
wrefa2 .EQ *-ofsD wrefa2 lda $1000,y (4) prior nibl. warning: address modified by prenib.
lda $1000,y (4) prior nibl. warning: address modified by prenib.
iny (2) all done with this page ? iny (2) all done with this page ?
bne L5853 (3-) loop until page end. bne wrefa1 (3-) loop until page end.
lda pch (3) get next (precalculated & translated) nibl. lda pch (3) get next (precalculated & translated) nibl.
beq L58C0 (2+) branch if code written was page aligned. beq L58C0 (2+) branch if code written was page aligned.
lda A2H (3) get byte address of last byte to be written. lda A2H (3) get byte address of last byte to be written.
@ -721,32 +670,26 @@ wrefa2 .EQ *-ofsD
nop (2) above test set carry. nop (2) above test set carry.
iny (2) y=1 iny (2) y=1
bcs L5899 (2+) branch if last byte to be odd. bcs L5899 (2+) branch if last byte to be odd.
wrefa3 .EQ *-ofsD wrefa3 eor $1100,y (4) warning: address modified by prenib.
L5881 eor $1100,y (4) warning: address modified by prenib.
and #$FC (2) strip low 2 bits. and #$FC (2) strip low 2 bits.
tax (2) index to nibl table tax (2) index to nibl table
lda nibl,x (4) get nibl lda nibl,x (4) get nibl
wrefd3 .EQ *-ofsD wrefd3 ldx #$60 (2) restore slot index. warning: modified by prenib
ldx #$60 (2) restore slot index. warning: modified by prenib
sta q6h,x (5) sta q6h,x (5)
lda q6l,x (4) lda q6l,x (4)
wrefa4 .EQ *-ofsD wrefa4 lda $1100,y (4) warning: modified by prenib
lda $1100,y (4) warning: modified by prenib
iny (2) got prior nibl, point to next iny (2) got prior nibl, point to next
wrefa5 .EQ *-ofsD wrefa5 eor $1100,y (4) warning: modified by prenib
eor $1100,y (4) warning: modified by prenib
L5899 cpy A2H (3) set carry if this is the last nibl L5899 cpy A2H (3) set carry if this is the last nibl
and #$FC (2) strip low 2 bits and #$FC (2) strip low 2 bits
tax (2) tax (2)
lda nibl,x (4) lda nibl,x (4)
wrefd4 .EQ *-ofsD wrefd4 ldx #$60 (2) restore slot. warning: modified by prenib
ldx #$60 (2) restore slot. warning: modified by prenib
sta q6h,x (5) sta q6h,x (5)
lda q6l,x (4) lda q6l,x (4)
wrefa6 .EQ *-ofsD wrefa6 lda $1100,y (4) get prior nibl. warning: modified by prenib
lda $1100,y (4) get prior nibl. warning: modified by prenib
iny (2) iny (2)
bcc L5881 (3-) branch if not the last. bcc wrefa3 (3-) branch if not the last.
bcs L58B1 (3) waste 3 cycles, branch always. bcs L58B1 (3) waste 3 cycles, branch always.
L58B1 bcs L58C0 (3) branch always. L58B1 bcs L58C0 (3) branch always.
L58B3 lda >pch (4) absolute reference to zero page L58B3 lda >pch (4) absolute reference to zero page
@ -758,8 +701,7 @@ L58B3 lda >pch (4) absolute reference to zero page
pla (4) pla (4)
L58C0 ldx A1H (3) use last nibl (anded with $FC) for checksum L58C0 ldx A1H (3) use last nibl (anded with $FC) for checksum
lda nibl,x (4) lda nibl,x (4)
wrefd5 .EQ *-ofsD wrefd5 ldx #$60 (2) restore slot. warning: modified by prenib
ldx #$60 (2) restore slot. warning: modified by prenib
sta q6h,x (5) sta q6h,x (5)
lda q6l,x (4) lda q6l,x (4)
ldy #$00 (2) set y = index end mark table. ldy #$00 (2) set y = index end mark table.
@ -773,20 +715,16 @@ L58D3 lda endmrks,y (4) dm4, dm5, dm6 and turn off byte.
cpy #$04 (2) have all end marks been written ? cpy #$04 (2) have all end marks been written ?
bne L58D3 (3) if not. bne L58D3 (3) if not.
clc (2,9) clc (2,9)
wexit .EQ *-ofsD wexit lda q7l,x out of write mode
lda q7l,x out of write mode
lda q6l,x to read mode. lda q6l,x to read mode.
rts return from write. rts return from write.
* 7-bit nibl write subroutines * 7-bit nibl write subroutines
wnibl9 .EQ *-ofsD wnibl9 clc (2) 9 cycles, then write.
clc (2) 9 cycles, then write. wnibl7 pha (3) 7 cycles, then write.
wnibl7 .EQ *-ofsD
pha (3) 7 cycles, then write.
pla (4) pla (4)
wnibl .EQ *-ofsD wnibl sta q6h,x (5) nibl write
sta q6h,x (5) nibl write
ora q6l,x (4) clobbers acc, not carry ora q6l,x (4) clobbers acc, not carry
rts (6) rts (6)
@ -800,8 +738,7 @@ wnibl .EQ *-ofsD
* on exit: a,x,y undefined. write routine modified to do direct conversion * on exit: a,x,y undefined. write routine modified to do direct conversion
* of high 6 bits of user's buffer data. * of high 6 bits of user's buffer data.
prenib16 .EQ *-ofsD prenib16 lda buf self-modify the addresses because of
lda buf self-modify the addresses because of
ldy buf+1 the fast timing required. ldy buf+1 the fast timing required.
clc all offsets are minus $AA. clc all offsets are minus $AA.
adc #$02 the highest set is buf+$AC. adc #$02 the highest set is buf+$AC.
@ -822,21 +759,18 @@ L5906 sta prn2+1 self mod 2
L5912 sta prn1+1 self mod 1 L5912 sta prn1+1 self mod 1
sty prn1+2 sty prn1+2
ldy #$AA count up to 0. ldy #$AA count up to 0.
prn1 .EQ *-ofsD get byte from lowest group. prn1 lda $1000,y warning: self modified. get byte from lowest group.
L591A lda $1000,y warning: self modified.
and #$03 strip high 6 bits. and #$03 strip high 6 bits.
tax index to 2 bit equivalent. tax index to 2 bit equivalent.
lda twobit1,x lda twobit1,x
pha save pattern pha save pattern
prn2 .EQ *-ofsD get byte from middle group. prn2 lda $1056,y warning: self modified. get byte from middle group.
lda $1056,y warning: self modified.
and #$03 and #$03
tax tax
pla restore pattern. pla restore pattern.
ora twobit2,x combine 2nd group with 1st. ora twobit2,x combine 2nd group with 1st.
pha save new pattern. pha save new pattern.
prn3 .EQ *-ofsD get byte from highest group. prn3 lda $10AC,y warning: self modified. get byte from highest group.
lda $10AC,y warning: self modified.
and #$03 and #$03
tax tax
pla restore new pattern pla restore new pattern
@ -848,7 +782,7 @@ prn3 .EQ *-ofsD get byte from highest group.
pla pla
sta nbuf2,x save in nibl buffer. sta nbuf2,x save in nibl buffer.
iny inc to next set. iny inc to next set.
bne L591A loop until all $56 nibls formed. bne prn1 loop until all $56 nibls formed.
ldy buf now prepare data bytes for write16 subr. ldy buf now prepare data bytes for write16 subr.
dey prepare end address. dey prepare end address.
sty A2H sty A2H
@ -890,8 +824,7 @@ L596F ldy #$FF index to last byte of data to write.
stx wrefd4+1 stx wrefd4+1
stx wrefd5+1 stx wrefd5+1
rts rts
chkprev .EQ *-ofsD chkprev eor iobpdn same slot as last ?
eor iobpdn same slot as last ?
asl asl
beq L59BD beq L59BD
lda #$01 lda #$01
@ -907,8 +840,7 @@ L59A6 lda iobpdn
lda montimeh lda montimeh
bne L59A6 bne L59A6
L59BD rts L59BD rts
rsetphse .EQ *-ofsD rsetphse lda unitnum get unit number.
lda unitnum get unit number.
and #$7F mask off high bit. and #$7F mask off high bit.
tax tax
@ -919,8 +851,7 @@ rsetphse .EQ *-ofsD
lda phaseoff+4,x lda phaseoff+4,x
lda phaseoff+6,x lda phaseoff+6,x
rts rts
docheck .EQ *-ofsD docheck lda A4L command #.
lda A4L command #.
cmp #$04 is the command allowed ? cmp #$04 is the command allowed ?
bcs L59E6 if not. bcs L59E6 if not.
lda bloknml lda bloknml
@ -940,10 +871,8 @@ L59E8 clc
* variables used by mli for smartport interface * variables used by mli for smartport interface
spstatlist .EQ *-ofsD ref pathbuf-$14 spstatlist .HS 00000000 ref pathbuf-$14 smartport status list buffer
.HS 00000000 smartport status list buffer spunit .HS 0000000000000000 ref pathbuf-$10smartport unit numbers
spunit .EQ *-ofsD ref pathbuf-$10
.HS 0000000000000000 smartport unit numbers
.HS 0000000000000000 .HS 0000000000000000
* pathname buffer starts at this page boundary (pathbuf = $D700) * pathname buffer starts at this page boundary (pathbuf = $D700)

View File

@ -440,14 +440,14 @@ H2367 .DA #$01 relocation table. 1=move src to dst
* move thunderclock * move thunderclock
rlclk64 .DA #$01 relocation table. 1=move src to dst rlclk64 .DA #$01 relocation table. 1=move src to dst
.DA tclk_in destination .DA $D742 destination
.DA tclk_end-tclock_0 length of thunderclock driver .DA TCLK.END-TCLK.START length of thunderclock driver
.DA tclock_0 source .DA TCLK source
.DA #$04 4=relocate and move program .DA #$04 4=relocate and move program
.DA tclk_in .DA TCLK.START
.DA H2F69-tclock_0 .DA TCLK.CEND-TCLK.START
.DA tclk_in .DA TCLK.START
.HS 00 .HS 00
.HS C1C1 .HS C1C1
clock64 .DA #$00 clock64 .DA #$00
@ -456,9 +456,9 @@ clock64 .DA #$00
* move cortland clock * move cortland clock
cortclock .DA #$01 relocation table. 1=move src to dst cortclock .DA #$01 relocation table. 1=move src to dst
.DA tclk_in destination .DA $D742 destination
.DA cclk_end-cclock_0 length of cortland clock driver .DA CCLK.END-CCLK.START length of cortland clock driver
.DA cclock_0 source .DA CCLK source
.HS FF done .HS FF done
* load and run appletalk configuration file (atinit) if present * load and run appletalk configuration file (atinit) if present

View File

@ -903,7 +903,7 @@ L2C4D lda 1,s
sec sec
rtl rtl
.BS $2C80-* .BS $2C80-*
MAN MAN
SAVE USR/SRC/PRODOS.203/PRODOS.S.LDR.B SAVE USR/SRC/PRODOS.203/PRODOS.S.LDR.B

View File

@ -9,9 +9,7 @@ NEW
* must remain somewhere between $E000-$F7FF. this routine must be less * must remain somewhere between $E000-$F7FF. this routine must be less
* than 3 pages in length. * than 3 pages in length.
ofsS .EQ *-dispadr offset to dispatcher org SEL0.START lda RROMBNK2 read ROM
disp1obj lda RROMBNK2 read ROM
sta CLR80DISP disable 80 col hardware sta CLR80DISP disable 80 col hardware
sta CLRALTCHAR normal LC, flashing UC sta CLRALTCHAR normal LC, flashing UC
sta CLR80STORE disable 80 column store sta CLR80STORE disable 80 column store
@ -52,8 +50,7 @@ L5A52 lda pbuf,x display prefix directly to screen
L5A5D ldx #$00 L5A5D ldx #$00
dec cv dec cv
jsr crout jsr crout
getkey .EQ *-ofsS getkey jsr rdkey input char with cursor
jsr rdkey input char with cursor
cmp #$8D cr ? cmp #$8D cr ?
beq L5ABD yes, accept what is entered. beq L5ABD yes, accept what is entered.
pha no, save the char. pha no, save the char.
@ -109,13 +106,11 @@ L5AD3 jsr home clear screen for application name.
jsr crout jsr crout
ldx #disp1msg-dsp1msgs ldx #disp1msg-dsp1msgs
jsr prntmsg 'enter pathname...' jsr prntmsg 'enter pathname...'
retryrich .EQ *-ofsS retryrich lda #$03 line 3
lda #$03 line 3
sta cv sta cv
jsr crout jsr crout
ldx #$00 ldx #$00
loop1 .EQ *-ofsS loop1 jsr rdkey input char with cursor.
jsr rdkey input char with cursor.
cmp #$9B esc ? cmp #$9B esc ?
bne L5AF4 if not esc. bne L5AF4 if not esc.
lda ch esc pressed in column 0 ? lda ch esc pressed in column 0 ?
@ -191,11 +186,11 @@ L5B82 lda dsp1refn copy the reference number
jsr MLI get eof jsr MLI get eof
.DA #$D1 .DA #$D1
.DA dsp1eof .DA dsp1eof
bcs L5BE2 bcs dsp1error
lda dsp1eofb+2 3rd of 3 bytes. lda dsp1eofb+2 3rd of 3 bytes.
beq L5B9C if 0 then ok beq L5B9C if 0 then ok
lda #$27 else i/o error because lda #$27 else i/o error because
bne L5BE2 file is too large. bne dsp1error file is too large.
L5B9C lda dsp1eofb move eof to # of bytes to read. L5B9C lda dsp1eofb move eof to # of bytes to read.
sta dsp1cnt sta dsp1cnt
lda dsp1eofb+1 lda dsp1eofb+1
@ -209,12 +204,11 @@ L5B9C lda dsp1eofb move eof to # of bytes to read.
.DA dsp1cls .DA dsp1cls
bcc L5BBB bcc L5BBB
L5BB7 plp get status (it is irrelevant now) L5BB7 plp get status (it is irrelevant now)
bne L5BE2 if close generated an error bne dsp1error if close generated an error
plp here if close was ok. plp here if close was ok.
L5BBB bcs L5BB7 error. L5BBB bcs L5BB7 error.
jmp sysentry execute system file jmp sysentry execute system file
delchar .EQ *-ofsS delchar lda ch is cursor in column 0 ?
lda ch is cursor in column 0 ?
beq L5BD3 yes, ignore it. beq L5BD3 yes, ignore it.
dex dex
lda #$A0 blank out the cursor lda #$A0 blank out the cursor
@ -224,18 +218,16 @@ delchar .EQ *-ofsS
jsr cout and blank it too. jsr cout and blank it too.
dec ch point to that location. dec ch point to that location.
L5BD3 jmp loop1 get next char. L5BD3 jmp loop1 get next char.
prntmsg .EQ *-ofsS prntmsg lda dsp1msgs,x
L5BD6 lda dsp1msgs,x
beq L5BE1 beq L5BE1
jsr cout jsr cout
inx inx
bne L5BD6 bne prntmsg
L5BE1 rts L5BE1 rts
* dispatcher 1 error handler * dispatcher 1 error handler
dsp1error .EQ *-ofsS dsp1error sta errnum
L5BE2 sta errnum
lda #$0C display error message on line 13 lda #$0C display error message on line 13
sta cv sta cv
jsr crout jsr crout
@ -258,63 +250,44 @@ L5C09 ldx #dsp1err3-dsp1msgs otherwise display 'file/path not found'
L5C0B jsr prntmsg L5C0B jsr prntmsg
jmp retryrich retry for application pathname jmp retryrich retry for application pathname
dsp1msgs .EQ *-ofsS dsp1msgs .EQ *
dsp1msg0 .EQ *-ofsS dsp1msg0 .EQ *
.AS -'ENTER PREFIX (PRESS "RETURN" TO ACCEPT)' .AS -'ENTER PREFIX (PRESS "RETURN" TO ACCEPT)'
.HS 00 .HS 00
disp1msg .EQ *-ofsS disp1msg .AS -"ENTER PATHNAME OF NEXT APPLICATION"
.AS -"ENTER PATHNAME OF NEXT APPLICATION"
.HS 00 .HS 00
dsp1err1 .EQ *-ofsS dsp1err1 .DA #$87
.DA #$87
.AS -'NOT A TYPE "SYS" FILE' .AS -'NOT A TYPE "SYS" FILE'
.HS 00 .HS 00
dsp1err2 .EQ *-ofsS dsp1err2 .DA #$87
.DA #$87
.AS -"I/O ERROR " .AS -"I/O ERROR "
.HS 00 .HS 00
dsp1err3 .EQ *-ofsS dsp1err3 .DA #$87
.DA #$87
.AS -"FILE/PATH NOT FOUND " .AS -"FILE/PATH NOT FOUND "
.HS 00 .HS 00
dsp1info .EQ *-ofsS get file info parms dsp1info .DA #$0A 10 parameters
.DA #$0A 10 parameters
.DA pbuf pathname buffer .DA pbuf pathname buffer
dsp1acess .EQ *-ofsS dsp1acess .HS 00 access
.HS 00 access dsp1type .HS 00 file type
dsp1type .EQ *-ofsS
.HS 00 file type
.BS 13 the rest are unimportant .BS 13 the rest are unimportant
dsp1open .EQ *-ofsS open file parms dsp1open .HS 03 3 parameters for open
.HS 03 3 parameters for open
.DA pbuf pathname buffer .DA pbuf pathname buffer
.DA fbuf fcb buffer .DA fbuf fcb buffer
dsp1refn .EQ *-ofsS dsp1refn .HS 00 reference #
.HS 00 reference # dsp1cls .DA #01 1 parameter for close
dsp1cls .EQ *-ofsS close file parms dsp1cln .HS 00 reference #
.DA #01 1 parameter for close dsp1read .HS 04 4 parameters for read
dsp1cln .EQ *-ofsS dsp1rdn .HS 00 reference #
.HS 00 reference #
dsp1read .EQ *-ofsS
.HS 04 4 parameters for read
dsp1rdn .EQ *-ofsS
.HS 00 reference #
.DA sysentry .SYS load address .DA sysentry .SYS load address
dsp1cnt .EQ *-ofsS dsp1cnt .HS 0000 byte count
.HS 0000 byte count
.HS 0000 .HS 0000
dsp1eof .EQ *-ofsS get eof parms dsp1eof .HS 02 2 parameters
.HS 02 2 parameters dsp1eofn .HS 00 reference #
dsp1eofn .EQ *-ofsS dsp1eofb .HS 000000 3 byte eof
.HS 00 reference # dsp1pfx .DA #01 1 parameter
dsp1eofb .EQ *-ofsS
.HS 000000 3 byte eof
dsp1pfx .EQ *-ofsS get/set prefix parms
.DA #01 1 parameter
.DA pbuf prefix buffer .DA pbuf prefix buffer
disp1end .EQ * .BS $1300-* fill to page boundary
.BS $300-disp1end+disp1obj fill to page boundary
* end of obj sel_0 * end of obj sel_0
*-------------------------------------- *--------------------------------------

View File

@ -2,9 +2,7 @@ NEW
AUTO 3,1 AUTO 3,1
* object code = sel_1 * object code = sel_1
* Bird's Better Bye at org = dispadr * Bird's Better Bye at org = dispadr
*--------------------------------------
ofsB .EQ *-dispadr offset to Bird's Bye org
birdbye cld birdbye cld
lda RROMBNK2 read ROM lda RROMBNK2 read ROM
stz softev stz softev
@ -32,8 +30,8 @@ L5D16 stz memmap,x P8 memory bitmap
stx lstpntr store in zero page. stx lstpntr store in zero page.
lda devnum get last slot/drive lda devnum get last slot/drive
bne volname bne volname
ds2 .EQ *-ofsB
L5D32 ldx lstpntr get device list pointer. ds2 ldx lstpntr get device list pointer.
lda devlist,x get unit number from list. lda devlist,x get unit number from list.
cpx #$01 make sure it's real. cpx #$01 make sure it's real.
bcs L5D3F if so, change list pointer. bcs L5D3F if so, change list pointer.
@ -48,15 +46,14 @@ volname sta ol_unit store unit number for online.
jsr MLI jsr MLI
.DA #$C5 online call .DA #$C5 online call
.DA ol_parms .DA ol_parms
bcs L5D32 error check. bcs ds2 error check.
stz dlevel haven't read root directory yet. stz dlevel haven't read root directory yet.
lda pbuf+1 load description byte. lda pbuf+1 load description byte.
and #$0F mask for name length. and #$0F mask for name length.
beq L5D32 if 0, then try next unit. beq ds2 if 0, then try next unit.
adc #$02 add 2 to length. adc #$02 add 2 to length.
tax name length in x. tax name length in x.
vnam1 .EQ *-ofsB vnam1 stx pbuf save the name length
stx pbuf save the name length
lda #$2F '/' lda #$2F '/'
sta pbuf+1 slash before and sta pbuf+1 slash before and
sta pbuf,x after name. sta pbuf,x after name.
@ -69,7 +66,7 @@ vnam1 .EQ *-ofsB
.DA op_parms .DA op_parms
bcc L5D7F good open. bcc L5D7F good open.
lda dlevel trying to open root directory ? lda dlevel trying to open root directory ?
beq L5D32 yes, just move to next volume. beq ds2 yes, just move to next volume.
jsr bell1 no, generate bell tone jsr bell1 no, generate bell tone
jsr popdir and stay at same level. jsr popdir and stay at same level.
stx pbuf stx pbuf
@ -181,7 +178,7 @@ L5E48 lda pbuf+1,x
showfiles stz valcnt showfiles stz valcnt
stz topname init top filename index. stz topname init top filename index.
lda filecount # of valid files. lda filecount # of valid files.
beq L5EB0 if no files. beq keyloop if no files.
cmp #$15 more than what will fit on screen ? cmp #$15 more than what will fit on screen ?
bcc L5E61 no. bcc L5E61 no.
lda #$14 limit to 20 files on the screen. lda #$14 limit to 20 files on the screen.
@ -222,9 +219,8 @@ dnarrow jsr nameprnt print old name in normal.
L5EA7 jsr cout L5EA7 jsr cout
L5EAA jsr setinv set inverse text mode. L5EAA jsr setinv set inverse text mode.
jsr nameprnt output last filename. jsr nameprnt output last filename.
keyloop .EQ *-ofsB keyloop lda kbd get keyboard input.
L5EB0 lda kbd get keyboard input. bpl keyloop loop until key pressed.
bpl L5EB0 loop until key pressed.
sta KBDSTROBE clear strobe. sta KBDSTROBE clear strobe.
jsr setnorm set normal text mode. jsr setnorm set normal text mode.
ldx filecount are any files displayed ? ldx filecount are any files displayed ?
@ -238,15 +234,14 @@ L5EB0 lda kbd get keyboard input.
L5ECB cmp #$89 tab ? L5ECB cmp #$89 tab ?
beq L5EED new volume. beq L5EED new volume.
cmp #$9B esc ? cmp #$9B esc ?
bne L5EB0 no, try again else pop up a directory. bne keyloop no, try again else pop up a directory.
* pop a directory level * pop a directory level
jsr popdir jsr popdir
dec dlevel dec dlevel
bra L5EF1 bra L5EF1
popdir .EQ *-ofsB popdir ldx pbuf
ldx pbuf
L5EDD dex L5EDD dex
lda pbuf,x lda pbuf,x
cmp #$2F slash cmp #$2F slash
@ -303,20 +298,17 @@ L5F04 iny start at y = 1.
* output messages. on entry: acc = horizontal position, * output messages. on entry: acc = horizontal position,
* y = index to message teminated by 0. * y = index to message teminated by 0.
sethorz .EQ *-ofsB sethorz sta ch
sta ch msgout lda dsp2msg,y
msgout .EQ *-ofsB
L5F4C lda dsp2msg,y
beq L5F57 beq L5F57
jsr cout jsr cout
iny iny
bne L5F4C bne msgout
L5F57 rts L5F57 rts
* name pointer calculator for name storage area * name pointer calculator for name storage area
namecalc .EQ *-ofsB namecalc stz fnstore+1 init high byte of 16-bit shift
stz fnstore+1 init high byte of 16-bit shift
txa txa
asl shift to high nibble asl shift to high nibble
rol fnstore+1 rol fnstore+1
@ -338,8 +330,7 @@ namecalc .EQ *-ofsB
* output a filename line * output a filename line
nameprnt .EQ *-ofsB nameprnt lda #$02
lda #$02
sta ch80col horizontal position = 2. sta ch80col horizontal position = 2.
ldx valcnt filename number ldx valcnt filename number
txa txa
@ -364,54 +355,40 @@ L5F9F iny y = 1 (first time).
jsr output put on screen. jsr output put on screen.
cpy namelen end of name ? cpy namelen end of name ?
bcc L5F9F no. bcc L5F9F no.
outsp .EQ *-ofsB output a space. outsp lda #$A0
lda #$A0
bne L5FB1 branch always. bne L5FB1 branch always.
homecurs .EQ *-ofsB screen control - home cursor homecurs lda #$99
lda #$99 output ora #$80 set high bit.
output .EQ *-ofsB
ora #$80 set high bit.
L5FB1 jmp cout output to screen. L5FB1 jmp cout output to screen.
doread .EQ *-ofsB doread jsr MLI mli read call
jsr MLI mli read call
.DA #$CA .DA #$CA
.DA rd_parms .DA rd_parms
rts rts
* data area * data area
dsp2msg .EQ *-ofsB dsp2msg .AS -"RETURN: Select | TAB: Chg Vol | "
.AS -"RETURN: Select | TAB: Chg Vol | "
.AS -"ESC: Back" .AS -"ESC: Back"
.DA #$00 .DA #$00
fldrmsg .EQ *-ofsB fldrmsg .DA #$0F inverse control code
.DA #$0F inverse control code
.HS 1B enable mousetext .HS 1B enable mousetext
.AS -"XY" folder characters .AS -"XY" folder characters
.HS 18 disable mousetext .HS 18 disable mousetext
.HS 0E normal control code .HS 0E normal control code
.HS 00 .HS 00
op_parms .EQ *-ofsB open parameters op_parms .DA #$03 3 parms
.DA #$03 3 parms
.DA pbuf pathname .DA pbuf pathname
.DA op_buf file buffer .DA op_buf file buffer
op_refn .EQ *-ofsB op_refn .HS 00 reference number
.HS 00 reference number cl_parms .HS 01 1 parm
cl_parms .EQ *-ofsB close parameters
.HS 01 1 parm
.HS 00 reference number. .HS 00 reference number.
ol_parms .EQ *-ofsB online parameters ol_parms .HS 02 2 parms
.HS 02 2 parms ol_unit .HS 60 unit number, default = s6, d1
ol_unit .EQ *-ofsB
.HS 60 unit number, default = s6, d1
.DA pbuf+1 data buffer .DA pbuf+1 data buffer
pf_parms .EQ *-ofsB set prefix parameters pf_parms .DA #01 one parm
.DA #01 one parm
.DA pbuf pathname .DA pbuf pathname
rd_parms .EQ *-ofsB read parameters rd_parms .DA #04 4 parms
.DA #04 4 parms rd_refn .HS 01 reference number
rd_refn .EQ *-ofsB
.HS 01 reference number
.DA sysentry data buffer .DA sysentry data buffer
* these last 2 parms (4 bytes) may extend past $300 length limit since * these last 2 parms (4 bytes) may extend past $300 length limit since
@ -420,10 +397,7 @@ rd_refn .EQ *-ofsB
* .HS 0000 requested length * .HS 0000 requested length
* .HS 0000 actual length * .HS 0000 actual length
dhdr_len .EQ *-ofsB directory header length dhdr_len .HS 00 directory header length (actually uses 2 bytes)
.HS 00 (actually uses 2 bytes)
* end of obj sel_1
*-------------------------------------- *--------------------------------------
MAN MAN
SAVE USR/SRC/PRODOS.203/PRODOS.S.SEL1 SAVE USR/SRC/PRODOS.203/PRODOS.S.SEL1

View File

@ -13,8 +13,6 @@ NEW
* (as other replacement quit code is supposed to do) because GQuit checks * (as other replacement quit code is supposed to do) because GQuit checks
* this to see if this version of quit code is available. * this to see if this version of quit code is available.
ofsQ .EQ *-dispadr offset to GQuit dispatcher org
GQdisp lda RRAMWRAMBNK1 read/write LC bank 1 GQdisp lda RRAMWRAMBNK1 read/write LC bank 1
clc clc
xce 16 bit native mode. xce 16 bit native mode.
@ -121,8 +119,7 @@ L608B jsr dolaunch check for possible 2nd pathname.
L6099 lda RROMBNK2 enable ROM L6099 lda RROMBNK2 enable ROM
jmp sysentry execute the system application jmp sysentry execute the system application
gqerror .EQ *-ofsQ gqerror clc
clc
xce 16 bit native mode xce 16 bit native mode
>LONGMX >LONGMX
jsr mountvol mount volume. jsr mountvol mount volume.
@ -166,8 +163,7 @@ L60AB clc native mode
* on exit: carry clear if mount volume displayed and 'return' was pressed. * on exit: carry clear if mount volume displayed and 'return' was pressed.
* carry set if no window displayed or if had window and 'esc' pressed. * carry set if no window displayed or if had window and 'esc' pressed.
mountvol .EQ *-ofsQ mountvol ldy ##$0000 volbuf>>16
ldy ##$0000 volbuf>>16
ldx ##volbuf set up pointer to volume name. ldx ##volbuf set up pointer to volume name.
* if error is 'volume not found' or 'no disk in drive' then display the * if error is 'volume not found' or 'no disk in drive' then display the
@ -224,8 +220,7 @@ L613C sec indicate Escape was pressed.
* inputs: x = length byte of complete pathname containing volume name. * inputs: x = length byte of complete pathname containing volume name.
* output: volume name is stored in volbuf. * output: volume name is stored in volbuf.
copyvol .EQ *-ofsQ copyvol lda >1,x get the first slash
lda >1,x get the first slash
sta volbuf+1 sta volbuf+1
ldy ##$0002 initialize the length count. ldy ##$0002 initialize the length count.
@ -247,8 +242,7 @@ L6156 dey fix character count.
* on exit, the z-flag is set if a filename was correctly passed to the * on exit, the z-flag is set if a filename was correctly passed to the
* application elst the z-flag is clear if it couldn't be done. * application elst the z-flag is clear if it couldn't be done.
dolaunch .EQ *-ofsQ dolaunch lda sysentry does the app start with a jump ?
lda sysentry does the app start with a jump ?
cmp #$4C cmp #$4C
bne L616F no, doesn't follow the convention. bne L616F no, doesn't follow the convention.
lda #$EE check for the signature bytes. lda #$EE check for the signature bytes.
@ -359,8 +353,7 @@ L6231 rts and go launch the app.
* carry clear = disk was found * carry clear = disk was found
* carry set = disk not found * carry set = disk not found
ckfordrv .EQ *-ofsQ ckfordrv clc native mode
SEL2.ckfordrv clc native mode
xce xce
>LONGX 16-bit regs, 8-bit acc. >LONGX 16-bit regs, 8-bit acc.
ldx ##sysentry+6 point to pathname buffer. ldx ##sysentry+6 point to pathname buffer.
@ -383,41 +376,28 @@ SEL2.ckfordrv clc native mode
* Prodos 8 parameter lists * Prodos 8 parameter lists
pfxparms .EQ *-ofsQ set prefix parms. pfxparms .DA #01 one parm.
.DA #01 one parm.
.DA inbuf address of prefix. .DA inbuf address of prefix.
opnparms .EQ *-ofsQ open parms. opnparms .DA #3 3 parms.
.DA #3 3 parms.
.DA pbuf pathname .DA pbuf pathname
.DA op_buf i/o buffer .DA op_buf i/o buffer
oprefnum .EQ *-ofsQ oprefnum .HS 00 reference #
.HS 00 reference # eofparms .DA #02 2 parms
eofparms .EQ *-ofsQ eofrefn .HS 00 reference #
.DA #02 2 parms eofval .HS 000000 3 byte eof value
eofrefn .EQ *-ofsQ readparm .DA #04 4 parms
.HS 00 reference # rdrefnum .HS 00 reference #
eofval .EQ *-ofsQ
.HS 000000 3 byte eof value
readparm .EQ *-ofsQ
.DA #04 4 parms
rdrefnum .EQ *-ofsQ
.HS 00 reference #
.DA sysentry read into $2000 (bank 0). .DA sysentry read into $2000 (bank 0).
rdcount .EQ *-ofsQ rdcount .HS 0000 # of bytes to read.
.HS 0000 # of bytes to read.
.HS 0000 transfer count .HS 0000 transfer count
closeprm .EQ *-ofsQ closeprm .DA #1 1 parm
.DA #1 1 parm closeref .HS 00 reference #
closeref .EQ *-ofsQ quitparms .DA #04 4 parms.
.HS 00 reference #
quitparms .EQ *-ofsQ
.DA #04 4 parms.
.HS 00 quit back to launcher (GQuit) .HS 00 quit back to launcher (GQuit)
.HS 0000 .HS 0000
.HS 00 .HS 00
.HS 0000 .HS 0000
gfiparms .EQ *-ofsQ get file info parms. gfiparms .DA #$0A 10 parms
.DA #$0A 10 parms
.DA volbuf volume buffer .DA volbuf volume buffer
.DA #0 access .DA #0 access
.DA #0 file type .DA #0 file type
@ -432,36 +412,27 @@ gfiparms .EQ *-ofsQ get file info parms.
* messages for P8 fatal error. maximum length of message is 35 characters. * messages for P8 fatal error. maximum length of message is 35 characters.
* the error code will be displayed immediately after the final character. * the error code will be displayed immediately after the final character.
quitstr1 .EQ *-ofsQ quitstr1 .DA #$1B
.DA #$1B
.AS "Can't run next application." .AS "Can't run next application."
quitstr2 .EQ *-ofsQ quitstr2 .DA #$14
.DA #$14
.AS "ProDOS Error = $" .AS "ProDOS Error = $"
errval .EQ *-ofsQ hex error code gets stored here errval .AS " "
.AS " " quitbtn2 .HS 00
quitbtn2 .EQ *-ofsQ null string (no 2nd button)
.HS 00
* messages for P8 mount volume. maximum length of message is 35 characters. * messages for P8 mount volume. maximum length of message is 35 characters.
* the button labels must not be more than 16 characters. * the button labels must not be more than 16 characters.
mountmsg .EQ *-ofsQ mountmsg .DA #$17
.DA #$17
.AS "Please insert the disk:" .AS "Please insert the disk:"
button1 .EQ *-ofsQ button1 .DA #$0D
.DA #$0D
.AS "Accept: " .AS "Accept: "
.DA #$1B mousetext on .DA #$1B mousetext on
.DA #$0F inverse on .DA #$0F inverse on
.DA #$4D mousetext return .DA #$4D mousetext return
.DA #$0E normal on .DA #$0E normal on
.DA #$18 mousetext off .DA #$18 mousetext off
button2 .EQ *-ofsQ button2 .DA #$0B
.DA #$0B
.AS "Cancel: Esc" .AS "Cancel: Esc"
* end of obj sel_2 (must be < GQdisp+$300)
*-------------------------------------- *--------------------------------------
MAN MAN
SAVE USR/SRC/PRODOS.203/PRODOS.S.SEL2 SAVE USR/SRC/PRODOS.203/PRODOS.S.SEL2

View File

@ -6,16 +6,15 @@ NEW
* $2F00-2F7C moved to $D742 * $2F00-2F7C moved to $D742
ofsT .EQ *-tclk_in offset to Thunderclock org TCLK.START ldx TCLK.Cx2+2 clock slot = $C1.
tclock_0 ldx clkslt clock slot = $C1.
lda clkmode,x save current mode lda clkmode,x save current mode
pha pha
lda #$A3 send numeric mode byte to Thunderclock lda #$A3 send numeric mode byte to Thunderclock
jsr wttcp
clkslt .EQ *-ofsT+2 points to $C1.
TCLK.clkslt jsr rdtcp read month, day of week, day of month TCLK.Cx1 jsr wttcp
TCLK.Cx2 jsr rdtcp read month, day of week, day of month
clc and time into input buffer. clc and time into input buffer.
ldx #$04 index for 5 values. ldx #$04 index for 5 values.
ldy #$0C read minutes 1st, month last. ldy #$0C read minutes 1st, month last.
@ -64,15 +63,14 @@ TCLK.clkslt jsr rdtcp read month, day of week, day of month
lda A2L minute lda A2L minute
sta p8time sta p8time
pla restore previous mode. pla restore previous mode.
ldx clkslt clock slot = $C1 ldx TCLK.Cx2+2 clock slot = $C1
sta clkmode,x sta clkmode,x
H2F69 rts TCLK.CEND rts
* this table contains entries for the cumulative # of days in a year, * this table contains entries for the cumulative # of days in a year,
* one entry for each month. the values are modulo 256. * one entry for each month. the values are modulo 256.
tdays .EQ *-ofsT tdays .DA #$00 January
.DA #$00 January
.DA #$1F February .DA #$1F February
.DA #$3B March .DA #$3B March
.DA #$5A April .DA #$5A April
@ -91,16 +89,15 @@ tdays .EQ *-ofsT
* is the year which January 1st is Sunday, and so on backwards thru * is the year which January 1st is Sunday, and so on backwards thru
* the days of the week. * the days of the week.
yradj .EQ *-ofsT yradj .DA #$07 Monday
.DA #$07 Monday
.DA #$0C Sunday .DA #$0C Sunday
.DA #$0B Saturday .DA #$0B Saturday
.DA #$0A Friday .DA #$0A Friday
.DA #$09 Thursday .DA #$09 Thursday
.DA #$08 Wednesday .DA #$08 Wednesday
.DA #$08 Tuesday .DA #$08 Tuesday
tclk_end .EQ * end of obj tclock_0.
.HS 000000 pad TCLK.END .HS 000000 pad
*-------------------------------------- *--------------------------------------
MAN MAN
SAVE USR/SRC/PRODOS.203/PRODOS.S.TCLK SAVE USR/SRC/PRODOS.203/PRODOS.S.TCLK

View File

@ -192,9 +192,14 @@ GP .PH $BF00
.INB USR/SRC/PRODOS.203/PRODOS.S.GP .INB USR/SRC/PRODOS.203/PRODOS.S.GP
.EP .EP
TCLK .PH $D742
.INB USR/SRC/PRODOS.203/PRODOS.S.TCLK .INB USR/SRC/PRODOS.203/PRODOS.S.TCLK
.INB USR/SRC/PRODOS.203/PRODOS.S.CCLK .EP
CCLK .PH $D742
.INB USR/SRC/PRODOS.203/PRODOS.S.CCLK
.EP
XDOS .PH $DE00 XDOS .PH $DE00
.INB USR/SRC/PRODOS.203/PRODOS.S.XDOS.A .INB USR/SRC/PRODOS.203/PRODOS.S.XDOS.A
.INB USR/SRC/PRODOS.203/PRODOS.S.XDOS.B .INB USR/SRC/PRODOS.203/PRODOS.S.XDOS.B
@ -213,15 +218,15 @@ XRW .PH $D000
.INB USR/SRC/PRODOS.203/PRODOS.S.DISKII .INB USR/SRC/PRODOS.203/PRODOS.S.DISKII
.EP .EP
SEL0 .PH $D100 SEL0 .PH $1000
.INB USR/SRC/PRODOS.203/PRODOS.S.SEL0 .INB USR/SRC/PRODOS.203/PRODOS.S.SEL0
.EP .EP
SEL1 .PH $D100 SEL1 .PH $1000
.INB USR/SRC/PRODOS.203/PRODOS.S.SEL1 .INB USR/SRC/PRODOS.203/PRODOS.S.SEL1
.EP .EP
SEL2 .PH $D100 SEL2 .PH $1000
.INB USR/SRC/PRODOS.203/PRODOS.S.SEL2 .INB USR/SRC/PRODOS.203/PRODOS.S.SEL2
.EP .EP
*-------------------------------------- *--------------------------------------