diff --git a/desk.acc/show.text.file/stf.list b/desk.acc/show.text.file/stf.list index e962cd7..d4736c8 100644 --- a/desk.acc/show.text.file/stf.list +++ b/desk.acc/show.text.file/stf.list @@ -274,7 +274,7 @@ Current file: stf.s 0008EA 1 0008EA 1 .proc open_params 0008EA 1 03 .byte 3 ; param_count -0008EB 1 04 09 .addr L0904 ; pathname +0008EB 1 04 09 .addr pathname ; pathname 0008ED 1 00 0C .addr $0C00 ; io_buffer 0008EF 1 00 ref_num:.byte 0 ; ref_num 0008F0 1 .endproc @@ -282,7 +282,7 @@ Current file: stf.s 0008F0 1 .proc read_params 0008F0 1 04 .byte 4 ; param_count 0008F1 1 00 ref_num:.byte 0 ; ref_num -0008F2 1 00 12 db: .addr $1200 ; data_buffer +0008F2 1 00 12 buffer: .addr $1200 ; data_buffer 0008F4 1 00 01 .word $100 ; request_count 0008F6 1 00 00 .word 0 ; trans_count 0008F8 1 .endproc @@ -304,7 +304,8 @@ Current file: stf.s 000903 1 00 ref_num:.byte 0 ; ref_num 000904 1 .endproc 000904 1 -000904 1 00 00 00 00 L0904: .byte $00,$00,$00,$00,$00,$00,$00,$00 +000904 1 pathname: +000904 1 00 00 00 00 .byte $00,$00,$00,$00,$00,$00,$00,$00 000908 1 00 00 00 00 00090C 1 00 00 00 00 .byte $00,$00,$00,$00,$00,$00,$00,$00 000910 1 00 00 00 00 @@ -321,6 +322,7 @@ Current file: stf.s 00093C 1 00 00 00 00 .byte $00,$00,$00,$00,$00,$00,$00,$00 000940 1 00 00 00 00 000944 1 00 .byte $00 +000945 1 000945 1 00 L0945: .byte $00 000946 1 00 L0946: .byte $00 000947 1 00 L0947: .byte $00 @@ -450,7 +452,7 @@ Current file: stf.s 0009E1 1 AD 8B C0 lda LCBANK1 0009E4 1 AD 8B C0 lda LCBANK1 0009E7 1 A9 00 lda #$00 -0009E9 1 8D 04 09 sta L0904 +0009E9 1 8D 04 09 sta pathname 0009EC 1 AD 21 DF lda $DF21 0009EF 1 F0 05 beq L09F6 0009F1 1 AD 20 DF lda $DF20 @@ -477,7 +479,7 @@ Current file: stf.s 000A19 1 A9 2F lda #$2F 000A1B 1 A0 00 ldy #$00 000A1D 1 91 08 sta ($08),y -000A1F 1 EE 04 09 inc L0904 +000A1F 1 EE 04 09 inc pathname 000A22 1 E6 08 inc $08 000A24 1 D0 02 bne L0A28 000A26 1 E6 09 inc $09 @@ -524,7 +526,7 @@ Current file: stf.s 000A74 1 B1 06 L0A74: lda ($06),y 000A76 1 91 08 sta ($08),y 000A78 1 C8 iny -000A79 1 EE 04 09 inc L0904 +000A79 1 EE 04 09 inc pathname 000A7C 1 CA dex 000A7D 1 D0 F5 bne L0A74 000A7F 1 98 tya @@ -557,7 +559,7 @@ Current file: stf.s 000AC0 1 A8 09 000AC2 1 20 88 10 jsr L1088 000AC5 1 20 98 11 jsr calc_and_draw_mode -000AC8 1 20 30 0E jsr L0E30 +000AC8 1 20 30 0E jsr draw_content 000ACB 1 20 00 40 2B A2D_CALL $2B, 0 000ACF 1 00 00 000AD1 1 @@ -702,7 +704,7 @@ Current file: stf.s 000BF7 1 8D 89 09 sta update_scroll_params::pos 000BFA 1 20 7C 0D jsr L0D7C 000BFD 1 20 ED 0D jsr update_vscroll -000C00 1 20 30 0E jsr L0E30 +000C00 1 20 30 0E jsr draw_content 000C03 1 AD 47 09 lda L0947 000C06 1 F0 08 beq end 000C08 1 AD 49 09 lda L0949 @@ -773,7 +775,7 @@ Current file: stf.s 000C73 1 .proc update_scroll_pos ; Returns with carry set if mouse released 000C73 1 20 7C 0D jsr L0D7C 000C76 1 20 ED 0D jsr update_vscroll -000C79 1 20 30 0E jsr L0E30 +000C79 1 20 30 0E jsr draw_content 000C7C 1 20 52 0D jsr was_button_released 000C7F 1 18 clc 000C80 1 D0 01 bne end @@ -828,7 +830,7 @@ Current file: stf.s 000CDA 1 6D 62 09 adc L0962 000CDD 1 8D B5 09 sta L09B5 000CE0 1 20 D1 0D jsr L0DD1 -000CE3 1 20 30 0E jsr L0E30 +000CE3 1 20 30 0E jsr draw_content 000CE6 1 60 L0CE6: rts 000CE7 1 000CE7 1 A2 02 L0CE7: ldx #$02 @@ -868,7 +870,7 @@ Current file: stf.s 000D27 1 8D 9B 09 L0D27: sta L099B 000D2A 1 20 5E 0D jsr L0D5E 000D2D 1 20 D1 0D jsr L0DD1 -000D30 1 20 30 0E jsr L0E30 +000D30 1 20 30 0E jsr draw_content 000D33 1 20 52 0D jsr was_button_released 000D36 1 D0 D0 bne L0D08 000D38 1 60 rts @@ -977,7 +979,7 @@ Current file: stf.s 000E0E 1 AD 9D 09 L0E0E: lda vscroll_pos 000E11 1 8D 89 09 sta update_scroll_params::pos 000E14 1 20 ED 0D jsr update_vscroll -000E17 1 20 30 0E jsr L0E30 +000E17 1 20 30 0E jsr draw_content 000E1A 1 4C D1 0A jmp input_loop 000E1D 1 000E1D 1 20 00 40 08 L0E1D: A2D_CALL $08, L0952 @@ -988,15 +990,17 @@ Current file: stf.s 000E2D 1 4A 09 000E2F 1 60 rts 000E30 1 -000E30 1 A9 00 L0E30: lda #$00 +000E30 1 ;;; Draw content ??? +000E30 1 .proc draw_content +000E30 1 A9 00 lda #$00 000E32 1 8D 49 09 sta L0949 000E35 1 20 29 11 jsr L1129 000E38 1 20 9C 08 jsr set_file_mark 000E3B 1 A9 00 lda #$00 -000E3D 1 8D F2 08 sta read_params::db +000E3D 1 8D F2 08 sta read_params::buffer 000E40 1 85 06 sta $06 000E42 1 A9 12 lda #$12 -000E44 1 8D F3 08 sta read_params::db+1 +000E44 1 8D F3 08 sta read_params::buffer+1 000E47 1 85 07 sta $07 000E49 1 A9 00 lda #$00 000E4B 1 8D 45 09 sta L0945 @@ -1056,8 +1060,10 @@ Current file: stf.s 000ED7 1 000ED7 1 20 09 11 L0ED7: jsr L1109 000EDA 1 60 rts +000EDB 1 .endproc 000EDB 1 -000EDB 1 A9 FA L0EDB: lda #$FA +000EDB 1 .proc L0EDB ; ??? +000EDB 1 A9 FA lda #$FA 000EDD 1 8D 5B 09 sta L095B 000EE0 1 A9 01 lda #$01 000EE2 1 8D 5C 09 sta L095C @@ -1067,6 +1073,7 @@ Current file: stf.s 000EEC 1 8D 5E 09 sta L095E 000EEF 1 8D 5A 09 sta L095A 000EF2 1 60 rts +000EF3 1 .endproc 000EF3 1 000EF3 1 A9 FF L0EF3: lda #$FF 000EF5 1 8D 9B 0F sta L0F9B @@ -1208,17 +1215,17 @@ Current file: stf.s 00102B 1 A9 00 L102B: lda #$00 00102D 1 8D 45 09 sta L0945 001030 1 20 3E 10 jsr L103E -001033 1 AD F3 08 lda read_params::db+1 +001033 1 AD F3 08 lda read_params::buffer+1 001036 1 C9 12 cmp #$12 001038 1 D0 03 bne L103D -00103A 1 EE F3 08 inc read_params::db+1 +00103A 1 EE F3 08 inc read_params::buffer+1 00103D 1 60 L103D: rts 00103E 1 00103E 1 L103E: 00103E 1 .scope -00103E 1 AD F2 08 lda read_params::db +00103E 1 AD F2 08 lda read_params::buffer 001041 1 8D 52 10 sta store+1 -001044 1 AD F3 08 lda read_params::db+1 +001044 1 AD F3 08 lda read_params::buffer+1 001047 1 8D 53 10 sta store+2 00104A 1 A9 20 lda #$20 00104C 1 A2 00 ldx #$00 @@ -1236,11 +1243,11 @@ Current file: stf.s 001067 1 85 42 sta DESTINATIONLO 001069 1 A9 FF lda #$FF 00106B 1 85 3E sta ENDLO -00106D 1 AD F3 08 lda read_params::db+1 +00106D 1 AD F3 08 lda read_params::buffer+1 001070 1 85 43 sta DESTINATIONHI 001072 1 85 3D sta STARTHI 001074 1 85 3F sta ENDHI -001076 1 38 sec +001076 1 38 sec ; main>aux 001077 1 20 11 C3 jsr AUXMOVE 00107A 1 68 pla 00107B 1 F0 0A beq end @@ -1315,33 +1322,42 @@ Current file: stf.s 001105 1 20 20 00 jsr zp_code_stash 001108 1 60 rts 001109 1 -001109 1 AD 6F 09 L1109: lda fixed_mode_flag -00110C 1 F0 1A beq L1128 -00110E 1 A9 00 lda #$00 +001109 1 ;;; if fixed mode, do a main->aux mem copy +001109 1 .proc L1109 +001109 1 AD 6F 09 lda fixed_mode_flag ; if not fixed (i.e. proportional) +00110C 1 F0 1A beq exit ; then exit +00110E 1 +00110E 1 A9 00 lda #$00 ; start := $1100 001110 1 85 3C sta STARTLO 001112 1 A9 7E lda #$7E -001114 1 85 3E sta ENDLO +001114 1 85 3E sta ENDLO ; end := $117E 001116 1 A9 11 lda #$11 001118 1 85 3D sta STARTHI 00111A 1 85 3F sta ENDHI -00111C 1 A9 88 lda #$88 +00111C 1 +00111C 1 dest := $8803 +00111C 1 A9 88 lda #>dest 00111E 1 85 43 sta DESTINATIONHI -001120 1 A9 03 lda #$03 +001120 1 A9 03 lda #aux 001125 1 20 11 C3 jsr AUXMOVE -001128 1 60 L1128: rts +001128 1 60 exit: rts +001129 1 .endproc 001129 1 -001129 1 AD 6F 09 L1129: lda fixed_mode_flag -00112C 1 F0 0B beq L1139 +001129 1 .proc L1129 ; ??? +001129 1 AD 6F 09 lda fixed_mode_flag +00112C 1 F0 0B beq exit 00112E 1 AE 01 88 ldx $8801 001131 1 A9 07 lda #$07 -001133 1 9D 02 88 L1133: sta $8802,x +001133 1 9D 02 88 loop: sta $8802,x 001136 1 CA dex -001137 1 D0 FA bne L1133 -001139 1 60 L1139: rts +001137 1 D0 FA bne loop +001139 1 60 exit: rts +00113A 1 .endproc 00113A 1 -00113A 1 ;;; On Title Bar Click - is it on the Fixed/Proportional label? +00113A 1 ;;; On Title Bar Click - if it's on the Fixed/Proportional label, +00113A 1 ;;; toggle it and update. 00113A 1 .proc on_title_bar_click 00113A 1 AD 72 09 lda mouse_data::xcoord+1 ; mouse x high byte? 00113D 1 CD 85 11 cmp label_left+1 @@ -1358,7 +1374,7 @@ Current file: stf.s 001158 1 set_flag: 001158 1 EE 6F 09 inc fixed_mode_flag ; set flag (mode = fixed) 00115B 1 20 BD 11 redraw: jsr draw_mode -00115E 1 20 30 0E jsr L0E30 +00115E 1 20 30 0E jsr draw_content 001161 1 38 sec ; Click consumed 001162 1 60 rts 001163 1 diff --git a/desk.acc/show.text.file/stf.o b/desk.acc/show.text.file/stf.o index 365eb8e..18bd9b0 100644 Binary files a/desk.acc/show.text.file/stf.o and b/desk.acc/show.text.file/stf.o differ diff --git a/desk.acc/show.text.file/stf.s b/desk.acc/show.text.file/stf.s index 902d0c4..aa5d4b8 100644 --- a/desk.acc/show.text.file/stf.s +++ b/desk.acc/show.text.file/stf.s @@ -140,7 +140,7 @@ params_start: .proc open_params .byte 3 ; param_count - .addr L0904 ; pathname + .addr pathname ; pathname .addr $0C00 ; io_buffer ref_num:.byte 0 ; ref_num .endproc @@ -148,7 +148,7 @@ ref_num:.byte 0 ; ref_num .proc read_params .byte 4 ; param_count ref_num:.byte 0 ; ref_num -db: .addr $1200 ; data_buffer +buffer: .addr $1200 ; data_buffer .word $100 ; request_count .word 0 ; trans_count .endproc @@ -170,7 +170,8 @@ ref_num:.byte 0 ; ref_num ref_num:.byte 0 ; ref_num .endproc -L0904: .byte $00,$00,$00,$00,$00,$00,$00,$00 +pathname: + .byte $00,$00,$00,$00,$00,$00,$00,$00 .byte $00,$00,$00,$00,$00,$00,$00,$00 .byte $00,$00,$00,$00,$00,$00,$00,$00 .byte $00,$00,$00,$00,$00,$00,$00,$00 @@ -179,6 +180,7 @@ L0904: .byte $00,$00,$00,$00,$00,$00,$00,$00 .byte $00,$00,$00,$00,$00,$00,$00,$00 .byte $00,$00,$00,$00,$00,$00,$00,$00 .byte $00 + L0945: .byte $00 L0946: .byte $00 L0947: .byte $00 @@ -300,7 +302,7 @@ L09DE: sta ALTZPON lda LCBANK1 lda LCBANK1 lda #$00 - sta L0904 + sta pathname lda $DF21 beq L09F6 lda $DF20 @@ -327,7 +329,7 @@ L0A0E: lda #$05 lda #$2F ldy #$00 sta ($08),y - inc L0904 + inc pathname inc $08 bne L0A28 inc $09 @@ -374,7 +376,7 @@ L0A72: ldy #$00 L0A74: lda ($06),y sta ($08),y iny - inc L0904 + inc pathname dex bne L0A74 tya @@ -405,7 +407,7 @@ L0A95: lda $8802,x A2D_CALL $04, L09A8 jsr L1088 jsr calc_and_draw_mode - jsr L0E30 + jsr draw_content A2D_CALL $2B, 0 input_loop: @@ -542,7 +544,7 @@ end: rts sta update_scroll_params::pos jsr L0D7C jsr update_vscroll - jsr L0E30 + jsr draw_content lda L0947 beq end lda L0949 @@ -613,7 +615,7 @@ end: rts .proc update_scroll_pos ; Returns with carry set if mouse released jsr L0D7C jsr update_vscroll - jsr L0E30 + jsr draw_content jsr was_button_released clc bne end @@ -668,7 +670,7 @@ L0CB5: jsr start_thumb_drag adc L0962 sta L09B5 jsr L0DD1 - jsr L0E30 + jsr draw_content L0CE6: rts L0CE7: ldx #$02 @@ -708,7 +710,7 @@ L0D25: lda #$00 L0D27: sta L099B jsr L0D5E jsr L0DD1 - jsr L0E30 + jsr draw_content jsr was_button_released bne L0D08 rts @@ -812,7 +814,7 @@ L0DF9: jsr UNKNOWN_CALL L0E0E: lda vscroll_pos sta update_scroll_params::pos jsr update_vscroll - jsr L0E30 + jsr draw_content jmp input_loop L0E1D: A2D_CALL $08, L0952 @@ -820,15 +822,17 @@ L0E1D: A2D_CALL $08, L0952 A2D_CALL $08, L094A rts -L0E30: lda #$00 +;;; Draw content ??? +.proc draw_content + lda #$00 sta L0949 jsr L1129 jsr set_file_mark lda #$00 - sta read_params::db + sta read_params::buffer sta $06 lda #$12 - sta read_params::db+1 + sta read_params::buffer+1 sta $07 lda #$00 sta L0945 @@ -887,8 +891,10 @@ L0ED4: jmp L0E68 L0ED7: jsr L1109 rts +.endproc -L0EDB: lda #$FA +.proc L0EDB ; ??? + lda #$FA sta L095B lda #$01 sta L095C @@ -898,6 +904,7 @@ L0EDB: lda #$FA sta L095E sta L095A rts +.endproc L0EF3: lda #$FF sta L0F9B @@ -1036,17 +1043,17 @@ L1015: lda $1300,y L102B: lda #$00 sta L0945 jsr L103E - lda read_params::db+1 + lda read_params::buffer+1 cmp #$12 bne L103D - inc read_params::db+1 + inc read_params::buffer+1 L103D: rts L103E: .scope - lda read_params::db + lda read_params::buffer sta store+1 - lda read_params::db+1 + lda read_params::buffer+1 sta store+2 lda #$20 ldx #$00 @@ -1064,7 +1071,7 @@ store: sta $1200,x ; self-modified sta DESTINATIONLO lda #$FF sta ENDLO - lda read_params::db+1 + lda read_params::buffer+1 sta DESTINATIONHI sta STARTHI sta ENDHI @@ -1143,33 +1150,42 @@ L10FF: sta $27 jsr zp_code_stash rts -L1109: lda fixed_mode_flag - beq L1128 - lda #$00 +;;; if fixed mode, do a main->aux mem copy +.proc L1109 + lda fixed_mode_flag ; if not fixed (i.e. proportional) + beq exit ; then exit + + lda #$00 ; start := $1100 sta STARTLO lda #$7E - sta ENDLO + sta ENDLO ; end := $117E lda #$11 sta STARTHI sta ENDHI - lda #$88 + + dest := $8803 + lda #>dest sta DESTINATIONHI - lda #$03 + lda #aux jsr AUXMOVE -L1128: rts +exit: rts +.endproc -L1129: lda fixed_mode_flag - beq L1139 +.proc L1129 ; ??? + lda fixed_mode_flag + beq exit ldx $8801 lda #$07 -L1133: sta $8802,x +loop: sta $8802,x dex - bne L1133 -L1139: rts + bne loop +exit: rts +.endproc -;;; On Title Bar Click - is it on the Fixed/Proportional label? +;;; On Title Bar Click - if it's on the Fixed/Proportional label, +;;; toggle it and update. .proc on_title_bar_click lda mouse_data::xcoord+1 ; mouse x high byte? cmp label_left+1 @@ -1186,7 +1202,7 @@ L1139: rts set_flag: inc fixed_mode_flag ; set flag (mode = fixed) redraw: jsr draw_mode - jsr L0E30 + jsr draw_content sec ; Click consumed rts