mirror of
https://github.com/a2stuff/IIcSystemClock.git
synced 2025-01-27 16:36:23 +00:00
disasm tweaks/comments
This commit is contained in:
parent
08990af793
commit
f9d3511fb8
@ -199,7 +199,7 @@ loop:
|
|||||||
|
|
||||||
lda file_info_params + GET_FILE_INFO_PARAMS::mod_date + 1
|
lda file_info_params + GET_FILE_INFO_PARAMS::mod_date + 1
|
||||||
lsr a
|
lsr a
|
||||||
sta year
|
sta year ; patch driver
|
||||||
jsr ConvertToBCD
|
jsr ConvertToBCD
|
||||||
sta bcd_year
|
sta bcd_year
|
||||||
|
|
||||||
@ -488,7 +488,7 @@ install_ptr := * + 1
|
|||||||
and #$0F
|
and #$0F
|
||||||
clc
|
clc
|
||||||
adc tmp
|
adc tmp
|
||||||
sta year
|
sta year ; patch driver
|
||||||
rts
|
rts
|
||||||
.endproc
|
.endproc
|
||||||
|
|
||||||
@ -649,6 +649,10 @@ acia_command_patch3 := * + 1
|
|||||||
;; --------------------------------------------------
|
;; --------------------------------------------------
|
||||||
;; Process fields (two digits/bytes at a time)
|
;; Process fields (two digits/bytes at a time)
|
||||||
|
|
||||||
|
;; 6 and 7 (minute) --> TIMELO
|
||||||
|
;; 4 and 5 (hour) --> TIMEHI
|
||||||
|
;; 2 and 3 (day) --> DATELO
|
||||||
|
|
||||||
ldx #6
|
ldx #6
|
||||||
digit_loop:
|
digit_loop:
|
||||||
lda digits_buffer+1,x ; ones place
|
lda digits_buffer+1,x ; ones place
|
||||||
@ -662,8 +666,8 @@ digit_loop:
|
|||||||
;; A now holds binary value
|
;; A now holds binary value
|
||||||
|
|
||||||
offset_table_addr := * + 1
|
offset_table_addr := * + 1
|
||||||
ldy time_offset_table,x ; Offset table
|
ldy time_offset_table,x
|
||||||
sta DEVNUM,y ; y is offset from DEVNUM for RTS hack below
|
sta DATELO - OPC_RTS,y ; y is offset by $60 for RTS hack below
|
||||||
dex
|
dex
|
||||||
dex
|
dex
|
||||||
bne digit_loop
|
bne digit_loop
|
||||||
@ -674,22 +678,22 @@ digit_loop:
|
|||||||
;; --------------------------------------------------
|
;; --------------------------------------------------
|
||||||
;; Assign month in DATELO/DATEHI
|
;; Assign month in DATELO/DATEHI
|
||||||
|
|
||||||
L22BA: lda digits_buffer ; top nibble is month
|
L22BA: lda digits_buffer ; top nibble is month (mmmm0000)
|
||||||
asl a ; DATELO = mmmddddd
|
asl a ; C=MSB of month
|
||||||
and #%11100000
|
and #%11100000 ; DATELO = mmmddddd
|
||||||
ora DATELO
|
ora DATELO
|
||||||
sta DATELO
|
sta DATELO
|
||||||
|
|
||||||
year := * + 1
|
year := * + 1 ; modified by installer
|
||||||
lda #(kDefaultYear .mod 100)
|
lda #(kDefaultYear .mod 100)
|
||||||
rol a ; DATEHI = yyyyyyym, shift in month bit
|
rol a ; DATEHI = yyyyyyym, shift in month MSB
|
||||||
sta DATELO+1
|
sta DATELO+1
|
||||||
;; --------------------------------------------------
|
;; --------------------------------------------------
|
||||||
|
|
||||||
;; ???
|
;; Convert $207/$208 to ASCII digits at $20E/$02F (Why???)
|
||||||
ldy #$01
|
ldy #$01
|
||||||
: lda $0208,y
|
: lda $0208,y
|
||||||
ora #$B0
|
ora #$B0 ; '0'|$80
|
||||||
sta $020F,y
|
sta $020F,y
|
||||||
dey
|
dey
|
||||||
bpl :-
|
bpl :-
|
||||||
@ -705,7 +709,8 @@ L22BA: lda digits_buffer ; top nibble is month
|
|||||||
|
|
||||||
;; HACK: This RTS=$60 doubles as the first real entry in the
|
;; HACK: This RTS=$60 doubles as the first real entry in the
|
||||||
;; offset table.
|
;; offset table.
|
||||||
.assert OPC_RTS = DATELO - DEVNUM, error, "Offset mismatch"
|
.assert OPC_RTS = $60, error, "Offset mismatch"
|
||||||
|
;;
|
||||||
rts
|
rts
|
||||||
|
|
||||||
;; Offset from MMDDhhmm digits to DATE/TIME fields in
|
;; Offset from MMDDhhmm digits to DATE/TIME fields in
|
||||||
@ -715,9 +720,9 @@ L22BA: lda digits_buffer ; top nibble is month
|
|||||||
time_offset_table := * - 3
|
time_offset_table := * - 3
|
||||||
|
|
||||||
.byte $FF ; dummy
|
.byte $FF ; dummy
|
||||||
.byte TIMELO+1 - DEVNUM ; offset to hours field
|
.byte TIMELO+1 - DATELO + OPC_RTS ; offset to hours field
|
||||||
.byte $FF ; dummy
|
.byte $FF ; dummy
|
||||||
.byte TIMELO - DEVNUM ; offset to minutes field
|
.byte TIMELO - DATELO + OPC_RTS ; offset to minutes field
|
||||||
|
|
||||||
;; End of relocated clock driver
|
;; End of relocated clock driver
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user