Kernel 0.93+

This commit is contained in:
Rémy GIBERT 2019-10-17 22:21:22 +02:00
parent 1ba1799a09
commit 1615bb2ef8
5 changed files with 44 additions and 19 deletions

Binary file not shown.

View File

@ -1,10 +1,11 @@
NEW
AUTO 3,1
* object code = tclock_0
*--------------------------------------
* Thunderclock driver
* hard coded for slot 1
* $2F00-2F7C moved to $D742
*--------------------------------------
clkmode .EQ $0538 clock mode
TCLK.START ldx TCLK.Cx2+2 clock slot = $C1.
@ -15,9 +16,11 @@ TCLK.START ldx TCLK.Cx2+2 clock slot = $C1.
TCLK.Cx1 jsr wttcp
TCLK.Cx2 jsr rdtcp read month, day of week, day of month
clc and time into input buffer.
ldx #$04 index for 5 values.
ldy #$0C read minutes 1st, month last.
.1 lda inbuf,y convert values to binary.
and #$07 no value > 5 decimal.
sta pcl 'tens' place value
@ -34,6 +37,7 @@ TCLK.Cx2 jsr rdtcp read month, day of week, day of month
dey
dex are there more values?
bpl .1 if yes.
tay contains month
lsr
ror
@ -45,23 +49,31 @@ TCLK.Cx2 jsr rdtcp read month, day of week, day of month
and #$1F isolate day.
adc tdays-1,y (y = month)
bcc .2 branch if not Sept 13 thru 30th
adc #$03 adj for mod 7 when day > 256
.2 sec
.3 sbc #$07
bcs .3 loop until < 0.
adc #$07 make it in the range of 0-6.
sbc pch the delta provides years offset.
bcs .4 branch if positive
adc #$07 else make it positive again.
.4 tay
lda yradj,y look up year
plp and combine it with hi bit of month
rol
sta p8date+1 P8 date
lda A1L+1 hour
sta p8time+1 P8 time
lda A2L minute
sta p8time
pla restore previous mode.
ldx TCLK.Cx2+2 clock slot = $C1
sta clkmode,x
@ -89,13 +101,14 @@ tdays .DA #$00 January
* is the year which January 1st is Sunday, and so on backwards thru
* the days of the week.
yradj .DA #$07 Monday
.DA #$0C Sunday
.DA #$0B Saturday
.DA #$0A Friday
.DA #$09 Thursday
.DA #$08 Wednesday
.DA #$08 Tuesday
yradj .DA #$12 Monday
.DA #$17 Sunday
.DA #$16 Saturday
.DA #$15 Friday
.DA #$14 Thursday
.DA #$14 Wednesday
.DA #$13 Tuesday
TCLK.END .HS 000000 pad
*--------------------------------------
MAN

View File

@ -804,6 +804,7 @@ L595F sta pch
iny if even, then pre-xor with byte 1.
eor (buf),y
L596D sta A1L save result for write routine.
L596F ldy #$FF index to last byte of data to write.
lda (buf),y to be used as a checksum.
and #$FC strip extra bits
@ -822,11 +823,13 @@ L596F ldy #$FF index to last byte of data to write.
stx wrefd4+1
stx wrefd5+1
rts
chkprev eor iobpdn same slot as last ?
asl
beq L59BD
lda #$01
sta montimeh
L59A6 lda iobpdn
and #$70
tax
@ -849,21 +852,28 @@ rsetphse lda unitnum get unit number.
lda phaseoff+4,x
lda phaseoff+6,x
rts
docheck lda A4L command #.
cmp #$04 is the command allowed ?
bcs L59E6 if not.
bcs .9 if not.
lda bloknml
ldx bloknml+1
stx ibtrk calculate block's track and sector.
beq L59E8 branch if block # is in range,
beq .8 branch if block # is in range,
dex else test further.
bne L59E6 taken if bad range.
bne .9 taken if bad range.
cmp #$18 must be < $118
bcc L59E8 then ok.
L59E6 sec error.
bcc .8 then ok.
.9 sec error.
rts
L59E8 clc
.8 clc
rts end of obj xrw_0
.LIST ON
XRW.FREE .EQ $D6EC-* (ProDOS 2.0.3 = $02)
.LIST OFF

View File

@ -113,7 +113,7 @@ pwredup .EQ $03F4 power up byte
nmivect .EQ $03FB nmi handler
txtp2 .EQ $0400 test location for aux card
vmode .EQ $04FB video firmware operating mode
clkmode .EQ $0538 clock mode
ch80col .EQ $057B 80 column ch position
vline5 .EQ $0600 line 5 of display
vline10 .EQ $04A8 line 10 of display

View File

@ -618,9 +618,11 @@ DevMgrInit.USR ldx #4
>LDYAI DRV.BlkDevice
bra DevMgrInit.AddBDev
*--------------------------------------
DevMgrInit.BLK ldy #$ff
lda (ZPPtr1),y
sta FD.BDEV+S.FD.DEV.BUSPTR
DevMgrInit.BLK
* ldy #$ff
* lda (ZPPtr1),y
* sta FD.BDEV+S.FD.DEV.BUSPTR
ldx #6
>LDYAI DRV.BlkDevice
bra DevMgrInit.AddBDev