mirror of
https://github.com/a2stuff/prodos-drivers.git
synced 2025-02-21 00:28:59 +00:00
Answer some questions by RTFM
This commit is contained in:
parent
a445735244
commit
34acbaf822
10
cricket.s
10
cricket.s
@ -53,17 +53,17 @@ loop: lda driver,y
|
|||||||
;; Configure SSC
|
;; Configure SSC
|
||||||
lda #%00001011
|
lda #%00001011
|
||||||
sta COMMAND
|
sta COMMAND
|
||||||
lda #%10011110 ; 9600 baud, 8 data bits, 1 stop bit
|
lda #%10011110 ; 9600 baud, 8 data bits, 2 stop bits
|
||||||
sta CONTROL
|
sta CONTROL
|
||||||
: lda STATUS
|
: lda STATUS
|
||||||
and #(1 << 4) ; transmit register empty? (bit 4)
|
and #(1 << 4) ; transmit register empty? (bit 4)
|
||||||
beq :- ; nope, keep waiting
|
beq :- ; nope, keep waiting
|
||||||
|
|
||||||
;; Send command
|
;; Send command
|
||||||
lda #('@' | $80)
|
lda #('@' | $80) ; '@' command
|
||||||
sta TDREG
|
sta TDREG
|
||||||
|
|
||||||
read_len := 7 ; read 7 bytes (?/M/D/Y/h/m/?)
|
read_len := 7 ; read 7 bytes (w/m/d/y/H/M/S)
|
||||||
|
|
||||||
;; Read response, pushing to stack
|
;; Read response, pushing to stack
|
||||||
ldy #(read_len-1)
|
ldy #(read_len-1)
|
||||||
@ -95,7 +95,7 @@ ready: lda RDREG
|
|||||||
bpl rloop
|
bpl rloop
|
||||||
|
|
||||||
;; Convert pushed response to ProDOS time field
|
;; Convert pushed response to ProDOS time field
|
||||||
pla ; ???
|
pla ; day of week (unused)
|
||||||
|
|
||||||
pla ; minute
|
pla ; minute
|
||||||
sta TIMELO ; -- stored as-is (TIMELO 5-0)
|
sta TIMELO ; -- stored as-is (TIMELO 5-0)
|
||||||
@ -120,7 +120,7 @@ ready: lda RDREG
|
|||||||
sta DATELO
|
sta DATELO
|
||||||
rol DATELO+1
|
rol DATELO+1
|
||||||
|
|
||||||
pla ; ???
|
pla ; seconds (unused)
|
||||||
|
|
||||||
;; Restore prior state
|
;; Restore prior state
|
||||||
done: pla ; restore saved command state
|
done: pla ; restore saved command state
|
||||||
|
Loading…
x
Reference in New Issue
Block a user