2021-07-26 12:33:08 +00:00
|
|
|
|
NEW
|
|
|
|
|
AUTO 3,1
|
|
|
|
|
*--------------------------------------
|
2023-11-04 14:42:28 +00:00
|
|
|
|
* Driver For Not Slot Clock (DS1215)
|
2021-07-26 12:33:08 +00:00
|
|
|
|
*--------------------------------------
|
|
|
|
|
* we can safely use $200 (used by TCLK)
|
|
|
|
|
*--------------------------------------
|
|
|
|
|
DS1215.DATA .EQ $200 Reverted YY MM DD Day HH mm SS CS
|
|
|
|
|
*--------------------------------------
|
2023-11-04 14:42:28 +00:00
|
|
|
|
DCLK.START .PH CLK
|
|
|
|
|
|
|
|
|
|
DCLK.START1 php
|
2021-07-26 12:33:08 +00:00
|
|
|
|
sei
|
|
|
|
|
|
|
|
|
|
lda $C400
|
|
|
|
|
|
|
|
|
|
stz $C0C0
|
2021-08-01 13:45:15 +00:00
|
|
|
|
stz $C0C1
|
2021-07-26 12:33:08 +00:00
|
|
|
|
|
|
|
|
|
ldy #8
|
|
|
|
|
stz $C0C2
|
|
|
|
|
|
|
|
|
|
lda $C0C3
|
|
|
|
|
pha
|
|
|
|
|
|
|
|
|
|
.1 lda DS1215.SIG-1,y
|
|
|
|
|
|
|
|
|
|
ldx #8
|
|
|
|
|
|
|
|
|
|
.2 sta $C0C3
|
|
|
|
|
stz $C0C0
|
|
|
|
|
|
|
|
|
|
lsr
|
|
|
|
|
dex
|
|
|
|
|
bne .2
|
|
|
|
|
|
|
|
|
|
dey
|
|
|
|
|
bne .1
|
|
|
|
|
|
|
|
|
|
ldx #8
|
|
|
|
|
|
|
|
|
|
.4 ldy #8
|
|
|
|
|
|
|
|
|
|
.5 pha
|
|
|
|
|
lda $C0C3
|
|
|
|
|
|
|
|
|
|
lsr
|
|
|
|
|
pla
|
|
|
|
|
ror
|
|
|
|
|
|
|
|
|
|
dey
|
|
|
|
|
bne .5
|
|
|
|
|
|
|
|
|
|
pha
|
|
|
|
|
lsr
|
|
|
|
|
lsr
|
|
|
|
|
lsr
|
|
|
|
|
lsr
|
|
|
|
|
tay
|
|
|
|
|
pla
|
|
|
|
|
and #$0F
|
|
|
|
|
|
|
|
|
|
clc
|
|
|
|
|
|
|
|
|
|
.HS 2C Bit Absolute to skip adc #$0A
|
|
|
|
|
|
|
|
|
|
.6 adc #$0A
|
|
|
|
|
dey
|
|
|
|
|
bpl .6
|
|
|
|
|
|
|
|
|
|
sta DS1215.DATA-1,x
|
|
|
|
|
dex
|
|
|
|
|
bne .4
|
|
|
|
|
|
|
|
|
|
pha DS1215.DATA
|
|
|
|
|
|
|
|
|
|
lda DS1215.DATA+1 Get MM
|
|
|
|
|
asl
|
|
|
|
|
asl
|
|
|
|
|
asl
|
|
|
|
|
asl
|
|
|
|
|
asl
|
|
|
|
|
ora DS1215.DATA+2 Get DD
|
2023-11-04 14:42:28 +00:00
|
|
|
|
sta GP.DATE
|
2021-07-26 12:33:08 +00:00
|
|
|
|
|
|
|
|
|
* lda DS1215.DATA Get YY
|
|
|
|
|
|
|
|
|
|
pla
|
|
|
|
|
rol
|
2023-11-04 14:42:28 +00:00
|
|
|
|
sta GP.DATE+1
|
2021-07-26 12:33:08 +00:00
|
|
|
|
|
|
|
|
|
lda DS1215.DATA+5 Get mm
|
2023-11-04 14:42:28 +00:00
|
|
|
|
sta GP.TIME
|
2021-07-26 12:33:08 +00:00
|
|
|
|
|
|
|
|
|
lda DS1215.DATA+4 Get HH
|
2023-11-04 14:42:28 +00:00
|
|
|
|
sta GP.TIME+1
|
2021-07-26 12:33:08 +00:00
|
|
|
|
|
|
|
|
|
stz $C0C0
|
|
|
|
|
|
|
|
|
|
pla
|
|
|
|
|
sta $C0C3
|
|
|
|
|
|
|
|
|
|
plp
|
|
|
|
|
rts
|
|
|
|
|
*--------------------------------------
|
|
|
|
|
DS1215.SIG .HS 5CA33AC55CA33AC5 Reverted 7->0
|
|
|
|
|
*--------------------------------------
|
2023-11-04 14:42:28 +00:00
|
|
|
|
.EP
|
|
|
|
|
*--------------------------------------
|
|
|
|
|
* .LIST ON
|
2021-07-26 12:33:08 +00:00
|
|
|
|
DCLK.LEN .EQ *-DCLK.START
|
|
|
|
|
.LIST OFF
|
|
|
|
|
*--------------------------------------
|
|
|
|
|
* CONTROL SECTION :
|
|
|
|
|
*--------------------------------------
|
|
|
|
|
.DO DCLK.LEN>125
|
|
|
|
|
ERROR:NCLK Driver too big
|
|
|
|
|
.FIN
|
|
|
|
|
*--------------------------------------
|
|
|
|
|
MAN
|
|
|
|
|
SAVE usr/src/prodos.fx/prodos.s.dclk
|
|
|
|
|
LOAD usr/src/prodos.fx/prodos.s
|
|
|
|
|
ASM
|