mirror of
https://github.com/mi57730/a2d.git
synced 2025-02-18 02:30:50 +00:00
date strings
This commit is contained in:
parent
7beedb62b5
commit
fb4b59f204
@ -6027,7 +6027,7 @@ L0D14 := $0D14
|
|||||||
L4000: jmp L4042 ; ???
|
L4000: jmp L4042 ; ???
|
||||||
JT_MGTK_RELAY: jmp MGTK_RELAY
|
JT_MGTK_RELAY: jmp MGTK_RELAY
|
||||||
L4006: jmp L8259 ; ???
|
L4006: jmp L8259 ; ???
|
||||||
L4009: jmp L830F ; ???
|
L4009: jmp compose_date_string ; ???
|
||||||
L400C: jmp L5E78 ; ???
|
L400C: jmp L5E78 ; ???
|
||||||
L400F: jmp DESKTOP_AUXLOAD
|
L400F: jmp DESKTOP_AUXLOAD
|
||||||
JT_EJECT: jmp cmd_eject
|
JT_EJECT: jmp cmd_eject
|
||||||
@ -9390,10 +9390,9 @@ L5B31: lda $EBFD,x
|
|||||||
bpl L5B31
|
bpl L5B31
|
||||||
MGTK_RELAY_CALL MGTK::FindControl, event_params_coords
|
MGTK_RELAY_CALL MGTK::FindControl, event_params_coords
|
||||||
lda findcontrol_which_ctl
|
lda findcontrol_which_ctl
|
||||||
bne L5B4B ; ctl_not_a_control
|
bne :+
|
||||||
jmp L5CB7
|
jmp handle_content_click ; 0 = ctl_not_a_control
|
||||||
|
: bit double_click_flag
|
||||||
L5B4B: bit double_click_flag
|
|
||||||
bmi :+
|
bmi :+
|
||||||
jmp done_client_click ; ignore double click
|
jmp done_client_click ; ignore double click
|
||||||
: cmp #MGTK::ctl_dead_zone
|
: cmp #MGTK::ctl_dead_zone
|
||||||
@ -9422,30 +9421,30 @@ L5B4B: bit double_click_flag
|
|||||||
: cmp #MGTK::part_up_arrow
|
: cmp #MGTK::part_up_arrow
|
||||||
bne :+
|
bne :+
|
||||||
up: jsr scroll_up
|
up: jsr scroll_up
|
||||||
lda #$01
|
lda #MGTK::part_up_arrow
|
||||||
jsr L5C89
|
jsr check_control_repeat
|
||||||
bpl up
|
bpl up
|
||||||
jmp done_client_click
|
jmp done_client_click
|
||||||
|
|
||||||
: cmp #MGTK::part_down_arrow
|
: cmp #MGTK::part_down_arrow
|
||||||
bne :+
|
bne :+
|
||||||
down: jsr scroll_down
|
down: jsr scroll_down
|
||||||
lda #$02
|
lda #MGTK::part_down_arrow
|
||||||
jsr L5C89
|
jsr check_control_repeat
|
||||||
bpl down
|
bpl down
|
||||||
jmp done_client_click
|
jmp done_client_click
|
||||||
|
|
||||||
: cmp #MGTK::part_page_down
|
: cmp #MGTK::part_page_down
|
||||||
beq pgdn
|
beq pgdn
|
||||||
pgup: jsr L638C
|
pgup: jsr L638C
|
||||||
lda #$03
|
lda #MGTK::part_page_up
|
||||||
jsr L5C89
|
jsr check_control_repeat
|
||||||
bpl pgup
|
bpl pgup
|
||||||
jmp done_client_click
|
jmp done_client_click
|
||||||
|
|
||||||
pgdn: jsr L63EC
|
pgdn: jsr L63EC
|
||||||
lda #$04
|
lda #MGTK::part_page_down
|
||||||
jsr L5C89
|
jsr check_control_repeat
|
||||||
bpl pgdn
|
bpl pgdn
|
||||||
jmp done_client_click
|
jmp done_client_click
|
||||||
|
|
||||||
@ -9469,34 +9468,33 @@ horiz: lda active_window_id
|
|||||||
: cmp #MGTK::part_left_arrow
|
: cmp #MGTK::part_left_arrow
|
||||||
bne :+
|
bne :+
|
||||||
left: jsr scroll_left
|
left: jsr scroll_left
|
||||||
lda #$01
|
lda #MGTK::part_left_arrow
|
||||||
jsr L5C89
|
jsr check_control_repeat
|
||||||
bpl left
|
bpl left
|
||||||
jmp done_client_click
|
jmp done_client_click
|
||||||
|
|
||||||
: cmp #MGTK::part_right_arrow
|
: cmp #MGTK::part_right_arrow
|
||||||
bne :+
|
bne :+
|
||||||
rght: jsr scroll_right
|
rght: jsr scroll_right
|
||||||
lda #$02
|
lda #MGTK::part_right_arrow
|
||||||
jsr L5C89
|
jsr check_control_repeat
|
||||||
bpl rght
|
bpl rght
|
||||||
jmp done_client_click
|
jmp done_client_click
|
||||||
|
|
||||||
: cmp #MGTK::part_page_right
|
: cmp #MGTK::part_page_right
|
||||||
beq pgrt
|
beq pgrt
|
||||||
pglt: jsr L6451
|
pglt: jsr L6451
|
||||||
lda #$03
|
lda #MGTK::part_page_left
|
||||||
jsr L5C89
|
jsr check_control_repeat
|
||||||
bpl pglt
|
bpl pglt
|
||||||
jmp done_client_click
|
jmp done_client_click
|
||||||
|
|
||||||
pgrt: jsr L64B0
|
pgrt: jsr L64B0
|
||||||
lda #$04
|
lda #MGTK::part_page_right
|
||||||
jsr L5C89
|
jsr check_control_repeat
|
||||||
bpl pgrt
|
bpl pgrt
|
||||||
jmp done_client_click
|
jmp done_client_click
|
||||||
|
|
||||||
|
|
||||||
done_client_click:
|
done_client_click:
|
||||||
jsr DESKTOP_COPY_FROM_BUF
|
jsr DESKTOP_COPY_FROM_BUF
|
||||||
lda #$00
|
lda #$00
|
||||||
@ -9537,37 +9535,50 @@ L5C71: lda active_window_id
|
|||||||
jsr reset_grafport3
|
jsr reset_grafport3
|
||||||
jmp L6C19
|
jmp L6C19
|
||||||
|
|
||||||
L5C89: sta L5CB6
|
;;; ==================================================
|
||||||
|
;;; Handle mouse held down on scroll arrow/pager
|
||||||
|
|
||||||
|
.proc check_control_repeat
|
||||||
|
sta ctl
|
||||||
jsr peek_event
|
jsr peek_event
|
||||||
lda event_params_kind
|
lda event_params_kind
|
||||||
cmp #MGTK::event_kind_drag
|
cmp #MGTK::event_kind_drag
|
||||||
beq L5C99
|
beq :+
|
||||||
L5C96: lda #$FF
|
bail: lda #$FF ; high bit set = not repeating
|
||||||
rts
|
rts
|
||||||
|
|
||||||
L5C99: MGTK_RELAY_CALL MGTK::FindControl, event_params_coords
|
: MGTK_RELAY_CALL MGTK::FindControl, event_params_coords
|
||||||
lda findcontrol_which_ctl
|
lda findcontrol_which_ctl
|
||||||
beq L5C96
|
beq bail
|
||||||
cmp #$03
|
cmp #MGTK::ctl_dead_zone
|
||||||
beq L5C96
|
beq bail
|
||||||
lda $D20E
|
lda findcontrol_which_part
|
||||||
cmp L5CB6
|
cmp ctl
|
||||||
bne L5C96
|
bne bail
|
||||||
lda #$00
|
lda #0 ; high bit set = repeating
|
||||||
rts
|
rts
|
||||||
|
|
||||||
L5CB6: .byte 0
|
ctl: .byte 0
|
||||||
L5CB7: bit L5B1B
|
.endproc
|
||||||
bpl L5CBF
|
|
||||||
|
;;; ==================================================
|
||||||
|
|
||||||
|
.proc handle_content_click
|
||||||
|
bit L5B1B
|
||||||
|
bpl :+
|
||||||
jmp clear_selection
|
jmp clear_selection
|
||||||
|
|
||||||
L5CBF: lda active_window_id
|
: lda active_window_id
|
||||||
sta $D20E
|
sta $D20E
|
||||||
DESKTOP_RELAY_CALL $09, event_params_coords
|
DESKTOP_RELAY_CALL $09, event_params_coords
|
||||||
lda findcontrol_which_ctl
|
lda findcontrol_which_ctl
|
||||||
bne L5CDA
|
bne L5CDA
|
||||||
jsr L5F13
|
jsr L5F13
|
||||||
jmp L5DEC
|
jmp L5DEC
|
||||||
|
.endproc
|
||||||
|
|
||||||
|
;;; ==================================================
|
||||||
|
|
||||||
|
|
||||||
L5CD9: .byte 0
|
L5CD9: .byte 0
|
||||||
L5CDA: sta L5CD9
|
L5CDA: sta L5CD9
|
||||||
@ -11181,7 +11192,7 @@ L6C25: jsr push_zp_addrs
|
|||||||
L6C39: lda bufnum
|
L6C39: lda bufnum
|
||||||
sta getwinport_params2::window_id
|
sta getwinport_params2::window_id
|
||||||
jsr L4505
|
jsr L4505
|
||||||
L6C42: bit L4152
|
bit L4152
|
||||||
bmi L6C4A
|
bmi L6C4A
|
||||||
jsr L6E8E
|
jsr L6E8E
|
||||||
L6C4A: ldx bufnum
|
L6C4A: ldx bufnum
|
||||||
@ -13654,7 +13665,7 @@ L81F7: jsr L821F
|
|||||||
addr_call SETPOS_RELAY, pointA
|
addr_call SETPOS_RELAY, pointA
|
||||||
jsr L8253
|
jsr L8253
|
||||||
addr_call SETPOS_RELAY, pointB
|
addr_call SETPOS_RELAY, pointB
|
||||||
jsr L830F
|
jsr compose_date_string
|
||||||
addr_jump SETPOS_RELAY, pointC
|
addr_jump SETPOS_RELAY, pointC
|
||||||
|
|
||||||
L821F: lda $EC43
|
L821F: lda $EC43
|
||||||
@ -13695,6 +13706,7 @@ L8272: .byte 0
|
|||||||
L8273: .byte 0
|
L8273: .byte 0
|
||||||
L8274: .byte 0
|
L8274: .byte 0
|
||||||
L8275: .byte 0
|
L8275: .byte 0
|
||||||
|
|
||||||
L8276: ldx #$11
|
L8276: ldx #$11
|
||||||
lda #' '
|
lda #' '
|
||||||
L827A: sta text_buffer2::data-1,x
|
L827A: sta text_buffer2::data-1,x
|
||||||
@ -13737,7 +13749,7 @@ L82C3: inc L8274
|
|||||||
sbc L826A,x
|
sbc L826A,x
|
||||||
sta L8272
|
sta L8272
|
||||||
lda L8273
|
lda L8273
|
||||||
L82D3: sbc L826B,x
|
sbc L826B,x
|
||||||
sta L8273
|
sta L8273
|
||||||
jmp L8291
|
jmp L8291
|
||||||
|
|
||||||
@ -13765,12 +13777,15 @@ L8309: lda #$0C
|
|||||||
L830B: sta text_buffer2::length
|
L830B: sta text_buffer2::length
|
||||||
rts
|
rts
|
||||||
|
|
||||||
L830F: ldx #$15
|
;;; ==================================================
|
||||||
|
|
||||||
|
compose_date_string:
|
||||||
|
ldx #21
|
||||||
lda #' '
|
lda #' '
|
||||||
: sta text_buffer2::data-1,x
|
: sta text_buffer2::data-1,x
|
||||||
dex
|
dex
|
||||||
bpl :-
|
bpl :-
|
||||||
lda #$01
|
lda #1
|
||||||
sta text_buffer2::length
|
sta text_buffer2::length
|
||||||
lda #<text_buffer2::length
|
lda #<text_buffer2::length
|
||||||
sta $08
|
sta $08
|
||||||
@ -13807,9 +13822,9 @@ prep_date_strings:
|
|||||||
.proc prep_day_string
|
.proc prep_day_string
|
||||||
;; String will have trailing space.
|
;; String will have trailing space.
|
||||||
lda #' '
|
lda #' '
|
||||||
sta str_3_spaces+1
|
sta str_day+1
|
||||||
sta str_3_spaces+2
|
sta str_day+2
|
||||||
sta str_3_spaces+3
|
sta str_day+3
|
||||||
|
|
||||||
;; Assume 1 digit (plus trailing space)
|
;; Assume 1 digit (plus trailing space)
|
||||||
ldx #2
|
ldx #2
|
||||||
@ -13830,8 +13845,8 @@ prep_date_strings:
|
|||||||
cmp #30
|
cmp #30
|
||||||
bcc :+
|
bcc :+
|
||||||
ldy #'3'
|
ldy #'3'
|
||||||
: stx str_3_spaces ; length (including trailing space)
|
: stx str_day ; length (including trailing space)
|
||||||
sty str_3_spaces+1 ; first digit
|
sty str_day+1 ; first digit
|
||||||
|
|
||||||
;; Determine second digit.
|
;; Determine second digit.
|
||||||
cpx #2 ; only 1 digit (plus trailing space?)
|
cpx #2 ; only 1 digit (plus trailing space?)
|
||||||
@ -13848,8 +13863,8 @@ prep_date_strings:
|
|||||||
bne :-
|
bne :-
|
||||||
|
|
||||||
ora #'0'
|
ora #'0'
|
||||||
sta str_3_spaces+2
|
sta str_day+2
|
||||||
done: addr_jump L84A4, str_3_spaces
|
done: addr_jump concatenate_date_part, str_day
|
||||||
.endproc
|
.endproc
|
||||||
|
|
||||||
.proc prep_month_string
|
.proc prep_month_string
|
||||||
@ -13859,7 +13874,7 @@ done: addr_jump L84A4, str_3_spaces
|
|||||||
lda month_table+1,y
|
lda month_table+1,y
|
||||||
tax
|
tax
|
||||||
lda month_table,y
|
lda month_table,y
|
||||||
jmp L84A4
|
jmp concatenate_date_part
|
||||||
.endproc
|
.endproc
|
||||||
|
|
||||||
.proc prep_year_string
|
.proc prep_year_string
|
||||||
@ -13875,14 +13890,14 @@ done: addr_jump L84A4, str_3_spaces
|
|||||||
sta year_string_10s
|
sta year_string_10s
|
||||||
lda ascii_digits,y
|
lda ascii_digits,y
|
||||||
sta year_string_1s
|
sta year_string_1s
|
||||||
addr_jump L84A4, str_year
|
addr_jump concatenate_date_part, str_year
|
||||||
.endproc
|
.endproc
|
||||||
|
|
||||||
year: .byte 0
|
year: .byte 0
|
||||||
month: .byte 0
|
month: .byte 0
|
||||||
day: .byte 0
|
day: .byte 0
|
||||||
|
|
||||||
str_3_spaces:
|
str_day: ; Filled in with day of the month plus space (e.g. "10 ")
|
||||||
PASCAL_STRING " "
|
PASCAL_STRING " "
|
||||||
|
|
||||||
month_table:
|
month_table:
|
||||||
@ -13920,7 +13935,8 @@ tens_table:
|
|||||||
ascii_digits:
|
ascii_digits:
|
||||||
.byte "0123456789"
|
.byte "0123456789"
|
||||||
|
|
||||||
L84A4: sta $06
|
.proc concatenate_date_part
|
||||||
|
sta $06
|
||||||
stx $06+1
|
stx $06+1
|
||||||
ldy #$00
|
ldy #$00
|
||||||
lda ($08),y
|
lda ($08),y
|
||||||
@ -13944,6 +13960,9 @@ L84A4: sta $06
|
|||||||
|
|
||||||
L84CF: .byte 0
|
L84CF: .byte 0
|
||||||
L84D0: .byte 0
|
L84D0: .byte 0
|
||||||
|
.endproc
|
||||||
|
|
||||||
|
;;; ==================================================
|
||||||
|
|
||||||
|
|
||||||
L84D1: jsr push_zp_addrs
|
L84D1: jsr push_zp_addrs
|
||||||
@ -16119,6 +16138,7 @@ newpath:.addr $1FC0
|
|||||||
L956E: .byte 0
|
L956E: .byte 0
|
||||||
.byte 0
|
.byte 0
|
||||||
L9570: .byte $1F
|
L9570: .byte $1F
|
||||||
|
|
||||||
L9571: lda #$00
|
L9571: lda #$00
|
||||||
sta L9706
|
sta L9706
|
||||||
L9576: lda L9706
|
L9576: lda L9706
|
||||||
@ -17329,7 +17349,7 @@ L9FC2: yax_call JT_MLI_RELAY, DESTROY, destroy_params
|
|||||||
cmp #$03
|
cmp #$03
|
||||||
beq LA022
|
beq LA022
|
||||||
cmp #$02
|
cmp #$02
|
||||||
L9FF1: beq LA001
|
beq LA001
|
||||||
cmp #$04
|
cmp #$04
|
||||||
bne L9FFE
|
bne L9FFE
|
||||||
lda #$80
|
lda #$80
|
||||||
@ -17983,7 +18003,7 @@ LA5B4: lda winfoF
|
|||||||
sta event_params
|
sta event_params
|
||||||
MGTK_RELAY_CALL MGTK::ScreenToWindow, event_params
|
MGTK_RELAY_CALL MGTK::ScreenToWindow, event_params
|
||||||
MGTK_RELAY_CALL MGTK::MoveTo, $D20D
|
MGTK_RELAY_CALL MGTK::MoveTo, $D20D
|
||||||
LA5D2: MGTK_RELAY_CALL MGTK::InRect, rect1
|
MGTK_RELAY_CALL MGTK::InRect, rect1
|
||||||
cmp #$80
|
cmp #$80
|
||||||
bne LA5E5
|
bne LA5E5
|
||||||
jsr set_cursor_insertion_point_with_flag
|
jsr set_cursor_insertion_point_with_flag
|
||||||
@ -18701,7 +18721,7 @@ LAD2A: ldy #$01
|
|||||||
lda winfoF
|
lda winfoF
|
||||||
jsr LB7B9
|
jsr LB7B9
|
||||||
lda LAD1F
|
lda LAD1F
|
||||||
LAD46: bne LAD54
|
bne LAD54
|
||||||
MGTK_RELAY_CALL MGTK::MoveTo, desktop_aux::LB16A
|
MGTK_RELAY_CALL MGTK::MoveTo, desktop_aux::LB16A
|
||||||
jmp LAD5D
|
jmp LAD5D
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user