From 08a034911b08a47511331e74dc91b596f403511b Mon Sep 17 00:00:00 2001 From: Joshua Bell Date: Sun, 4 Mar 2018 21:36:00 -0800 Subject: [PATCH] wider block separator comment --- desk.acc/calculator.s | 36 +-- desk.acc/date.s | 40 +-- desk.acc/puzzle.s | 30 +- desk.acc/show.image.file.s | 10 +- desk.acc/show.text.file.s | 42 +-- desktop.inc | 14 +- desktop/desktop.s | 594 ++++++++++++++++++------------------- desktop/inc/desktoplc.inc | 2 +- desktop/inc/font.inc | 2 +- desktop/invoker.s | 12 +- desktop/loader.s | 8 +- desktop/mgtk.s | 190 ++++++------ desktop/ovl1.s | 14 +- desktop/ovl1a.s | 16 +- desktop/ovl2.s | 28 +- desktop/ovl3.s | 10 +- desktop/ovl34567.s | 2 +- desktop/ovl4.s | 50 ++-- desktop/ovl5.s | 14 +- desktop/ovl6.s | 6 +- desktop/ovl7.s | 14 +- macros.inc | 14 +- mgtk.inc | 20 +- 23 files changed, 584 insertions(+), 584 deletions(-) diff --git a/desk.acc/calculator.s b/desk.acc/calculator.s index b68a8f6..2a8748f 100644 --- a/desk.acc/calculator.s +++ b/desk.acc/calculator.s @@ -12,14 +12,14 @@ adjust_txtptr := $B1 -;;; ================================================== +;;; ============================================================ ;;; Start of the code start: jmp copy2aux save_stack: .byte 0 -;;; ================================================== +;;; ============================================================ ;;; Duplicate the DA (code and data) to AUX memory, ;;; then invoke the code in AUX. @@ -50,7 +50,7 @@ save_stack: .byte 0 jmp XFER .endproc -;;; ================================================== +;;; ============================================================ .proc exit_da lda LCBANK1 @@ -60,7 +60,7 @@ save_stack: .byte 0 rts .endproc -;;; ================================================== +;;; ============================================================ call_init: lda ROMIN2 @@ -113,7 +113,7 @@ skip: lda #0 sizeof_routine := * - routine .endproc -;;; ================================================== +;;; ============================================================ ;; Set when the client area is offscreen and @@ -143,7 +143,7 @@ offscreen_flag: : rts .endproc -;;; ================================================== +;;; ============================================================ ;;; Call Params (and other data) ;; The following params blocks overlap for data re-use @@ -201,7 +201,7 @@ flag: .byte MGTK::zp_preserve flag: .byte MGTK::zp_overwrite .endproc -;;; ================================================== +;;; ============================================================ ;;; Button Definitions button_width := 17 @@ -496,7 +496,7 @@ tall_button_bitmap: ; bitmap for '+' button .byte px(%1000000),px(%0000000),px(%0000000) -;;; ================================================== +;;; ============================================================ ;;; Calculation state saved_stack: @@ -509,7 +509,7 @@ calc_n: .byte $00 ; negative? calc_g: .byte $00 ; high bit set if last input digit calc_l: .byte $00 ; input length -;;; ================================================== +;;; ============================================================ ;;; Miscellaneous param blocks .proc background_box_params @@ -742,7 +742,7 @@ cursor: .byte px(%0000000),px(%0000000) ; cursor .byte 1, 1 ; hotspot -;;; ================================================== +;;; ============================================================ ;;; DA Init init: sta ALTZPON @@ -814,7 +814,7 @@ loop: lda adjust_txtptr_copied-1,x MGTK_CALL MGTK::SetCursor, cursor ; Why not use JUMP_TABLE_CUR_POINTER ? ;; fall through -;;; ================================================== +;;; ============================================================ ;;; Input Loop input_loop: @@ -830,7 +830,7 @@ input_loop: jsr on_key_press jmp input_loop -;;; ================================================== +;;; ============================================================ ;;; On Click on_click: @@ -897,7 +897,7 @@ loop: lda routine,x jsr redraw_screen_and_window rts -;;; ================================================== +;;; ============================================================ ;;; On Key Press .proc on_key_press @@ -923,7 +923,7 @@ bail: rts1: rts ; used by next proc -;;; ================================================== +;;; ============================================================ ;;; Try to map a click to a button ;;; If a button was clicked, carry is set and accum has key char @@ -1056,7 +1056,7 @@ miss: clc .endproc .endproc -;;; ================================================== +;;; ============================================================ ;;; Handle Key ;;; Accumulator is set to key char. Also used by @@ -1448,7 +1448,7 @@ done: lda button_state ; high bit set if button down rts .endproc -;;; ================================================== +;;; ============================================================ ;;; Value Display .proc reset_buffer1 @@ -1506,7 +1506,7 @@ loop: lda #' ' rts .endproc -;;; ================================================== +;;; ============================================================ ;;; Draw the window contents (background, buttons) .proc draw_background @@ -1560,7 +1560,7 @@ loop: ldy #0 jmp loop .endproc -;;; ================================================== +;;; ============================================================ ;;; Draw the title bar decoration draw_title_bar: diff --git a/desk.acc/date.s b/desk.acc/date.s index a50a3d8..b12ab57 100644 --- a/desk.acc/date.s +++ b/desk.acc/date.s @@ -10,14 +10,14 @@ .org $800 -;;; ================================================== +;;; ============================================================ jmp copy2aux stash_stack: .byte $00 -;;; ================================================== +;;; ============================================================ ;;; MLI Call Param Blocks filename: @@ -32,7 +32,7 @@ write_buffer: .byte 0,0 sizeof_write_buffer := * - write_buffer -;;; ================================================== +;;; ============================================================ .proc copy2aux @@ -64,7 +64,7 @@ write_buffer: jmp XFER .endproc -;;; ================================================== +;;; ============================================================ ;;; Write date into MD.SYSTEM file and exit the DA .proc save_date_and_exit @@ -105,7 +105,7 @@ skip: ldx stash_stack ; exit the DA rts .endproc -;;; ================================================== +;;; ============================================================ start_da: sta ALTZPON @@ -113,7 +113,7 @@ start_da: lda LCBANK1 jmp init_window -;;; ================================================== +;;; ============================================================ ;;; Param blocks ;; The following 7 rects are iterated over to identify @@ -251,7 +251,7 @@ textfont: .addr DEFAULT_FONT nextwinfo: .addr 0 .endproc -;;; ================================================== +;;; ============================================================ ;;; Initialize window, unpack the date. init_window: @@ -287,7 +287,7 @@ init_window: MGTK_CALL MGTK::FlushEvents ;; fall through -;;; ================================================== +;;; ============================================================ ;;; Input loop .proc input_loop @@ -359,7 +359,7 @@ update_selection: jmp input_loop .endproc -;;; ================================================== +;;; ============================================================ .proc on_click MGTK_CALL MGTK::FindWindow, event_params::xcoord @@ -390,7 +390,7 @@ hit_target_jump_table: .addr on_field_click, on_field_click, on_field_click .endproc -;;; ================================================== +;;; ============================================================ .proc on_ok MGTK_CALL MGTK::PaintRect, ok_button_rect @@ -495,7 +495,7 @@ gosub: jsr $1000 ; self modified hit_rect_index: .byte 0 -;;; ================================================== +;;; ============================================================ increment_table: .addr 0, increment_day, increment_month, increment_year @@ -561,7 +561,7 @@ decrement_year: sta year : jmp prepare_year_string -;;; ================================================== +;;; ============================================================ .proc prepare_day_string lda day @@ -607,7 +607,7 @@ month_name_table: rts .endproc -;;; ================================================== +;;; ============================================================ ;;; Tear down the window and exit dialog_result: .byte 0 @@ -651,7 +651,7 @@ skip: jmp dest sizeof_routine := * - routine .endproc -;;; ================================================== +;;; ============================================================ ;;; Figure out which button was hit (if any). ;;; Index returned in X. @@ -688,7 +688,7 @@ done: pla rts .endproc -;;; ================================================== +;;; ============================================================ ;;; Params for the display border_rect: @@ -721,7 +721,7 @@ penwidth: .byte 1 penheight: .byte 1 .endproc -;;; ================================================== +;;; ============================================================ ;;; Render the window contents draw_window: @@ -787,7 +787,7 @@ draw_window: rts .endproc -;;; ================================================== +;;; ============================================================ ;;; Highlight selected field ;;; Previously selected field in A, newly selected field at top of stack. @@ -828,7 +828,7 @@ fill_month: rts .endproc -;;; ================================================== +;;; ============================================================ ;;; Delay .proc delay @@ -845,7 +845,7 @@ loop2: sbc #1 rts .endproc -;;; ================================================== +;;; ============================================================ ;;; Save/restore Zero Page .proc save_zp @@ -869,7 +869,7 @@ loop: lda zp_buffer,x zp_buffer: .res 256, 0 -;;; ================================================== +;;; ============================================================ ;;; Convert number to two ASCII digits (in A, X) .proc number_to_ascii diff --git a/desk.acc/puzzle.s b/desk.acc/puzzle.s index a9fc84a..8504e0b 100644 --- a/desk.acc/puzzle.s +++ b/desk.acc/puzzle.s @@ -14,7 +14,7 @@ .res 36, 0 -;;; ================================================== +;;; ============================================================ ;;; Copy the DA to AUX and invoke it stash_stack: .byte 0 @@ -43,7 +43,7 @@ stash_stack: .byte 0 jmp XFER .endproc -;;; ================================================== +;;; ============================================================ ;;; Set up / tear down .proc exit_da @@ -66,7 +66,7 @@ stash_stack: .byte 0 da_window_id := 51 -;;; ================================================== +;;; ============================================================ ;;; Redraw the screen (all windows) after a event_kind_drag .proc redraw_screen @@ -105,7 +105,7 @@ skip: lda #0 sizeof_routine := * - routine .endproc -;;; ================================================== +;;; ============================================================ ;;; ??? screen_height := 192 @@ -132,7 +132,7 @@ check_window_pos: : rts -;;; ================================================== +;;; ============================================================ ;;; Param Blocks ;; following memory space is re-used so x/y overlap @@ -644,7 +644,7 @@ textfont: .addr DEFAULT_FONT name: PASCAL_STRING "Puzzle" -;;; ================================================== +;;; ============================================================ ;;; Create the window .proc create_window @@ -696,7 +696,7 @@ ploop: lda position_table+1,y ; fall through .endproc -;;; ================================================== +;;; ============================================================ ;;; Input loop and processing .proc input_loop @@ -776,7 +776,7 @@ check_key: : rts .endproc -;;; ================================================== +;;; ============================================================ ;;; Map click to piece x/y .proc find_click_piece @@ -851,7 +851,7 @@ nope: clc rts .endproc -;;; ================================================== +;;; ============================================================ ;;; Process piece click hole_piece := 12 @@ -972,7 +972,7 @@ after_click: rts ; ??? .endproc -;;; ================================================== +;;; ============================================================ ;;; Clear the background draw_window: @@ -991,7 +991,7 @@ draw_window: MGTK_CALL MGTK::SetPort, setport_params rts -;;; ================================================== +;;; ============================================================ .proc save_zp ldx #$00 @@ -1014,7 +1014,7 @@ loop: lda saved_zp,x saved_zp: .res 256, 0 -;;; ================================================== +;;; ============================================================ ;;; Draw pieces .proc draw_all @@ -1080,7 +1080,7 @@ loop: tya rts .endproc -;;; ================================================== +;;; ============================================================ ;;; Play sound .proc play_sound @@ -1101,7 +1101,7 @@ delay2: dey rts .endproc -;;; ================================================== +;;; ============================================================ ;;; Puzzle complete? ;; Returns with carry set if puzzle complete @@ -1173,7 +1173,7 @@ nope: clc rts .endproc -;;; ================================================== +;;; ============================================================ ;;; Find hole piece .proc find_hole diff --git a/desk.acc/show.image.file.s b/desk.acc/show.image.file.s index bb2940c..6f8e4f3 100644 --- a/desk.acc/show.image.file.s +++ b/desk.acc/show.image.file.s @@ -74,7 +74,7 @@ loop: lda routine,x rts .endproc -;;; ================================================== +;;; ============================================================ ;;; ProDOS MLI calls .proc open_file @@ -113,7 +113,7 @@ loop: lda routine,x rts .endproc -;;; ================================================== +;;; ============================================================ ;;; Copies param blocks from Aux to Main .proc copy_params_aux_to_main @@ -345,7 +345,7 @@ end: rts ;; fall through .endproc -;;; ================================================== +;;; ============================================================ ;;; Main Input Loop .proc input_loop @@ -420,7 +420,7 @@ close: jsr close_file rts .endproc -;;; ================================================== +;;; ============================================================ ;;; Convert single hires to double hires ;;; Assumes the image is loaded to MAIN $2000 and @@ -491,7 +491,7 @@ done: sta PAGE2OFF rts .endproc -;;; ================================================== +;;; ============================================================ ;;; Stash/Unstash Menu Bar ;;; Have not yet figured out how to force the menu to diff --git a/desk.acc/show.text.file.s b/desk.acc/show.text.file.s index 86ae020..131df96 100644 --- a/desk.acc/show.text.file.s +++ b/desk.acc/show.text.file.s @@ -73,7 +73,7 @@ loop: lda call_main_template,x rts .endproc -;;; ================================================== +;;; ============================================================ ;;; ProDOS MLI calls .proc open_file @@ -121,7 +121,7 @@ loop: lda call_main_template,x rts .endproc -;;; ================================================== +;;; ============================================================ ;;; Copies param blocks from Aux to Main .proc copy_params_aux_to_main @@ -458,7 +458,7 @@ loop: lda font_width_table - 1,x ;; fall through .endproc -;;; ================================================== +;;; ============================================================ ;;; Main Input Loop input_loop: @@ -498,7 +498,7 @@ input_loop: title: jsr on_title_bar_click jmp input_loop -;;; ================================================== +;;; ============================================================ ;;; Close Button .proc on_close_click @@ -511,7 +511,7 @@ title: jsr on_title_bar_click rts ; exits input loop .endproc -;;; ================================================== +;;; ============================================================ ;;; Resize Handle ;;; This is dead code (no resize handle!) and may be buggy @@ -565,7 +565,7 @@ enable: ora #MGTK::scroll_option_active ; enable scroll jmp finish_resize .endproc -;;; ================================================== +;;; ============================================================ ;;; Client Area ;;; Non-title (client) area clicked @@ -581,7 +581,7 @@ enable: ora #MGTK::scroll_option_active ; enable scroll end: rts .endproc -;;; ================================================== +;;; ============================================================ ;;; Vertical Scroll Bar .proc on_vscroll_click @@ -702,7 +702,7 @@ loop: inx rts .endproc -;;; ================================================== +;;; ============================================================ ;;; Horizontal Scroll Bar ;;; (Unused in STF DA, so most of this is speculation) @@ -795,7 +795,7 @@ store: sta winfo::hthumbpos rts .endproc -;;; ================================================== +;;; ============================================================ ;;; UI Helpers ;; Used at start of thumb event_kind_drag @@ -910,7 +910,7 @@ end: rts rts .endproc -;;; ================================================== +;;; ============================================================ ;;; Content Rendering .proc draw_content @@ -985,7 +985,7 @@ L0ED7: jsr restore_proportional_font_table_if_needed rts .endproc -;;; ================================================== +;;; ============================================================ .proc L0EDB ; ??? copy16 #506, L095B @@ -994,7 +994,7 @@ L0ED7: jsr restore_proportional_font_table_if_needed rts .endproc -;;; ================================================== +;;; ============================================================ .proc find_text_run lda #$FF @@ -1072,7 +1072,7 @@ tab: inc drawtext_params::textlen : clc rts -;;; ================================================== +;;; ============================================================ L0F9B: .byte 0 run_width: .word 0 @@ -1114,7 +1114,7 @@ times70:.word 70 .word 490 .endproc -;;; ================================================== +;;; ============================================================ ;;; Draw a line of content .proc draw_text_run @@ -1128,7 +1128,7 @@ times70:.word 70 end: rts .endproc -;;; ================================================== +;;; ============================================================ .proc ensure_page_buffered lda drawtext_params::textptr+1 @@ -1155,7 +1155,7 @@ read: lda #0 : rts .endproc -;;; ================================================== +;;; ============================================================ .proc read_file_page copy16 read_params::data_buffer, store+1 @@ -1211,7 +1211,7 @@ end: rts ;; fall through .endproc -;;; ================================================== +;;; ============================================================ .proc calc_line_position copy16 winfo::maprect::y2, L0965 @@ -1237,7 +1237,7 @@ loop: lda L0966 end: rts .endproc -;;; ================================================== +;;; ============================================================ .proc div_by_16 ; input in $06/$07, output in a ldx #4 @@ -1269,7 +1269,7 @@ loop: clc rts .endproc -;;; ================================================== +;;; ============================================================ ;;; Restore the font glyph width table when switching ;;; back to proportional mode. @@ -1298,7 +1298,7 @@ loop: clc done: rts .endproc -;;; ================================================== +;;; ============================================================ ;;; Overwrite the font glyph width table (with 7s) ;;; when switching to fixed width mode. @@ -1313,7 +1313,7 @@ loop: sta font_width_table - 1,x end: rts .endproc -;;; ================================================== +;;; ============================================================ ;;; Title Bar (Proportional/Fixed mode button) .proc on_title_bar_click diff --git a/desktop.inc b/desktop.inc index 2431378..346658c 100644 --- a/desktop.inc +++ b/desktop.inc @@ -1,11 +1,11 @@ -;;; ================================================== +;;; ============================================================ ;;; DeskTop Internals -;;; ================================================== +;;; ============================================================ DA_LOAD_ADDRESS := $800 DA_MAX_SIZE := $1C00 - DA_LOAD_ADDRESS -;;; ================================================== +;;; ============================================================ ;;; Direct Calls (from main memory) ;;; * = Used by Desk Accessories @@ -33,7 +33,7 @@ JUMP_TABLE_CUR_POINTER := $4039 ; Changes mouse cursor to pointer * JUMP_TABLE_CUR_WATCH := $403C ; Changes mouse cursor to watch JUMP_TABLE_RESTORE_SEG := $403F ; Restore from dynamic routine -;;; ================================================== +;;; ============================================================ ;;; API Calls (from aux memory) ;;; * = Used by Desk Accessories @@ -79,7 +79,7 @@ label := * .endmacro -;;; ================================================== +;;; ============================================================ ;;; Relays from Main to Aux (params must be in ZP or LC) MGTK_RELAY := $D000 @@ -102,7 +102,7 @@ DESKTOP_RELAY := $D040 .endmacro -;;; ================================================== +;;; ============================================================ ;;; Internals - Windows (paths) and Icons (files) ;;; NOTE: Some of these are used by Desk Accessories @@ -163,7 +163,7 @@ icon_entry_type_bas := %00110000 icon_entry_type_txt := %01010000 icon_entry_type_trash := %01110000 -;;; ================================================== +;;; ============================================================ ;;; Internals - Default Font ;;; Used by DAs for window definitions diff --git a/desktop/desktop.s b/desktop/desktop.s index 6189bc7..1f8c1cc 100644 --- a/desktop/desktop.s +++ b/desktop/desktop.s @@ -7,9 +7,9 @@ .include "../desktop.inc" .include "../macros.inc" -;;; ================================================== +;;; ============================================================ ;;; DeskTop - the actual application -;;; ================================================== +;;; ============================================================ INVOKER := $290 ; Invoke other programs INVOKER_FILENAME := $280 ; File to invoke (PREFIX must be set) @@ -18,25 +18,25 @@ INVOKER_FILENAME := $280 ; File to invoke (PREFIX must be set) dummy1234 := $1234 ; overwritten by self-modified code -;;; ================================================== +;;; ============================================================ ;;; Segment loaded into AUX $851F-$BFFF (follows MGTK) -;;; ================================================== +;;; ============================================================ .proc desktop_aux .org $851F -;;; ================================================== +;;; ============================================================ ;;; This chunk of code appears to be used by one of ;;; the dynamically loaded segments. .include "ovl0.inc" -;;; ================================================== +;;; ============================================================ .assert * = $8800, error, "Entry point mismatch" .include "inc/font.inc" -;;; ================================================== +;;; ============================================================ ;; ??? @@ -60,16 +60,16 @@ L8C83: .byte $00,$00,$00,$00,$77,$30,$01 .assert * = $8D02, error, "Segment length mismatch" PAD_TO $8E00 -;;; ================================================== +;;; ============================================================ ;;; Entry point for "DESKTOP" -;;; ================================================== +;;; ============================================================ .assert * = DESKTOP, error, "DESKTOP entry point must be at $8E00" jmp DESKTOP_DIRECT -;;; ================================================== +;;; ============================================================ .macro MGTK_RELAY2_CALL call, addr .if .paramcount > 1 @@ -181,7 +181,7 @@ light_pattern: .byte %10111011 .byte $FF -;;; ================================================== +;;; ============================================================ ;;; Icon (i.e. file, volume) details num_icons: .byte 0 @@ -201,7 +201,7 @@ highlight_list: ; selected icons drag_outline_buffer: .res 680, 0 -;;; ================================================== +;;; ============================================================ .proc peekevent_params kind: .byte 0 ; spills into next block @@ -265,7 +265,7 @@ notpenOR_2: .byte 5 notpenXOR_2: .byte 6 notpenBIC_2: .byte 7 -;;; ================================================== +;;; ============================================================ ;;; DESKTOP command jump table desktop_jump_table: @@ -354,7 +354,7 @@ xcoord: .word 0 ycoord: .word 0 .endproc -;;; ================================================== +;;; ============================================================ ;;; ADD_ICON IMPL .proc ADD_ICON_IMPL @@ -389,7 +389,7 @@ sub: ldx num_icons ; ??? rts .endproc -;;; ================================================== +;;; ============================================================ ;;; HIGHLIGHT_ICON IMPL .proc HIGHLIGHT_ICON_IMPL @@ -445,7 +445,7 @@ L949D: ldx highlight_count return #0 .endproc -;;; ================================================== +;;; ============================================================ ;;; UNHILIGHT_ICON IMPL .proc UNHIGHLIGHT_ICON_IMPL @@ -487,7 +487,7 @@ done: jsr L9F98 return #0 .endproc -;;; ================================================== +;;; ============================================================ ;;; DESKTOP $04 IMPL @@ -558,7 +558,7 @@ L9584: lda #0 done: return #0 .endproc -;;; ================================================== +;;; ============================================================ ;;; DESKTOP $0E IMPL @@ -573,7 +573,7 @@ done: return #0 jmp LA39D .endproc -;;; ================================================== +;;; ============================================================ ;;; DESKTOP $05 IMPL @@ -637,7 +637,7 @@ L9681: sta icon jmp L967A .endproc -;;; ================================================== +;;; ============================================================ ;;; DESKTOP $06 IMPL @@ -670,7 +670,7 @@ L969D: ldx L9696 L96CF: return #0 .endproc -;;; ================================================== +;;; ============================================================ ;;; CLOSE_WINDOW IMPL .proc CLOSE_WINDOW_IMPL @@ -735,7 +735,7 @@ L9750: lda #$00 L9758: jmp L96DD .endproc -;;; ================================================== +;;; ============================================================ ;;; DESKTOP $08 IMPL @@ -761,7 +761,7 @@ L976B: lda highlight_list,x L977A: return #0 .endproc -;;; ================================================== +;;; ============================================================ ;;; FIND_ICON IMPL .proc FIND_ICON_IMPL @@ -830,7 +830,7 @@ L97F5: .byte 0 L97F6: .byte 0 .endproc -;;; ================================================== +;;; ============================================================ ;;; DESKTOP $0A IMPL @@ -1444,7 +1444,7 @@ L9EB4: asl a rts .endproc -;;; ================================================== +;;; ============================================================ ;;; DESKTOP $0B IMPL @@ -1486,7 +1486,7 @@ L9EEA: ldy #0 rts .endproc -;;; ================================================== +;;; ============================================================ ;;; ICON_IN_RECT IMPL .proc ICON_IN_RECT_IMPL @@ -1536,7 +1536,7 @@ done: return #0 L9F8F: return #1 .endproc -;;; ================================================== +;;; ============================================================ L9F92: .byte 0 L9F93: .byte 0 @@ -1708,7 +1708,7 @@ LA14F: add16 paintbits_params2::viewloc::xcoord,x, paintbits_params2::maprect LA189: rts .endproc -;;; ================================================== +;;; ============================================================ ;;; v0 v1 ;;; +----------+ @@ -1864,7 +1864,7 @@ text_width: .byte 0 .endproc -;;; ================================================== +;;; ============================================================ ;;; REDRAW_ICONS IMPL .proc REDRAW_ICONS_IMPL @@ -1900,7 +1900,7 @@ LA2DD: pla jmp LA2B5 .endproc -;;; ================================================== +;;; ============================================================ .proc LA2E3 stx LA322 @@ -1935,7 +1935,7 @@ LA322: .byte 0 LA323: .byte 0 .endproc -;;; ================================================== +;;; ============================================================ .proc LA324 stx LA363 @@ -1973,7 +1973,7 @@ LA359: ldx LA363 LA363: .byte 0 LA364: .byte 0 -;;; ================================================== +;;; ============================================================ .proc push_zp_addrs ;; save return addr @@ -2000,7 +2000,7 @@ LA364: .byte 0 stash: .word 0 .endproc -;;; ================================================== +;;; ============================================================ .proc pop_zp_addrs ;; save return addr @@ -2027,7 +2027,7 @@ stash: .word 0 .endproc -;;; ================================================== +;;; ============================================================ LA39D: MGTK_CALL MGTK::InitPort, grafport MGTK_CALL MGTK::SetPort, grafport @@ -2087,7 +2087,7 @@ volume: jmp LA446 .endproc -;;; ================================================== +;;; ============================================================ .proc erase_desktop_icon lda #0 @@ -2108,7 +2108,7 @@ volume: rts .endproc -;;; ================================================== +;;; ============================================================ LA446: jsr push_zp_addrs ldx num_icons @@ -2123,7 +2123,7 @@ LA44D: cpx #$FF ; =-1 : jsr pop_zp_addrs rts -;;; ================================================== +;;; ============================================================ .proc LA466 ptr := $8 @@ -2175,7 +2175,7 @@ LA4C5: pla jmp LA44D .endproc -;;; ================================================== +;;; ============================================================ LA4CB: .byte 0 @@ -2327,7 +2327,7 @@ LA5CB: pla jsr pop_zp_addrs rts -;;; ================================================== +;;; ============================================================ LA627: .word 0 LA629: .word 0 @@ -2381,7 +2381,7 @@ done: MGTK_CALL MGTK::SetPortBits, setportbits_params2 rts .endproc -;;; ================================================== +;;; ============================================================ .proc LA6A3 lda #$00 @@ -2605,7 +2605,7 @@ LA923: lda setportbits_params2::cliprect::x2 jmp LA753 .endproc -;;; ================================================== +;;; ============================================================ .proc LA938 add16 grafport4::viewloc::ycoord, #15, grafport4::viewloc::ycoord @@ -2616,7 +2616,7 @@ LA923: lda setportbits_params2::cliprect::x2 PAD_TO $A980 -;;; ================================================== +;;; ============================================================ ;; 5.25" Floppy Disk floppy140_icon: @@ -2874,7 +2874,7 @@ special_menu: .assert * = $AD58, error, "Segment length mismatch" PAD_TO $AE00 -;;; ================================================== +;;; ============================================================ ;; Rects confirm_dialog_outer_rect: DEFINE_RECT 4,2,396,98 @@ -3088,7 +3088,7 @@ str_on_system_disk: .assert * = $B5D9, error, "Segment length mismatch" PAD_TO $B600 -;;; ================================================== +;;; ============================================================ show_alert_indirection: jmp show_alert_dialog @@ -3143,7 +3143,7 @@ maprect: DEFINE_RECT 0, 0, $1A4, $37, maprect .endproc -;;; ================================================== +;;; ============================================================ ;;; Show Alert Dialog ;;; Call show_alert_dialog with prompt number in X (???), A = ??? @@ -3507,7 +3507,7 @@ LBDDB: lda #$02 .endproc show_alert_dialog := show_alert_dialog_impl::start -;;; ================================================== +;;; ============================================================ LBDE0: .byte 0 LBDE1: sub16 event_xcoord, portmap::viewloc::xcoord, event_xcoord @@ -3639,7 +3639,7 @@ LBF0E: .byte $00 LBF0F: .byte $00 .endproc -;;; ================================================== +;;; ============================================================ .proc LBF10 sta LBFCF @@ -3781,11 +3781,11 @@ addr: .addr 0 PAD_TO $C000 .endproc ; desktop_aux -;;; ================================================== +;;; ============================================================ ;;; ;;; $C000 - $CFFF is I/O Space ;;; -;;; ================================================== +;;; ============================================================ .org $D000 @@ -3800,7 +3800,7 @@ addr: .addr 0 ;;; Various routines callable from MAIN -;;; ================================================== +;;; ============================================================ ;;; MGTK call from main>aux, call in Y, params at (X,A) .proc MGTK_RELAY_IMPL @@ -3815,7 +3815,7 @@ addr: .addr 0 rts .endproc -;;; ================================================== +;;; ============================================================ ;;; SET_POS with params at (X,A) followed by DRAW_TEXT call .proc SETPOS_DRAWTEXT_RELAY @@ -3831,7 +3831,7 @@ addr: .addr 0 rts .endproc -;;; ================================================== +;;; ============================================================ ;;; DESKTOP call from main>aux, call in Y params at (X,A) .proc DESKTOP_RELAY_IMPL @@ -3848,7 +3848,7 @@ addr: .addr 0 rts .endproc -;;; ================================================== +;;; ============================================================ ;;; Used/Free icon map (Aux $1F80 - $1FFF) free_icon_map := $1F80 @@ -3893,7 +3893,7 @@ loop: lda free_icon_map,x rts .endproc -;;; ================================================== +;;; ============================================================ ;;; Copy data to/from buffers (see cached_window_id / cached_window_icon_list / window_icon_count_table/2) ??? .proc DESKTOP_COPY_BUF_IMPL @@ -3966,7 +3966,7 @@ flag: .byte 0 DESKTOP_COPY_FROM_BUF := DESKTOP_COPY_BUF_IMPL::from DESKTOP_COPY_TO_BUF := DESKTOP_COPY_BUF_IMPL::to -;;; ================================================== +;;; ============================================================ ;;; Assign active state to active_window_id window .proc DESKTOP_ASSIGN_STATE @@ -3999,7 +3999,7 @@ loop: lda (src),y rts .endproc -;;; ================================================== +;;; ============================================================ ;;; From MAIN, load AUX (X,A) into A .proc DESKTOP_AUXLOAD @@ -4013,7 +4013,7 @@ op: lda dummy1234 rts .endproc -;;; ================================================== +;;; ============================================================ ;;; From MAIN, show alert ;;; ...with prompt #0 @@ -4693,7 +4693,7 @@ dialog_rect2: DEFINE_RECT $1C, $88, $1CF, $93 .assert * = $DAD8, error, "Segment length mismatch" PAD_TO $DB00 -;;; ================================================== +;;; ============================================================ .addr sd0s, sd1s, sd2s, sd3s, sd4s, sd5s, sd6s .addr sd7s, sd8s, sd9s, sd10s, sd11s, sd12s, sd13s @@ -4704,9 +4704,9 @@ dialog_rect2: DEFINE_RECT $1C, $88, $1CF, $93 run_list_entries: .res 640, 0 -;;; ================================================== +;;; ============================================================ ;;; Window & Icon State -;;; ================================================== +;;; ============================================================ LDD9E: .byte 0 @@ -4749,7 +4749,7 @@ window_address_table: .addr window_path_table+i*65 .endrepeat -;;; ================================================== +;;; ============================================================ LDFC5: .byte 0 LDFC6: .byte 0 @@ -5012,7 +5012,7 @@ LE71D: .word 0 LE71F: .byte 0 .byte 0,0,0 -;;; ================================================== +;;; ============================================================ .macro WINFO_DEFN id, label, buflabel .proc label @@ -5060,7 +5060,7 @@ buflabel: .res 18, 0 WINFO_DEFN 8, winfo8, winfo8title_ptr -;;; ================================================== +;;; ============================================================ ;;; Window paths ;;; 8 entries; each entry is 65 bytes long @@ -5077,7 +5077,7 @@ window_k_free_table: .res 16, 0 .res 8, 0 ; ??? -;;; ================================================== +;;; ============================================================ ;;; Resources for window header (Items/k in disk/available) str_items: @@ -5121,7 +5121,7 @@ LEBFC: .byte 0 ; flag of some sort ??? saved_event_coords: DEFINE_POINT 0, 0 -;;; ================================================== +;;; ============================================================ ;;; Each buffer is a list of icons in each window (0=desktop) ;;; window_icon_count_table = start of buffer = icon count @@ -5161,7 +5161,7 @@ icon_entries: ;;; (there's enough room here for 127 files at 27 bytes each) -;;; ================================================== +;;; ============================================================ .org $FB00 @@ -5503,9 +5503,9 @@ app_mask: .assert * = $FFBA, error, "Segment length mismatch" PAD_TO $10000 -;;; ================================================== +;;; ============================================================ ;;; Segment loaded into MAIN $4000-$BEFF -;;; ================================================== +;;; ============================================================ .proc desktop_main L0020 := $0020 @@ -5703,7 +5703,7 @@ L4151: rts main_loop := enter_main_loop::main_loop redraw_windows := enter_main_loop::redraw_windows -;;; ================================================== +;;; ============================================================ L4152: .byte 0 @@ -5808,7 +5808,7 @@ L4242: .byte 0 L4243: .byte 0 .endproc -;;; ================================================== +;;; ============================================================ .proc L4244 lda selected_icon_count @@ -5864,7 +5864,7 @@ L42A5: lda L42C3 L42C3: .byte 0 .endproc -;;; ================================================== +;;; ============================================================ ;;; Menu Dispatch .proc handle_keydown_impl @@ -6036,7 +6036,7 @@ L43E0: tsx menu_dispatch2 := handle_keydown_impl::menu_dispatch2 menu_dispatch_flag := handle_keydown_impl::flag -;;; ================================================== +;;; ============================================================ ;;; Handle click .proc handle_click @@ -6073,7 +6073,7 @@ not_menu: jmp handle_inactive_window_click .endproc -;;; ================================================== +;;; ============================================================ .proc handle_active_window_click pla @@ -6094,7 +6094,7 @@ not_menu: : rts .endproc -;;; ================================================== +;;; ============================================================ .proc handle_inactive_window_click jmp L445D @@ -6150,7 +6150,7 @@ L44A6: MGTK_RELAY_CALL MGTK::SelectWindow, findwindow_window_id rts .endproc -;;; ================================================== +;;; ============================================================ .proc get_set_port2 MGTK_RELAY_CALL MGTK::GetWinPort, getwinport_params2 @@ -6171,7 +6171,7 @@ L44A6: MGTK_RELAY_CALL MGTK::SelectWindow, findwindow_window_id rts .endproc -;;; ================================================== +;;; ============================================================ .proc redraw_windows_and_desktop jsr redraw_windows @@ -6179,7 +6179,7 @@ L44A6: MGTK_RELAY_CALL MGTK::SelectWindow, findwindow_window_id rts .endproc -;;; ================================================== +;;; ============================================================ .proc L4530 ldx #0 @@ -6209,7 +6209,7 @@ L4559: lda DEVLST,y rts .endproc -;;; ================================================== +;;; ============================================================ .proc L4563 lda L45A0 @@ -6239,7 +6239,7 @@ L4591: tya rts .endproc -;;; ================================================== +;;; ============================================================ .byte $00 L4597: .byte $00,$00,$00,$00,$00,$00,$00,$00 @@ -6249,7 +6249,7 @@ L45A0: .byte $00,$00,$00,$00,$00,$00,$00,$00 L45A9: .byte $00,$00,$00,$00,$00,$00,$00,$00 .byte $00 -;;; ================================================== +;;; ============================================================ ;; Possibly SmartPort STATUS call to determine ejectability ??? @@ -6355,7 +6355,7 @@ status_unit_num := status_params::unit_num status_buffer: .res 16, 0 .endproc -;;; ================================================== +;;; ============================================================ .proc L464E lda LD343 @@ -6432,7 +6432,7 @@ params: .addr dummy0000 yax_call desktop_main::MLI_RELAY, call, addr .endmacro -;;; ================================================== +;;; ============================================================ ;;; Launch file (double-click) ??? .proc launch_file @@ -6572,7 +6572,7 @@ L4859: dey rts .endproc L4824 := launch_file::L4824 -;;; ================================================== +;;; ============================================================ L485D: .word $E000 L485F: .word $D000 @@ -6580,7 +6580,7 @@ L485F: .word $D000 sys_start_flag: .byte $00 sys_start_path: .res 40, 0 -;;; ================================================== +;;; ============================================================ set_watch_cursor: jsr hide_cursor @@ -6602,7 +6602,7 @@ show_cursor: MGTK_RELAY_CALL MGTK::ShowCursor rts -;;; ================================================== +;;; ============================================================ .proc L48BE ldx DESKTOP_DEVICELIST @@ -6641,13 +6641,13 @@ set_penmode_copy: MGTK_RELAY_CALL MGTK::SetPenMode, pencopy rts -;;; ================================================== +;;; ============================================================ .proc cmd_noop rts .endproc -;;; ================================================== +;;; ============================================================ .proc cmd_selector_action jsr set_watch_cursor @@ -6708,7 +6708,7 @@ L498F: .byte $00 .endproc -;;; ================================================== +;;; ============================================================ DEFINE_GET_FILE_INFO_PARAMS get_file_info_params3, $220 @@ -6875,7 +6875,7 @@ L4AEA: jsr L4B5F L4A77 := cmd_selector_item::L4A77 L4AAD := cmd_selector_item::L4AAD -;;; ================================================== +;;; ============================================================ .proc get_LD3FF sta ALTZPOFF @@ -6972,14 +6972,14 @@ L4BB0: .byte 0 L4BB1: .byte 0 .endproc -;;; ================================================== +;;; ============================================================ .proc cmd_about yax_call launch_dialog, index_about_dialog, $0000 jmp redraw_windows_and_desktop .endproc -;;; ================================================== +;;; ============================================================ .proc cmd_deskacc_impl ptr := $6 @@ -7091,13 +7091,13 @@ str_desk_acc: .endproc cmd_deskacc := cmd_deskacc_impl::start -;;; ================================================== +;;; ============================================================ ;; high bit set while a DA is running running_da_flag: .byte 0 -;;; ================================================== +;;; ============================================================ .proc cmd_copy_file jsr set_watch_cursor @@ -7152,7 +7152,7 @@ L4CF3: iny jmp redraw_windows_and_desktop .endproc -;;; ================================================== +;;; ============================================================ .proc L4D19 ldy #$00 @@ -7190,7 +7190,7 @@ L4D4E: stx LE04B rts .endproc -;;; ================================================== +;;; ============================================================ .proc cmd_delete_file jsr set_watch_cursor @@ -7255,7 +7255,7 @@ L4DD2: dey jmp redraw_windows_and_desktop .endproc -;;; ================================================== +;;; ============================================================ .proc cmd_open ldx #$00 @@ -7330,7 +7330,7 @@ L4E6E: jmp launch_file L4E71: .byte 0 .endproc -;;; ================================================== +;;; ============================================================ .proc cmd_close lda active_window_id @@ -7411,7 +7411,7 @@ L4F3C: lda #MGTK::checkitem_uncheck jmp reset_grafport3 .endproc -;;; ================================================== +;;; ============================================================ .proc cmd_close_all lda active_window_id ; current window @@ -7421,7 +7421,7 @@ L4F3C: lda #MGTK::checkitem_uncheck done: rts .endproc -;;; ================================================== +;;; ============================================================ .proc cmd_disk_copy lda #dynamic_routine_disk_copy @@ -7432,7 +7432,7 @@ done: rts fail: rts .endproc -;;; ================================================== +;;; ============================================================ .proc cmd_new_folder_impl @@ -7499,7 +7499,7 @@ L504F: .byte 0 cmd_new_folder := cmd_new_folder_impl::start path_buffer := cmd_new_folder_impl::path_buffer ; ??? -;;; ================================================== +;;; ============================================================ .proc cmd_eject lda selected_window_index @@ -7538,7 +7538,7 @@ L5098: .byte $00 .endproc -;;; ================================================== +;;; ============================================================ .proc cmd_quit_impl @@ -7591,7 +7591,7 @@ start: .endproc cmd_quit := cmd_quit_impl::start -;;; ================================================== +;;; ============================================================ .proc cmd_view_by_icon ldx active_window_id @@ -7694,7 +7694,7 @@ L51ED: .byte 0 L51EF: .byte 0 .endproc -;;; ================================================== +;;; ============================================================ .proc L51F0 ldx active_window_id @@ -7746,7 +7746,7 @@ L5265: .byte 0 .byte 0 .endproc -;;; ================================================== +;;; ============================================================ .proc cmd_view_by_name ldx active_window_id @@ -7767,7 +7767,7 @@ L5276: cmp #$00 jmp L51F0 .endproc -;;; ================================================== +;;; ============================================================ .proc cmd_view_by_date ldx active_window_id @@ -7788,7 +7788,7 @@ L5294: cmp #$00 jmp L51F0 .endproc -;;; ================================================== +;;; ============================================================ .proc cmd_view_by_size ldx active_window_id @@ -7809,7 +7809,7 @@ L52B2: cmp #$00 jmp L51F0 .endproc -;;; ================================================== +;;; ============================================================ .proc cmd_view_by_type ldx active_window_id @@ -7830,7 +7830,7 @@ L52D0: cmp #$00 jmp L51F0 .endproc -;;; ================================================== +;;; ============================================================ .proc update_view_menu_check ;; Uncheck last checked @@ -7847,7 +7847,7 @@ L52D0: cmp #$00 rts .endproc -;;; ================================================== +;;; ============================================================ .proc close_active_window DESKTOP_RELAY_CALL DT_CLOSE_WINDOW, active_window_id @@ -7874,11 +7874,11 @@ done: jsr DESKTOP_COPY_FROM_BUF jmp DESKTOP_COPY_TO_BUF .endproc -;;; ================================================== +;;; ============================================================ L533F: .byte 0 -;;; ================================================== +;;; ============================================================ .proc cmd_format_disk lda #dynamic_routine_format_erase @@ -7896,7 +7896,7 @@ L533F: .byte 0 fail: rts .endproc -;;; ================================================== +;;; ============================================================ .proc cmd_erase_disk lda #dynamic_routine_format_erase @@ -7913,35 +7913,35 @@ fail: rts done: jmp redraw_windows_and_desktop .endproc -;;; ================================================== +;;; ============================================================ .proc cmd_get_info jsr L8F09 jmp redraw_windows_and_desktop .endproc -;;; ================================================== +;;; ============================================================ .proc cmd_get_size jsr L8F27 jmp redraw_windows_and_desktop .endproc -;;; ================================================== +;;; ============================================================ .proc cmd_unlock jsr L8F0F jmp redraw_windows_and_desktop .endproc -;;; ================================================== +;;; ============================================================ .proc cmd_lock jsr L8F0C jmp redraw_windows_and_desktop .endproc -;;; ================================================== +;;; ============================================================ .proc cmd_rename_icon jsr L8F12 @@ -8026,7 +8026,7 @@ L543E: inx rts .endproc -;;; ================================================== +;;; ============================================================ ;;; Handle keyboard-based icon selection ("highlighting") .proc cmd_higlight @@ -8268,7 +8268,7 @@ L564A: DESKTOP_RELAY_CALL $0B, icon_param L5661: rts .endproc -;;; ================================================== +;;; ============================================================ .proc cmd_select_all lda selected_icon_count @@ -8331,13 +8331,13 @@ L56F0: lda #$00 L56F8: .byte 0 .endproc -;;; ================================================== +;;; ============================================================ L56F9: sta getwinport_params2::window_id jsr get_port2 jmp offset_grafport2_and_set -;;; ================================================== +;;; ============================================================ ;;; Handle keyboard-based window activation .proc cmd_activate @@ -8414,7 +8414,7 @@ L578D: .byte 0 .endproc -;;; ================================================== +;;; ============================================================ ;;; Initiate keyboard-based resizing .proc cmd_resize @@ -8422,7 +8422,7 @@ L578D: .byte 0 jmp handle_resize_click .endproc -;;; ================================================== +;;; ============================================================ ;;; Initiate keyboard-based window moving .proc cmd_move @@ -8430,7 +8430,7 @@ L578D: .byte 0 jmp handle_title_click .endproc -;;; ================================================== +;;; ============================================================ ;;; Keyboard-based scrolling of window contents .proc cmd_scroll @@ -8484,7 +8484,7 @@ vertical: jmp loop .endproc -;;; ================================================== +;;; ============================================================ .proc L5803 lda active_window_id @@ -8503,7 +8503,7 @@ vertical: rts .endproc -;;; ================================================== +;;; ============================================================ scroll_right: ; elevator right / contents left ldax L585F @@ -8631,7 +8631,7 @@ L58AD: .byte 0 rts .endproc -;;; ================================================== +;;; ============================================================ .proc cmd_check_drives lda #0 @@ -8701,7 +8701,7 @@ L5998: pla jmp L5976 .endproc -;;; ================================================== +;;; ============================================================ L599E: .byte 0 @@ -8841,7 +8841,7 @@ L5AC6: .res 10, 0 L5AD0: .byte 0 .endproc -;;; ================================================== +;;; ============================================================ .proc cmd_startup_item ldx menu_click_params::item_num @@ -8888,7 +8888,7 @@ L5AD0: .byte 0 reset_and_invoke_target := reset_and_invoke::target -;;; ================================================== +;;; ============================================================ L5B1B: .byte 0 @@ -9020,7 +9020,7 @@ done_client_click: jmp DESKTOP_COPY_TO_BUF .endproc -;;; ================================================== +;;; ============================================================ .proc do_track_thumb lda findcontrol_which_ctl @@ -9036,7 +9036,7 @@ done_client_click: jmp DESKTOP_COPY_TO_BUF .endproc -;;; ================================================== +;;; ============================================================ .proc L5C54 lda updatethumb_stash @@ -9055,7 +9055,7 @@ done_client_click: jmp L6C19 .endproc -;;; ================================================== +;;; ============================================================ ;;; Handle mouse held down on scroll arrow/pager .proc check_control_repeat @@ -9079,7 +9079,7 @@ bail: return #$FF ; high bit set = not repeating ctl: .byte 0 .endproc -;;; ================================================== +;;; ============================================================ .proc handle_content_click bit L5B1B @@ -9095,7 +9095,7 @@ ctl: .byte 0 jmp L5DEC .endproc -;;; ================================================== +;;; ============================================================ L5CD9: .byte 0 @@ -9280,7 +9280,7 @@ L5E74: jmp launch_file ; when double-clicked .endproc L5DEC := L5CDA::L5DEC -;;; ================================================== +;;; ============================================================ L5E77: .byte 0 @@ -9343,7 +9343,7 @@ L5ECB: lda ($06),y L5F0A: .byte 0 .endproc -;;; ================================================== +;;; ============================================================ .proc L5F13_impl @@ -9493,7 +9493,7 @@ L60D5: jsr push_zp_addrs .endproc L5F13 := L5F13_impl::start -;;; ================================================== +;;; ============================================================ .proc handle_title_click jmp L60DE @@ -9589,7 +9589,7 @@ L619A: .byte 0 .endproc -;;; ================================================== +;;; ============================================================ .proc handle_resize_click lda active_window_id @@ -9608,7 +9608,7 @@ L619A: .byte 0 jmp reset_grafport3 .endproc -;;; ================================================== +;;; ============================================================ handle_close_click: lda active_window_id @@ -9699,7 +9699,7 @@ L6276: ldx active_window_id jmp redraw_windows_and_desktop .endproc -;;; ================================================== +;;; ============================================================ .proc L62BC cmp #$01 @@ -9777,7 +9777,7 @@ L638B: .byte 0 .endproc -;;; ================================================== +;;; ============================================================ .proc L638C jsr L650F @@ -9803,7 +9803,7 @@ L63EA: .word 0 .endproc -;;; ================================================== +;;; ============================================================ .proc L63EC jsr L650F @@ -9828,7 +9828,7 @@ L6449: .byte 0 L644A: .word 0 .endproc -;;; ================================================== +;;; ============================================================ .proc L644C tya @@ -9837,7 +9837,7 @@ L644A: .word 0 rts .endproc -;;; ================================================== +;;; ============================================================ .proc L6451 jsr L650F @@ -9859,7 +9859,7 @@ L64AC: .word 0 L64AE: .word 0 .endproc -;;; ================================================== +;;; ============================================================ .proc L64B0 jsr L650F @@ -9933,7 +9933,7 @@ L650D: .word 0 jmp L6C19 .endproc -;;; ================================================== +;;; ============================================================ .proc update_hthumb lda active_window_id @@ -9972,7 +9972,7 @@ L6602: .byte 0 L6603: .byte 0 .endproc -;;; ================================================== +;;; ============================================================ .proc update_vthumb lda active_window_id @@ -10013,7 +10013,7 @@ L66A0: .byte 0 L66A1: .byte 0 .endproc -;;; ================================================== +;;; ============================================================ .proc L66A2 ldx active_window_id @@ -10057,7 +10057,7 @@ check_menu_items: rts .endproc -;;; ================================================== +;;; ============================================================ ;;; Disable menu items for operating on a selected file .proc disable_file_menu_items @@ -10087,7 +10087,7 @@ disable_menu_item: rts .endproc -;;; ================================================== +;;; ============================================================ .proc enable_file_menu_items lda #MGTK::disableitem_enable @@ -10116,7 +10116,7 @@ enable_menu_item: rts .endproc -;;; ================================================== +;;; ============================================================ .proc toggle_eject_menu_item enable: @@ -10140,7 +10140,7 @@ disable: enable_eject_menu_item := toggle_eject_menu_item::enable disable_eject_menu_item := toggle_eject_menu_item::disable -;;; ================================================== +;;; ============================================================ .proc toggle_selector_menu_items disable: @@ -10172,7 +10172,7 @@ configure_menu_item: enable_selector_menu_items := toggle_selector_menu_items::enable disable_selector_menu_items := toggle_selector_menu_items::disable -;;; ================================================== +;;; ============================================================ .proc L67D7 lda selected_icon_count @@ -10265,7 +10265,7 @@ L6893: txa rts .endproc -;;; ================================================== +;;; ============================================================ .proc L68AA jsr reset_grafport3 @@ -10386,7 +10386,7 @@ L6A3D: .byte 0 L6A3E: .byte 0 .endproc -;;; ================================================== +;;; ============================================================ .proc L6A3F ldx #$07 @@ -10428,7 +10428,7 @@ L6A80: inx jmp L5E78 .endproc -;;; ================================================== +;;; ============================================================ .proc L6A8A sta icon_params2 @@ -10586,12 +10586,12 @@ L6BF4: lda cached_window_id L6C0E: .byte 0 .endproc -;;; ================================================== +;;; ============================================================ L6C0F: MGTK_RELAY_CALL MGTK::CheckItem, checkitem_params rts -;;; ================================================== +;;; ============================================================ .proc L6C19 ldx cached_window_id @@ -10716,7 +10716,7 @@ L6D25: pla jmp L6CF3 .endproc -;;; ================================================== +;;; ============================================================ .proc clear_selection lda selected_icon_count @@ -10773,7 +10773,7 @@ L6DA1: sta selected_icon_list,x L6DB0: .byte 0 .endproc -;;; ================================================== +;;; ============================================================ .proc update_scrollbars ldx active_window_id @@ -10846,7 +10846,7 @@ activate_ctl: rts .endproc -;;; ================================================== +;;; ============================================================ .proc cached_icons_window_to_screen lda #0 @@ -10865,7 +10865,7 @@ done: rts count: .byte 0 .endproc -;;; ================================================== +;;; ============================================================ .proc cached_icons_screen_to_window lda #0 @@ -10884,7 +10884,7 @@ done: rts index: .byte 0 .endproc -;;; ================================================== +;;; ============================================================ .proc offset_grafport2_impl @@ -10906,7 +10906,7 @@ flag: .byte 0 offset_grafport2 := offset_grafport2_impl::flag_clear offset_grafport2_and_set := offset_grafport2_impl::flag_set -;;; ================================================== +;;; ============================================================ .proc enable_various_file_menu_items lda #MGTK::disablemenu_enable @@ -10932,7 +10932,7 @@ flag: .byte 0 rts .endproc -;;; ================================================== +;;; ============================================================ .proc L6F0D ptr := $6 @@ -10965,7 +10965,7 @@ pathptr: .addr 0 pathlen: .byte 0 .endproc -;;; ================================================== +;;; ============================================================ .proc L6F4B ptr := $6 @@ -10995,7 +10995,7 @@ L6F64: dec L704B L6F8F: rts .endproc -;;; ================================================== +;;; ============================================================ .proc L6F90 ptr := $A @@ -11021,7 +11021,7 @@ L6FA9: cpy #1 rts .endproc -;;; ================================================== +;;; ============================================================ ;; If 'set' version called, length in Y; otherwise use str len .proc L6FBD @@ -11111,7 +11111,7 @@ flag: .byte 0 L704B: .byte 0 L704C: .res 8 -;;; ================================================== +;;; ============================================================ .proc L7054 jmp L70C5 @@ -11368,7 +11368,7 @@ L7342: return #0 L705D := L7054::L705D L72EC := L7054::L72EC -;;; ================================================== +;;; ============================================================ .proc L7345 sta L7445 @@ -11456,7 +11456,7 @@ L7449: .byte 0 L744A: .byte 0 .endproc -;;; ================================================== +;;; ============================================================ .proc L744B lda cached_window_id @@ -11668,7 +11668,7 @@ L75FA: ldx cached_window_id L7620: .byte $00 .endproc -;;; ================================================== +;;; ============================================================ ;;; Icon entry construction L7621: .byte $00 ; window_id ? @@ -11808,7 +11808,7 @@ L7767: .byte $14 .endproc L763A := L7635::L763A -;;; ================================================== +;;; ============================================================ ;;; Create icon .proc L7768 @@ -11929,7 +11929,7 @@ L7870: lda cached_window_id .byte 0 .endproc -;;; ================================================== +;;; ============================================================ .proc find_icon_details_for_file_type ptr := $6 @@ -11973,7 +11973,7 @@ file_type: .byte 0 .endproc -;;; ================================================== +;;; ============================================================ ;;; Draw header (items/k in disk/k available/lines) .proc draw_window_header @@ -12199,7 +12199,7 @@ nonzero_flag: ; high bit set once a non-zero digit seen .endproc ; draw_window_header -;;; ================================================== +;;; ============================================================ L7B5F: .byte 0 L7B60: .byte 0 @@ -12371,7 +12371,7 @@ L7D5B: .byte 0 L7D5C: .byte 0 .endproc -;;; ================================================== +;;; ============================================================ .proc L7D5D jsr window_lookup @@ -12413,7 +12413,7 @@ L7D9A: .word 0 .endproc -;;; ================================================== +;;; ============================================================ .proc L7D9C jmp L7D9F @@ -12764,7 +12764,7 @@ L809E: inc $0805 jmp L8051 .endproc -;;; ================================================== +;;; ============================================================ .proc L80CA @@ -12794,7 +12794,7 @@ L809E: inc $0805 rts .endproc -;;; ================================================== +;;; ============================================================ .proc L80F5 lda #$00 @@ -12824,7 +12824,7 @@ L8124: lda LCBANK1 rts .endproc -;;; ================================================== +;;; ============================================================ .proc L812B lda LCBANK1 @@ -12836,7 +12836,7 @@ L8124: lda LCBANK1 rts .endproc -;;; ================================================== +;;; ============================================================ .proc L813F_impl @@ -12930,7 +12930,7 @@ L81F7: jsr prepare_col_name .endproc L813F := L813F_impl::start -;;; ================================================== +;;; ============================================================ .proc prepare_col_name lda LEC43 @@ -12964,7 +12964,7 @@ loop: lda LDFC5,x ;; fall through .endproc -;;; ================================================== +;;; ============================================================ ;;; Populate text_buffer2 with " 12345 Blocks" .proc compose_blocks_string @@ -13056,7 +13056,7 @@ L830B: sta text_buffer2::length rts .endproc -;;; ================================================== +;;; ============================================================ compose_date_string: ldx #21 @@ -13237,7 +13237,7 @@ L84CF: .byte 0 L84D0: .byte 0 .endproc -;;; ================================================== +;;; ============================================================ .proc L84D1 jsr push_zp_addrs @@ -13333,7 +13333,7 @@ L85F9: .byte 0 L85FA: .word 0 .endproc -;;; ================================================== +;;; ============================================================ ;;; Double Click Detection ;;; Returns with A=0 if double click, A=$FF otherwise. @@ -13446,7 +13446,7 @@ unused: .byte 0 ; ??? .endproc -;;; ================================================== +;;; ============================================================ ;;; A = A * 16, high bits into X .proc a_times_16 @@ -13466,7 +13466,7 @@ unused: .byte 0 ; ??? tmp: .byte 0 .endproc -;;; ================================================== +;;; ============================================================ ;;; A = A * 64, high bits into X .proc a_times_64 @@ -13490,7 +13490,7 @@ tmp: .byte 0 tmp: .byte 0 .endproc -;;; ================================================== +;;; ============================================================ ;;; Look up file address. Index in A, address in A,X. .proc icon_entry_lookup @@ -13504,7 +13504,7 @@ tmp: .byte 0 rts .endproc -;;; ================================================== +;;; ============================================================ ;;; Look up window. Index in A, address in A,X. .proc window_lookup @@ -13518,7 +13518,7 @@ tmp: .byte 0 rts .endproc -;;; ================================================== +;;; ============================================================ ;;; Look up window address. Index in A, address in A,X. .proc window_address_lookup @@ -13532,7 +13532,7 @@ tmp: .byte 0 rts .endproc -;;; ================================================== +;;; ============================================================ .proc L8707 sta L877F @@ -13594,7 +13594,7 @@ L877F: .byte 0 .endproc -;;; ================================================== +;;; ============================================================ ;;; Draw text, pascal string address in A,X .proc draw_pascal_string @@ -13612,7 +13612,7 @@ L877F: .byte 0 exit: rts .endproc -;;; ================================================== +;;; ============================================================ ;;; Measure text, pascal string address in A,X; result in A,X .proc measure_text1 @@ -13630,7 +13630,7 @@ exit: rts rts .endproc -;;; ================================================== +;;; ============================================================ .proc capitalize_string ptr := $A @@ -13677,7 +13677,7 @@ check: iny jmp next .endproc -;;; ================================================== +;;; ============================================================ ;;; Pushes two words from $6/$8 to stack .proc push_zp_addrs @@ -13704,7 +13704,7 @@ loop: lda ptr,x addr: .addr 0 .endproc -;;; ================================================== +;;; ============================================================ ;;; Pops two words from stack to $6/$8 .proc pop_zp_addrs @@ -13731,7 +13731,7 @@ loop: pla addr: .addr 0 .endproc -;;; ================================================== +;;; ============================================================ port_copy: .res MGTK::grafport_size+1 @@ -13776,7 +13776,7 @@ port_copy: rts .endproc -;;; ================================================== +;;; ============================================================ ;;; Convert icon's coordinates from screen to window (direction???) ;;; (icon index in A, active window) @@ -13864,7 +13864,7 @@ pos_win: .word 0, 0 .endproc -;;; ================================================== +;;; ============================================================ ;;; Convert icon's coordinates from window to screen (direction???) ;;; (icon index in A, active window) @@ -13954,7 +13954,7 @@ pos_screen: .word 0, 0 pos_win: .word 0, 0 .endproc -;;; ================================================== +;;; ============================================================ .proc zero_grafport5_coords lda #0 @@ -13969,7 +13969,7 @@ pos_win: .word 0, 0 rts .endproc -;;; ================================================== +;;; ============================================================ gdi_data_buffer := $800 @@ -14138,7 +14138,7 @@ selected_device_icon: return #0 .endproc -;;; ================================================== +;;; ============================================================ unit_number: .byte 0 device_num: .byte 0 @@ -14158,7 +14158,7 @@ desktop_icon_coords_table: DEFINE_GET_PREFIX_PARAMS get_prefix_params, L4824 -;;; ================================================== +;;; ============================================================ .proc remove_icon_from_window ldx cached_window_icon_count @@ -14181,7 +14181,7 @@ remove: lda cached_window_icon_list+1,x rts .endproc -;;; ================================================== +;;; ============================================================ L8B19: jsr push_zp_addrs jmp L8B2E @@ -14220,7 +14220,7 @@ skip: lda icon_params2 rts .endproc -;;; ================================================== +;;; ============================================================ .proc L8B5C ldy #$80 @@ -14360,7 +14360,7 @@ L8D56: .word 0 .endproc L8B60 := L8B5C::L8B60 -;;; ================================================== +;;; ============================================================ .proc L8D58 lda #$00 @@ -14410,7 +14410,7 @@ L8DA7: inc L8DB2 L8DB2: .byte 0 .endproc -;;; ================================================== +;;; ============================================================ .proc L8DB3 lda #$0B @@ -14461,14 +14461,14 @@ L8E04: dec L8E0F L8E0F: .byte 0 .endproc -;;; ================================================== +;;; ============================================================ .proc draw_rect_E230 MGTK_RELAY_CALL MGTK::FrameRect, rect_E230 rts .endproc -;;; ================================================== +;;; ============================================================ ;;; Dynamically load parts of Desktop2 ;;; Call load_dynamic_routine or restore_dynamic_routine @@ -14564,7 +14564,7 @@ open: MLI_RELAY_CALL OPEN, open_params load_dynamic_routine := load_dynamic_routine_impl::load restore_dynamic_routine := load_dynamic_routine_impl::restore -;;; ================================================== +;;; ============================================================ L8F00: jmp L8FC5 jmp rts2 ; rts @@ -14581,7 +14581,7 @@ L8F1B: jmp L8F5B ; cmd_delete_file ??? L8F24: jmp L8F7E ; cmd_selector_action ??? L8F27: jmp L8FB8 ; cmd_get_size -;;; ================================================== +;;; ============================================================ ;; TODO: Break this down more? .proc L8F2A @@ -14844,7 +14844,7 @@ L917B: .byte 0 L8FB8 := L8F2A::L8FB8 L8FC5 := L8F2A::L8FC5 -;;; ================================================== +;;; ============================================================ ;; Dynamically constructed jump table??? L917D := *+1 @@ -14865,7 +14865,7 @@ L918B: .byte 0 L918C: .byte 0 L918D: .byte 0 -;;; ================================================== +;;; ============================================================ ;;; For icon index in A, put pointer to name in $6 .proc icon_entry_name_lookup @@ -14881,7 +14881,7 @@ L918D: .byte 0 rts .endproc -;;; ================================================== +;;; ============================================================ .proc join_paths str1 := $8 @@ -14927,7 +14927,7 @@ done: stx buf rts .endproc -;;; ================================================== +;;; ============================================================ L91D5: yax_call JT_MGTK_RELAY, MGTK::InitPort, grafport3 yax_call JT_MGTK_RELAY, MGTK::SetPort, grafport3 @@ -15328,7 +15328,7 @@ L9558: lda text_buffer2::data,x .endproc L92F5 := L92E7::L92F5 -;;; ================================================== +;;; ============================================================ .proc L9571_impl @@ -15509,7 +15509,7 @@ L9709: .byte $00 .endproc L9571 := L9571_impl::start -;;; ================================================== +;;; ============================================================ DEFINE_OPEN_PARAMS open_params3, $220, $800 DEFINE_READ_PARAMS read_params3, L9718, 4 @@ -15550,7 +15550,7 @@ L972E: .res 5, 0 DEFINE_ON_LINE_PARAMS on_line_params2,, $800 -;;; ================================================== +;;; ============================================================ L97AD: .res 16, 0 @@ -15643,7 +15643,7 @@ L989C: return #0 L989F: return #$FF .endproc -;;; ================================================== +;;; ============================================================ L98A2: lda LE05F sta LE061 @@ -15783,7 +15783,7 @@ L99EB: lda #4 L99FE: jmp LA39F -;;; ================================================== +;;; ============================================================ .proc L9A01 copy16 #$0080, LE05B @@ -15923,11 +15923,11 @@ L9B31: .byte 0 L9B32: .byte 0 -;;; ================================================== +;;; ============================================================ L9B33: jmp LA360 -;;; ================================================== +;;; ============================================================ .proc L9B36 jsr check_escape_key_down @@ -15984,12 +15984,12 @@ L9BBB: jsr LA360 L9BBE: rts .endproc -;;; ================================================== +;;; ============================================================ L9BBF: yax_call launch_dialog, index_copy_file_dialog, L9937 rts -;;; ================================================== +;;; ============================================================ .proc L9BC9 yax_call JT_MLI_RELAY, GET_FILE_INFO, file_info_params3 @@ -16007,7 +16007,7 @@ L9BFE: rts L9BFF: .word 0 .endproc -;;; ================================================== +;;; ============================================================ L9C01: jsr L9C1A bcc L9C19 @@ -16022,7 +16022,7 @@ L9C13: lda #3 sec L9C19: rts -;;; ================================================== +;;; ============================================================ .proc L9C1A yax_call JT_MLI_RELAY, GET_FILE_INFO, file_info_params2 @@ -16086,7 +16086,7 @@ L9CD8: .byte 0 L9CD9: .byte 0 .endproc -;;; ================================================== +;;; ============================================================ .proc L9CDA jsr decrement_LA2ED @@ -16287,7 +16287,7 @@ L9ED3: lda #$05 sta L9E79 jmp LA044 -;;; ================================================== +;;; ============================================================ .proc L9EDB lda #$03 @@ -16367,7 +16367,7 @@ L9F8E: jsr show_error_alert jmp L9F29 .endproc -;;; ================================================== +;;; ============================================================ .proc L9F94 jsr check_escape_key_down @@ -16430,7 +16430,7 @@ LA022: jmp remove_path_segment_220 rts .endproc -;;; ================================================== +;;; ============================================================ LA02E: yax_call JT_MLI_RELAY, DESTROY, destroy_params beq LA043 @@ -16516,7 +16516,7 @@ LA100: yax_call launch_dialog, index_lock_dialog, LA054 LA10A: yax_call launch_dialog, index_unlock_dialog, LA054 rts -;;; ================================================== +;;; ============================================================ .proc LA114 lda #$03 @@ -16628,7 +16628,7 @@ LA241: rts LA242: .addr LA2AE,rts2,rts2 -;;; ================================================== +;;; ============================================================ .proc LA248 lda #$00 @@ -16651,7 +16651,7 @@ LA26A: sta BITMAP,y rts .endproc -;;; ================================================== +;;; ============================================================ .proc LA271 jsr LA379 @@ -16681,7 +16681,7 @@ LA2A9: .byte 0 LA2AA: .byte 0 .endproc -;;; ================================================== +;;; ============================================================ LA2AB: jmp LA2AE @@ -16701,7 +16701,7 @@ LA2AE: bit L9189 LA2ED: .word 0 LA2EF: .word 0 -;;; ================================================== +;;; ============================================================ .proc decrement_LA2ED lda LA2ED @@ -16711,7 +16711,7 @@ LA2EF: .word 0 rts .endproc -;;; ================================================== +;;; ============================================================ ;;; Append name at L97AD to path at $220 .proc append_to_path_220 @@ -16739,7 +16739,7 @@ done: sty $220 rts .endproc -;;; ================================================== +;;; ============================================================ ;;; Remove segment from path at $220 .proc remove_path_segment_220 @@ -16761,7 +16761,7 @@ found: dex rts .endproc -;;; ================================================== +;;; ============================================================ .proc LA33B lda L97AD @@ -16785,7 +16785,7 @@ LA35C: sty $1FC0 rts .endproc -;;; ================================================== +;;; ============================================================ .proc LA360 ldx $1FC0 @@ -16805,7 +16805,7 @@ LA374: dex rts .endproc -;;; ================================================== +;;; ============================================================ .proc LA379 ldy #$00 @@ -16827,7 +16827,7 @@ LA395: lda path_buf4,y rts .endproc -;;; ================================================== +;;; ============================================================ LA39F: jsr L917F jmp LA3A7 @@ -16848,7 +16848,7 @@ start: yax_call JT_MLI_RELAY, CLOSE, close_params .endproc LA3A7 := LA3A7_impl::start -;;; ================================================== +;;; ============================================================ .proc check_escape_key_down yax_call JT_MGTK_RELAY, MGTK::GetEvent, event_params @@ -16874,7 +16874,7 @@ LA40A: sub16 LA2ED, #$01, L9938 LA425: .byte 0 -;;; ================================================== +;;; ============================================================ .proc LA426 jsr LA46D @@ -16925,7 +16925,7 @@ loop: lda file_info_params2::access,x done: rts .endproc -;;; ================================================== +;;; ============================================================ .proc show_error_alert_impl @@ -16972,7 +16972,7 @@ do_on_line: .assert * = $A4D0, error, "Segment length mismatch" PAD_TO $A500 -;;; ================================================== +;;; ============================================================ ;;; Dialog Launcher (or just proc handler???) index_about_dialog := 0 @@ -17035,7 +17035,7 @@ dialog_param_addr: .endproc -;;; ================================================== +;;; ============================================================ ;;; Message handler for OK/Cancel dialog .proc prompt_input_loop @@ -17381,7 +17381,7 @@ jump_relay: jmp dummy0000 -;;; ================================================== +;;; ============================================================ ;;; "About" dialog .proc show_about_dialog @@ -17423,7 +17423,7 @@ close: MGTK_RELAY_CALL MGTK::CloseWindow, winfo18 rts .endproc -;;; ================================================== +;;; ============================================================ .proc show_copy_file_dialog ptr := $6 @@ -17545,7 +17545,7 @@ LAAB1: jsr prompt_input_loop rts .endproc -;;; ================================================== +;;; ============================================================ .proc bell sta ALTZPOFF @@ -17557,7 +17557,7 @@ LAAB1: jsr prompt_input_loop rts .endproc -;;; ================================================== +;;; ============================================================ ;;; "DownLoad" dialog .proc show_download_dialog @@ -17650,7 +17650,7 @@ do4: jsr bell rts .endproc -;;; ================================================== +;;; ============================================================ ;;; "Get Size" dialog .proc show_get_size_dialog @@ -17735,7 +17735,7 @@ do2: lda winfoF return #0 .endproc -;;; ================================================== +;;; ============================================================ ;;; "Delete File" dialog .proc show_delete_file_dialog @@ -17852,7 +17852,7 @@ LAE17: jsr prompt_input_loop rts .endproc -;;; ================================================== +;;; ============================================================ ;;; "New Folder" dialog .proc show_new_folder_dialog @@ -17950,7 +17950,7 @@ LAF16: jsr reset_state return #1 .endproc -;;; ================================================== +;;; ============================================================ ;;; "Get Info" dialog .proc show_get_info_dialog @@ -18044,7 +18044,7 @@ LB01D: .byte 0 row: .byte 0 .endproc -;;; ================================================== +;;; ============================================================ ;;; Draw ":" after dialog label .proc draw_colon @@ -18054,7 +18054,7 @@ row: .byte 0 rts .endproc -;;; ================================================== +;;; ============================================================ ;;; "Lock" dialog .proc show_lock_dialog @@ -18145,7 +18145,7 @@ do4: jsr reset_state rts .endproc -;;; ================================================== +;;; ============================================================ ;;; "Unlock" dialog .proc show_unlock_dialog @@ -18236,7 +18236,7 @@ do4: jsr reset_state rts .endproc -;;; ================================================== +;;; ============================================================ ;;; "Rename" dialog .proc show_rename_dialog @@ -18306,7 +18306,7 @@ LB313: jsr reset_state return #1 .endproc -;;; ================================================== +;;; ============================================================ ;;; "Warning!" dialog ;;; $6 ptr to message num @@ -18397,7 +18397,7 @@ warning_message_table: warning_msg_too_many_windows := 5 warning_msg_save_selector_list := 6 -;;; ================================================== +;;; ============================================================ .proc copy_dialog_param_addr_to_ptr copy16 dialog_param_addr, $06 @@ -18566,7 +18566,7 @@ LB537: jmp reset_state rts .endproc -;;; ================================================== +;;; ============================================================ ;;; Draw dialog label. ;;; A,X has pointer to DrawText params block @@ -18619,7 +18619,7 @@ skip: dey ; ypos = (Y-1) * 8 + pointD::ycoord rts .endproc -;;; ================================================== +;;; ============================================================ draw_ok_label: MGTK_RELAY_CALL MGTK::MoveTo, desktop_aux::ok_label_pos @@ -18697,7 +18697,7 @@ erase_ok_button: MGTK_RELAY_CALL MGTK::PaintRect, desktop_aux::ok_button_rect rts -;;; ================================================== +;;; ============================================================ .proc draw_text1 params := $6 @@ -18713,7 +18713,7 @@ erase_ok_button: done: rts .endproc -;;; ================================================== +;;; ============================================================ .proc draw_dialog_title str := $6 @@ -18748,7 +18748,7 @@ done: rts hi: .byte 0 .endproc -;;; ================================================== +;;; ============================================================ ;; Unreferenced ??? LB76C: stax $06 @@ -18756,7 +18756,7 @@ LB76C: stax $06 addr_call_indirect draw_text1, $06 rts -;;; ================================================== +;;; ============================================================ ;;; Adjust case in a filename (input buf A,X, output buf $A) ;;; Called from ovl2 @@ -18799,7 +18799,7 @@ check_alpha: jmp loop .endproc -;;; ================================================== +;;; ============================================================ .proc set_port_from_window_id sta getwinport_params2::window_id @@ -18808,7 +18808,7 @@ check_alpha: rts .endproc -;;; ================================================== +;;; ============================================================ ;;; Event loop during button press - handle inverting ;;; the text as mouse is dragged in/out, report final ;;; click (A as passed) / cancel (A is negative) @@ -18945,7 +18945,7 @@ click_result: rts ; ??? .endproc -;;; ================================================== +;;; ============================================================ .proc LB8F5 point := $6 @@ -18981,7 +18981,7 @@ LB93B: copy16 #LD8EF, textptr rts .endproc -;;; ================================================== +;;; ============================================================ .proc draw_filename_prompt lda path_buf1 @@ -19002,7 +19002,7 @@ LB93B: copy16 #LD8EF, textptr done: rts .endproc -;;; ================================================== +;;; ============================================================ .proc LB9B8 MGTK_RELAY_CALL MGTK::ScreenToWindow, screentowindow_params @@ -19360,7 +19360,7 @@ LBD33: rts jsr draw_filename_prompt rts -;;; ================================================== +;;; ============================================================ ;;; Compute width of path_buf1, offset point6, return x coord in (A,X) .proc measure_path_buf1 @@ -19388,7 +19388,7 @@ LBD33: rts rts .endproc -;;; ================================================== +;;; ============================================================ LBD69: lda #$01 sta path_buf2 @@ -19446,7 +19446,7 @@ saved_proc_buf: .res 20, 0 .endproc -;;; ================================================== +;;; ============================================================ ;;; Make str_files singlular or plural based on file_count .proc adjust_str_files_suffix @@ -19466,7 +19466,7 @@ saved_proc_buf: rts .endproc -;;; ================================================== +;;; ============================================================ .proc compose_file_count_string lda file_count @@ -19537,7 +19537,7 @@ nonzero_flag: ; high bit set once a non-zero digit seen .endproc -;;; ================================================== +;;; ============================================================ LBE63: ldy #$00 lda ($06),y @@ -19583,9 +19583,9 @@ reset_state: desktop_main_pop_zp_addrs := desktop_main::pop_zp_addrs desktop_main_push_zp_addrs := desktop_main::push_zp_addrs -;;; ================================================== +;;; ============================================================ ;;; Segment loaded into MAIN $800-$FFF -;;; ================================================== +;;; ============================================================ ;;; Appears to be init sequence - machine identification, etc @@ -19593,7 +19593,7 @@ reset_state: .org $800 -;;; ================================================== +;;; ============================================================ start: @@ -19644,7 +19644,7 @@ is_iic: lda #$FA ; IIc iigs_flag: ; High bit set if IIgs detected. .byte 0 -;;; ================================================== +;;; ============================================================ .proc init_video sta CLR80VID @@ -19667,7 +19667,7 @@ iigs_flag: ; High bit set if IIgs detected. end: .endproc -;;; ================================================== +;;; ============================================================ .proc detach_ramdisk ;; Make a copy of the original device list @@ -19692,7 +19692,7 @@ found_ram: ;; fall through .endproc -;;; ================================================== +;;; ============================================================ ;; Initialize MGTK .proc init_mgtk @@ -19704,7 +19704,7 @@ found_ram: ;; fall through .endproc -;;; ================================================== +;;; ============================================================ ;; Populate icon_entries table .proc populate_icon_entries_table @@ -19741,7 +19741,7 @@ loop: cpx #max_icon_count jmp loop .endproc -;;; ================================================== +;;; ============================================================ ;; Zero the window icon tables .proc clear_window_icon_tables @@ -19759,7 +19759,7 @@ loop: sta $1F00,x ; window 8, icon use map jmp create_trash_icon .endproc -;;; ================================================== +;;; ============================================================ trash_name: PASCAL_STRING " Trash " @@ -19798,7 +19798,7 @@ trash_name: PASCAL_STRING " Trash " ;; fall through .endproc -;;; ================================================== +;;; ============================================================ ;; create volume icons??? .proc init_volumes @@ -19882,7 +19882,7 @@ devcnt: .byte 0 L0A02: .byte 0 .endproc -;;; ================================================== +;;; ============================================================ .proc load_selector_list ptr1 := $6 @@ -20013,7 +20013,7 @@ read_selector_list: rts .endproc -;;; ================================================== +;;; ============================================================ .proc calc_header_item_widths ;; Enough space for "123456" @@ -20056,7 +20056,7 @@ read_selector_list: dx: .word 0 .endproc -;;; ================================================== +;;; ============================================================ .proc enumerate_desk_accessories MGTK_RELAY_CALL MGTK::CheckEvents ; ??? @@ -20203,7 +20203,7 @@ L0D08: .byte 0 L0D09: .byte 0 .endproc -;;; ================================================== +;;; ============================================================ .proc L0D0A ldy #0 @@ -20357,7 +20357,7 @@ L0E33: .byte 0 L0E34: .byte 0 .endproc -;;; ================================================== +;;; ============================================================ ;; Remove device num in X from devices list .proc remove_device @@ -20373,7 +20373,7 @@ L0E36: inx rts .endproc -;;; ================================================== +;;; ============================================================ .proc populate_startup_menu lda DEVCNT @@ -20445,7 +20445,7 @@ slot_string_table: .endproc -;;; ================================================== +;;; ============================================================ DEFINE_GET_FILE_INFO_PARAMS get_file_info_params2, desktop_main::sys_start_path .byte 0 diff --git a/desktop/inc/desktoplc.inc b/desktop/inc/desktoplc.inc index f1eec23..26c03e6 100644 --- a/desktop/inc/desktoplc.inc +++ b/desktop/inc/desktoplc.inc @@ -66,7 +66,7 @@ updatethumb_which_ctl := updatethumb_params updatethumb_thumbpos := updatethumb_params + 1 updatethumb_stash := updatethumb_params + 5 ; not part of struct -;;; ================================================== +;;; ============================================================ ;;; Resources winfo12 := $D5B7 diff --git a/desktop/inc/font.inc b/desktop/inc/font.inc index c4c525e..a1cad86 100644 --- a/desktop/inc/font.inc +++ b/desktop/inc/font.inc @@ -1,4 +1,4 @@ -;;; ================================================== +;;; ============================================================ ;;; Font font_definition: diff --git a/desktop/invoker.s b/desktop/invoker.s index de9f9a3..4d6ac0c 100644 --- a/desktop/invoker.s +++ b/desktop/invoker.s @@ -5,9 +5,9 @@ .include "../inc/prodos.inc" .include "../macros.inc" -;;; ================================================== +;;; ============================================================ ;;; Segment loaded into MAIN $290-$3EF -;;; ================================================== +;;; ============================================================ ;;; Used to invoke other programs (system, binary, BASIC) @@ -20,7 +20,7 @@ FILENAME := $280 ; File to invoke, set by caller start: jmp begin -;;; ================================================== +;;; ============================================================ default_start_address := $2000 @@ -41,7 +41,7 @@ bs_path: DEFINE_QUIT_PARAMS quit_params, $EE, FILENAME -;;; ================================================== +;;; ============================================================ set_prefix: MLI_CALL SET_PREFIX, set_prefix_params @@ -51,12 +51,12 @@ set_prefix: jmp exit : rts -;;; ================================================== +;;; ============================================================ open: MLI_CALL OPEN, open_params rts -;;; ================================================== +;;; ============================================================ begin: lda ROMIN2 diff --git a/desktop/loader.s b/desktop/loader.s index 7180578..46337e9 100644 --- a/desktop/loader.s +++ b/desktop/loader.s @@ -8,7 +8,7 @@ DESKTOP_INIT := $0800 ; init location L7ECA := $7ECA ; ??? -;;; ================================================== +;;; ============================================================ ;;; Patch self in as ProDOS QUIT routine (LCBank2 $D100) ;;; and invoke QUIT. Note that only $200 bytes are copied. @@ -35,7 +35,7 @@ loop: lda src,y DEFINE_QUIT_PARAMS quit_params .endproc ; install_as_quit -;;; ================================================== +;;; ============================================================ ;;; New QUIT routine. Gets relocated to $1000 by ProDOS before ;;; being executed. @@ -206,7 +206,7 @@ prefix_buffer: .endproc ; quit_routine -;;; ================================================== +;;; ============================================================ ;;; This chunk is invoked at $2000 after the quit handler has been invoked ;;; and updated itself. Using the segment_*_tables below, this loads the ;;; DeskTop application into various parts of main, aux, and bank-switched @@ -416,7 +416,7 @@ max_page: .res $2200 - *,0 .endproc ; install_segments -;;; ================================================== +;;; ============================================================ ;;; Not sure where this could be invoked from .proc dump_screen diff --git a/desktop/mgtk.s b/desktop/mgtk.s index f5b521e..59ed1a5 100644 --- a/desktop/mgtk.s +++ b/desktop/mgtk.s @@ -7,9 +7,9 @@ .include "../desktop.inc" .include "../macros.inc" -;;; ================================================== +;;; ============================================================ ;;; MouseGraphics ToolKit -;;; ================================================== +;;; ============================================================ .proc mgtk .org $4000 @@ -17,7 +17,7 @@ screen_width := 560 screen_height := 192 -;;; ================================================== +;;; ============================================================ ;;; ZP Usage @@ -92,7 +92,7 @@ glyph_last := $FE ; last glyph index glyph_height_p := $FF ; glyph height -;;; ================================================== +;;; ============================================================ ;;; MGTK .proc dispatch @@ -219,7 +219,7 @@ exit_with_0: rts1: rts .endproc -;;; ================================================== +;;; ============================================================ ;;; Routines can jmp here to exit with A set exit_with_a: @@ -238,7 +238,7 @@ rts2: rts jmp exit_with_a .endmacro -;;; ================================================== +;;; ============================================================ ;;; Copy port params (36 bytes) to/from active port addr .proc apply_active_port_to_port @@ -259,7 +259,7 @@ rts2: rts rts .endproc -;;; ================================================== +;;; ============================================================ ;;; Drawing calls show/hide cursor before/after ;;; A recursion count is kept to allow rentrancy. @@ -278,7 +278,7 @@ hide_cursor_count: jmp ShowCursorImpl .endproc -;;; ================================================== +;;; ============================================================ ;;; Jump table for MGTK entry point calls ;; jt_rts can be used if the only thing the @@ -511,7 +511,7 @@ param_lengths: PARAM_DEFN 16, $8A, 0 ; $4D PARAM_DEFN 2, $82, 0 ; $4E -;;; ================================================== +;;; ============================================================ ;;; Pre-Shift Tables shift_1_aux: @@ -800,7 +800,7 @@ mod7_table: .byte $06,$00,$01,$02,$03,$04,$05,$06 .byte $00,$01,$02,$03 -;;; ================================================== +;;; ============================================================ hires_table_lo: .byte $00,$00,$00,$00,$00,$00,$00,$00 @@ -854,7 +854,7 @@ hires_table_hi: .byte $03,$07,$0B,$0F,$13,$17,$1B,$1F .byte $03,$07,$0B,$0F,$13,$17,$1B,$1F -;;; ================================================== +;;; ============================================================ ;;; Routines called during PaintRect etc based on ;;; current_penmode @@ -1158,7 +1158,7 @@ fill_mode_table_a: .addr fillmode0a,fillmode1a,fillmode2a,fillmode3a .addr fillmode0a,fillmode1a,fillmode2a,fillmode3a -;;; ================================================== +;;; ============================================================ ;;; SetPenMode SetPenModeImpl: @@ -1422,7 +1422,7 @@ L4F7D: ror a dey L4F8E: rts -;;; ================================================== +;;; ============================================================ ;;; SetPattern SetPatternImpl: @@ -1477,7 +1477,7 @@ L4FDD: dex sta LOWSCR rts -;;; ================================================== +;;; ============================================================ ;;; FrameRect ;;; 4 bytes of params, copied to $9F @@ -1541,7 +1541,7 @@ L502F: lda current_penheight inc $98+1 ;; Fall through... -;;; ================================================== +;;; ============================================================ ;;; PaintRect ;;; 4 bytes of params, copied to $92 @@ -1554,7 +1554,7 @@ L5043: jsr L50A9 jsr L4EA9 jmp L4CED -;;; ================================================== +;;; ============================================================ ;;; InRect ;;; 4 bytes of params, copied to $92 @@ -1596,7 +1596,7 @@ L5043: jsr L50A9 fail: rts .endproc -;;; ================================================== +;;; ============================================================ ;;; SetPortBits SetPortBitsImpl: @@ -1713,7 +1713,7 @@ L514C: sec L5163: exit_call $81 -;;; ================================================== +;;; ============================================================ ;;; 16 bytes of params, copied to $8A @@ -1766,7 +1766,7 @@ PaintBitsImpl: sta dbi_height+1 ;; fall through -;;; ================================================== +;;; ============================================================ ;;; $4D IMPL @@ -2006,14 +2006,14 @@ ora_2_param_bytes: ldy #$80 L5379: rts -;;; ================================================== +;;; ============================================================ ;;; InPoly InPolyImpl: lda #$80 bne L5380 -;;; ================================================== +;;; ============================================================ ;;; PaintPoly ;; also called from the end of LineToImpl @@ -2414,7 +2414,7 @@ L56D2: dey bne L56B4 L56D5: rts -;;; ================================================== +;;; ============================================================ ;;; FramePoly .proc FramePolyImpl @@ -2491,7 +2491,7 @@ L572F: ldx #1 rts .endproc -;;; ================================================== +;;; ============================================================ ;;; Move ;;; 4 bytes of params, copied to $A1 @@ -2523,7 +2523,7 @@ L572F: ldx #1 rts .endproc -;;; ================================================== +;;; ============================================================ ;;; LineImpl ;;; 4 bytes of params, copied to $A1 @@ -2547,7 +2547,7 @@ loop: lda xdelta,x ;; fall through .endproc -;;; ================================================== +;;; ============================================================ ;;; LineTo ;;; 4 bytes of params, copied to $92 @@ -2692,7 +2692,7 @@ L5852: .byte $00,$00,$00,$00,$00,$00,$00,$00 .endproc DRAW_LINE_ABS_IMPL_L5783 := LineToImpl::L5783 -;;; ================================================== +;;; ============================================================ ;;; SetFont .proc SetFontImpl @@ -2760,7 +2760,7 @@ glyph_row_hi: .byte $00,$00,$00,$00,$00,$00,$00,$00 .byte $00,$00,$00,$00,$00,$00,$00,$00 -;;; ================================================== +;;; ============================================================ ;;; TextWidth ;;; 3 bytes of params, copied to $A1 @@ -2803,7 +2803,7 @@ loop: sty accum+1 rts .endproc -;;; ================================================== +;;; ============================================================ L5907: sec sbc #1 @@ -2831,7 +2831,7 @@ L592D: sec L5933: stax $94 rts -;;; ================================================== +;;; ============================================================ ;;; 3 bytes of params, copied to $A1 @@ -3415,7 +3415,7 @@ L5E41: .byte $00 L5E42: .byte $00,$00,$00,$00,$00,$00,$00,$00 .byte $00,$00,$00,$00,$00,$00,$00 -;;; ================================================== +;;; ============================================================ ;;; InitGraf .proc InitGrafImpl @@ -3446,7 +3446,7 @@ saved_port_addr: .addr saved_port .endproc -;;; ================================================== +;;; ============================================================ ;;; SetSwitches ;;; 1 byte param, copied to $82 @@ -3482,7 +3482,7 @@ store: sta $C000,y table: .byte <(TXTCLR / 2), <(MIXCLR / 2), <(LOWSCR / 2), <(LORES / 2) .endproc -;;; ================================================== +;;; ============================================================ ;;; SetPort .proc SetPortImpl @@ -3504,7 +3504,7 @@ prepare_port: jsr SetPatternImpl jmp SetPenModeImpl -;;; ================================================== +;;; ============================================================ ;;; GetPort .proc GetPortImpl @@ -3525,7 +3525,7 @@ store_xa_at_y: sta (params_addr),y rts -;;; ================================================== +;;; ============================================================ ;;; InitPort .proc InitPortImpl @@ -3537,7 +3537,7 @@ loop: lda standard_port,y .endproc rts3: rts -;;; ================================================== +;;; ============================================================ ;;; SetZP1 ;;; 1 byte of params, copied to $82 @@ -3553,7 +3553,7 @@ rts3: rts jmp dispatch::cleanup .endproc -;;; ================================================== +;;; ============================================================ ;;; SetZP2 ;;; 1 byte of params, copied to $82 @@ -3598,7 +3598,7 @@ unstash: maybe_stash_low_zp := SetZP2Impl::maybe_stash maybe_unstash_low_zp := SetZP2Impl::maybe_unstash -;;; ================================================== +;;; ============================================================ ;;; Version .proc VersionImpl @@ -3619,7 +3619,7 @@ release:.byte 1 ; ??? .endproc .endproc -;;; ================================================== +;;; ============================================================ preserve_zp_flag: ; if high bit set, ZP saved during MGTK calls .byte $80 @@ -3630,7 +3630,7 @@ low_zp_stash_flag: stack_ptr_stash: .byte 0 -;;; ================================================== +;;; ============================================================ ;;; Standard GrafPort @@ -3649,7 +3649,7 @@ textback: .byte 0 textfont: .addr 0 .endproc -;;; ================================================== +;;; ============================================================ .proc saved_port viewloc: .word 0, 0 @@ -3732,7 +3732,7 @@ L6067: lda #$FF sta params_addr+1 ;; fall through -;;; ================================================== +;;; ============================================================ ;;; SetCursor cursor_height := 12 @@ -3961,7 +3961,7 @@ L622A: sta L622E cpy #$28 rts -;;; ================================================== +;;; ============================================================ ;;; ShowCursor .proc ShowCursorImpl @@ -3980,7 +3980,7 @@ done: plp rts .endproc -;;; ================================================== +;;; ============================================================ ;;; ObscureCursor .proc ObscureCursorImpl @@ -3993,7 +3993,7 @@ done: plp rts .endproc -;;; ================================================== +;;; ============================================================ ;;; HideCursor HideCursorImpl: @@ -4004,7 +4004,7 @@ HideCursorImpl: plp L6263: rts -;;; ================================================== +;;; ============================================================ L6264: .byte 0 L6265: bit L6339 @@ -4077,7 +4077,7 @@ L62FE: bit mouse_hooked_flag sta mouse_status L6309: rts -;;; ================================================== +;;; ============================================================ ;;; GetCursorAddr .proc GetCursorAddrImpl @@ -4085,7 +4085,7 @@ L6309: rts jmp store_xa_at_params .endproc -;;; ================================================== +;;; ============================================================ ;; Call mouse firmware, operation in Y, param in A .proc call_mouse @@ -4124,7 +4124,7 @@ desktop_initialized_flag: L6340: .byte $00 -;;; ================================================== +;;; ============================================================ ;;; StartDeskTop ;;; 12 bytes of params, copied to $82 @@ -4285,7 +4285,7 @@ L649F: lda #$80 sta L6337 L64A4: rts -;;; ================================================== +;;; ============================================================ ;;; StopDeskTop .proc StopDeskTopImpl @@ -4309,7 +4309,7 @@ L64A4: rts rts .endproc -;;; ================================================== +;;; ============================================================ ;;; SetUserHook ;;; 3 bytes of params, copied to $82 @@ -4442,7 +4442,7 @@ checkerboard_pattern: .byte %10101010 .byte $00 -;;; ================================================== +;;; ============================================================ ;;; AttachDriver ;;; 2 bytes of params, copied to $82 @@ -4468,14 +4468,14 @@ mouse_state_addr: .addr mouse_state .endproc -;;; ================================================== +;;; ============================================================ ;;; PeekEvent PeekEventImpl: clc bcc L65D8 -;;; ================================================== +;;; ============================================================ ;;; GetEvent GetEventImpl: @@ -4510,7 +4510,7 @@ L6607: plp cli L660E: rts -;;; ================================================== +;;; ============================================================ ;;; 5 bytes of params, copied to $82 @@ -4560,7 +4560,7 @@ L6653: lda cursor_count,y bne L6653 rts -;;; ================================================== +;;; ============================================================ ;;; CheckEvents @@ -4654,7 +4654,7 @@ L66DE: lda input,y end: jmp L6523 .endproc -;;; ================================================== +;;; ============================================================ ;;; Interrupt Handler int_stash_zp: @@ -4709,7 +4709,7 @@ rloop: lda int_stash_zp,x : rts .endproc -;;; ================================================== +;;; ============================================================ ;;; GetIntHandler .proc GetIntHandlerImpl @@ -4719,7 +4719,7 @@ rloop: lda int_stash_zp,x L6750: .addr interrupt_handler::body .endproc -;;; ================================================== +;;; ============================================================ ;;; FlushEvents ;;; This is called during init by the DAs, just before @@ -4776,7 +4776,7 @@ L680E: clc L6811: clc rts -;;; ================================================== +;;; ============================================================ ;;; SetKeyEvent ;;; 1 byte of params, copied to $82 @@ -4792,7 +4792,7 @@ check_kbd_flag: .byte $80 rts .endproc -;;; ================================================== +;;; ============================================================ L681D: .byte $02 @@ -4970,7 +4970,7 @@ L691B: MGTK_CALL MGTK::GetEvent, $82 lda $82 rts -;;; ================================================== +;;; ============================================================ ;;; SetMenu L6924: .byte 0 @@ -5207,7 +5207,7 @@ L6B16: cpx $AA ldx #$00 L6B1C: rts -;;; ================================================== +;;; ============================================================ ;;; HiliteMenu ;;; 2 bytes of params, copied to $C7 @@ -5244,7 +5244,7 @@ loop: lda $B7,x rts .endproc -;;; ================================================== +;;; ============================================================ ;;; MenuKey ;;; 4 bytes of params, copied to $C7 @@ -5288,7 +5288,7 @@ L6B9F: jsr L6B96 bne L6B9E exit_call $9B -;;; ================================================== +;;; ============================================================ ;;; DisableItem ;;; 3 bytes of params, copied to $C7 @@ -5300,7 +5300,7 @@ DisableItemImpl: ror $BF jmp L68DF -;;; ================================================== +;;; ============================================================ ;;; CheckItem ;;; 3 bytes of params, copied to $C7 @@ -5317,7 +5317,7 @@ L6BC2: lda #$DF L6BC6: sta $BF jmp L68DF -;;; ================================================== +;;; ============================================================ ;;; DisableMenu ;;; 2 bytes of params, copied to $C7 @@ -5330,7 +5330,7 @@ DisableMenuImpl: ldx $A7 jmp L68A9 -;;; ================================================== +;;; ============================================================ ;;; MenuSelect L6BD9: .byte 0 @@ -5681,7 +5681,7 @@ L6EAA: ldx L6BDA MGTK_CALL MGTK::PaintRect, fill_rect_params4 jmp ShowCursorImpl -;;; ================================================== +;;; ============================================================ ;;; InitMenu ;;; 4 bytes of params, copied to $82 @@ -5728,7 +5728,7 @@ loop: lda params,x end: rts .endproc -;;; ================================================== +;;; ============================================================ ;;; SetMark ;;; 4 bytes of params, copied to $C7 @@ -6354,7 +6354,7 @@ L73F0: stax current_penloc_y ldax $82 rts -;;; ================================================== +;;; ============================================================ ;;; 4 bytes of params, copied to current_penloc @@ -6418,7 +6418,7 @@ L7472: ldx $AB L7476: lda #$02 bne L7472 -;;; ================================================== +;;; ============================================================ L747A: .byte 0 OpenWindowImpl: @@ -6446,7 +6446,7 @@ L749A: lda params_addr sta ($A9),y bmi L74BD -;;; ================================================== +;;; ============================================================ ;;; SelectWindow ;;; 1 byte of params, copied to $82 @@ -6493,7 +6493,7 @@ L74F4: ldy #next_offset_in_window_params ; Called from elsewhere sta ($A7),y rts -;;; ================================================== +;;; ============================================================ ;;; GetWinPtr ;;; 1 byte of params, copied to $C7 @@ -6506,7 +6506,7 @@ L74F4: ldy #next_offset_in_window_params ; Called from elsewhere jmp store_xa_at_y .endproc -;;; ================================================== +;;; ============================================================ ;;; BeginUpdate ;;; 1 byte of params, copied to $82 @@ -6549,7 +6549,7 @@ L750C: .res 38,0 L7585: exit_call $A3 -;;; ================================================== +;;; ============================================================ ;;; EndUpdate ;;; 1 byte of params, copied to $82 @@ -6562,7 +6562,7 @@ EndUpdateImpl: stax active_port jmp L6567 -;;; ================================================== +;;; ============================================================ ;;; GetWinPort ;;; 3 bytes of params, copied to $82 @@ -6635,7 +6635,7 @@ L75EA: lda $92,x sec rts -;;; ================================================== +;;; ============================================================ ;;; SetWinPort ;;; 2 bytes of params, copied to $82 @@ -6667,7 +6667,7 @@ loop: lda ($82),y rts .endproc -;;; ================================================== +;;; ============================================================ ;;; FrontWindow .proc FrontWindowImpl @@ -6681,7 +6681,7 @@ nope: lda #0 rts .endproc -;;; ================================================== +;;; ============================================================ ;;; TrackGoAway in_close_box: .byte 0 @@ -6719,7 +6719,7 @@ end: sta (params_addr),y rts .endproc -;;; ================================================== +;;; ============================================================ .byte $00 L769B: .byte $00 @@ -6734,7 +6734,7 @@ L76A4: .byte $00,$00,$00 drag_resize_flag: .byte 0 -;;; ================================================== +;;; ============================================================ ;;; 5 bytes of params, copied to $82 @@ -6742,7 +6742,7 @@ GrowWindowImpl: lda #$80 bmi L76AE -;;; ================================================== +;;; ============================================================ ;;; 5 bytes of params, copied to $82 @@ -6918,7 +6918,7 @@ L77F4: sta L769F,x lda set_input_unk L7814: rts -;;; ================================================== +;;; ============================================================ ;;; CloseWindow ;;; 1 byte of params, copied to $82 @@ -6939,7 +6939,7 @@ L7814: rts jmp L7872 .endproc -;;; ================================================== +;;; ============================================================ ;;; CloseAll CloseAllImpl: @@ -7027,7 +7027,7 @@ height: .word 0 set_port_size := set_port_params::width set_port_maprect := set_port_params::hoffset ; Re-used since h/voff are 0 -;;; ================================================== +;;; ============================================================ ;;; WindowToScreen ;; $83/$84 += $B7/$B8 @@ -7049,7 +7049,7 @@ loop: lda $83,x bmi L790F .endproc -;;; ================================================== +;;; ============================================================ ;;; ScreenToWindow ;;; 5 bytes of params, copied to $82 @@ -7114,7 +7114,7 @@ L7954: stax $98 sta $8F jmp L51B3 -;;; ================================================== +;;; ============================================================ ;;; ActivateCtl ;;; 2 bytes of params, copied to $8C @@ -7296,7 +7296,7 @@ L7AA4: pha sta $CC,x jmp L70B2 -;;; ================================================== +;;; ============================================================ ;;; FindControl ;;; 4 bytes of params, copied to current_penloc @@ -7387,7 +7387,7 @@ L7B64: jsr L708D L7B70: lda #$03 L7B72: jmp L7408 -;;; ================================================== +;;; ============================================================ ;;; SetCtlMax ;;; 3 bytes of params, copied to $82 @@ -7419,7 +7419,7 @@ L7BA2: lda $83 sta $AB,y rts -;;; ================================================== +;;; ============================================================ ;;; TrackThumb ;;; 5 bytes of params, copied to $82 @@ -7601,7 +7601,7 @@ L7D1D: sta L7CB6 sty L7CB7 rts -;;; ================================================== +;;; ============================================================ ;;; UpdateThumb ;;; 3 bytes of params, copied to $8C @@ -7640,7 +7640,7 @@ check_win: jmp L6553 .endproc -;;; ================================================== +;;; ============================================================ ;;; KeyboardMouse ;;; 1 byte of params, copied to $82 @@ -7650,7 +7650,7 @@ KeyboardMouse: sta L7D74 jmp FlushEventsImpl -;;; ================================================== +;;; ============================================================ ;;; $4E IMPL @@ -8482,7 +8482,7 @@ L840D: sec plp rts -;;; ================================================== +;;; ============================================================ ;;; ScaleMouse ;;; Sets up mouse clamping @@ -8558,7 +8558,7 @@ clamp_y_table: .word screen_height-1, screen_height/2-1, screen_height/4-1, s .endproc -;;; ================================================== +;;; ============================================================ ;;; Locate Mouse Slot diff --git a/desktop/ovl1.s b/desktop/ovl1.s index 46bbb3b..971af5c 100644 --- a/desktop/ovl1.s +++ b/desktop/ovl1.s @@ -7,9 +7,9 @@ .include "../desktop.inc" .include "../macros.inc" -;;; ================================================== +;;; ============================================================ ;;; Overlay for Disk Copy -;;; ================================================== +;;; ============================================================ .org $800 .proc disk_copy_overlay @@ -18,7 +18,7 @@ load_target := $1800 -;;; ================================================== +;;; ============================================================ ;;; Menu - relocated up ot $D400 menu_target := $D400 @@ -36,7 +36,7 @@ item_label: PASCAL_STRING "Rien" .endproc -;;; ================================================== +;;; ============================================================ DEFINE_OPEN_PARAMS open_params, str_desktop2, $1C00 DEFINE_SET_MARK_PARAMS set_mark_params, $131E0 @@ -46,7 +46,7 @@ item_label: str_desktop2: PASCAL_STRING "DeskTop2" -;;; ================================================== +;;; ============================================================ ptr := $6 @@ -88,7 +88,7 @@ start: lda #$80 lda ROMIN2 jmp load_target -;;; ================================================== +;;; ============================================================ .proc MLI_RELAY sty call @@ -111,7 +111,7 @@ self: bne self ; hang on error? rts .endproc -;;; ================================================== +;;; ============================================================ PAD_TO $A00 .endproc ; disk_copy_overlay \ No newline at end of file diff --git a/desktop/ovl1a.s b/desktop/ovl1a.s index 8f3b560..ad8b15d 100644 --- a/desktop/ovl1a.s +++ b/desktop/ovl1a.s @@ -7,9 +7,9 @@ .include "../desktop.inc" .include "../macros.inc" -;;; ================================================== +;;; ============================================================ ;;; Overlay for Disk Copy #2 -;;; ================================================== +;;; ============================================================ .org $1800 .proc disk_copy_overlay2 @@ -28,7 +28,7 @@ LAA1B := $AA1B LAA3A := $AA3A LAB37 := $AB37 -;;; ================================================== +;;; ============================================================ DEFINE_OPEN_PARAMS open_params, filename, $1C00 filename: PASCAL_STRING "DeskTop2" @@ -46,7 +46,7 @@ len1: .word $2200 buf2: .addr $800 len2: .word $B00 -;;; ================================================== +;;; ============================================================ start: lda #$41 ; ??? sta RAMWRTON @@ -82,7 +82,7 @@ L183F: sta BITMAP+1,x jmp MGTK_RELAY -;;; ================================================== +;;; ============================================================ ;;; Copy first chunk to the Language Card .proc copy_to_lc @@ -136,7 +136,7 @@ loop: lda (src),y rts .endproc -;;; ================================================== +;;; ============================================================ .proc MLI_RELAY sty call @@ -152,7 +152,7 @@ self: bne self ; hang if fails rts .endproc -;;; ================================================== +;;; ============================================================ tax bne L192C @@ -259,7 +259,7 @@ L19F8: jsr LA83D bcs L1A3B L19FD: lda $BE53 -;;; ================================================== +;;; ============================================================ PAD_TO $1A00 .endproc ; disk_copy_overlay2 \ No newline at end of file diff --git a/desktop/ovl2.s b/desktop/ovl2.s index e203017..86bcb8c 100644 --- a/desktop/ovl2.s +++ b/desktop/ovl2.s @@ -8,9 +8,9 @@ .include "../macros.inc" .include "inc/desktoplc.inc" -;;; ================================================== +;;; ============================================================ ;;; Overlay for Format/Erase -;;; ================================================== +;;; ============================================================ .org $800 .proc format_erase_overlay @@ -1064,7 +1064,7 @@ L1237: .byte $00 L1238: .byte $00 L1239: .byte $00 -;;; ================================================== +;;; ============================================================ DEFINE_ON_LINE_PARAMS on_line_params,, $1C00 DEFINE_READ_BLOCK_PARAMS read_block_params, $1C00, 0 @@ -1072,7 +1072,7 @@ L1239: .byte $00 L124A: .byte $00 -;;; ================================================== +;;; ============================================================ .proc MLI_RELAY sty call @@ -1093,7 +1093,7 @@ params: .addr 0 rts .endproc -;;; ================================================== +;;; ============================================================ L126F: sta L12C0 and #$0F @@ -1173,7 +1173,7 @@ L12E6 := * + 1 L1303: return #$00 -;;; ================================================== +;;; ============================================================ L1306: .byte 0 L1307: sta L124A @@ -1367,14 +1367,14 @@ L14AC: sta $1B00,y sta $1B00 L14B5: rts -;;; ================================================== +;;; ============================================================ fail: pla pla fail2: sec rts -;;; ================================================== +;;; ============================================================ .proc write_block_and_zero yax_call MLI_RELAY, WRITE_BLOCK, write_block_params @@ -1395,7 +1395,7 @@ zero_buffers: rts .endproc -;;; ================================================== +;;; ============================================================ L14DC: .byte $C3,$27,$0D,$00,$00,$06,$00 L14E3: .byte $18 @@ -1405,16 +1405,16 @@ L14E5: .byte $00,$00,$00,$00,$00,$00,$00,$00 .byte $00,$00,$00,$00,$00,$00,$00,$00 .byte $00,$00,$00 -;;; ================================================== +;;; ============================================================ ;;; ProDOS Loader -;;; ================================================== +;;; ============================================================ .proc prodos_loader_blocks .incbin "inc/pdload.dat" .endproc .assert .sizeof(prodos_loader_blocks) = $400, error, "Bad data" -;;; ================================================== +;;; ============================================================ L1900: stx $06+1 @@ -1542,7 +1542,7 @@ L1A22: sta $D909,x addr_call adjust_case, $D909 rts -;;; ================================================== +;;; ============================================================ L1A2D: sta on_line_params::unit_num yax_call MLI_RELAY, ON_LINE, on_line_params @@ -1571,7 +1571,7 @@ L1A6D: lda on_line_params::unit_num jsr L192E rts -;;; ================================================== +;;; ============================================================ PAD_TO $1C00 .endproc ; format_erase_overlay diff --git a/desktop/ovl3.s b/desktop/ovl3.s index a35d48e..479765d 100644 --- a/desktop/ovl3.s +++ b/desktop/ovl3.s @@ -2,9 +2,9 @@ ;;; NB: Compiled as part of ovl34567.s -;;; ================================================== +;;; ============================================================ ;;; Overlay for Selector (part of it, anyway) -;;; ================================================== +;;; ============================================================ .org $9000 .proc selector_overlay2 @@ -1439,7 +1439,7 @@ L9DA7: ldx #$00 L9DC8: .byte 0 -;;; ================================================== +;;; ============================================================ .proc MLI_RELAY sty call @@ -1460,7 +1460,7 @@ params: .addr 0 rts .endproc -;;; ================================================== +;;; ============================================================ L9DED: sta ALTZPOFF lda $C083 @@ -1549,7 +1549,7 @@ L9EC0: .byte 0 L9EC1: .byte 0 ;; how much is buffer, how much is padding? -;;; ================================================== +;;; ============================================================ PAD_TO $A000 .endproc ; selector_overlay2 diff --git a/desktop/ovl34567.s b/desktop/ovl34567.s index 0fd688b..35af03b 100644 --- a/desktop/ovl34567.s +++ b/desktop/ovl34567.s @@ -16,7 +16,7 @@ dummy1234 := $1234 -;;; ================================================== +;;; ============================================================ ;;; Interdependent Overlays .include "ovl3.s" ; Selector (1/2) @ $9000-$9FFF diff --git a/desktop/ovl4.s b/desktop/ovl4.s index 8cf0a0a..159c21a 100644 --- a/desktop/ovl4.s +++ b/desktop/ovl4.s @@ -2,9 +2,9 @@ ;;; NB: Compiled as part of ovl34567.s -;;; ================================================== +;;; ============================================================ ;;; Overlay for Common Routines (Selector, File Copy/Delete) -;;; ================================================== +;;; ============================================================ .org $5000 .proc common_overlay @@ -24,7 +24,7 @@ path_buf: .res 128, 0 L50A8: .byte $00 L50A9: .byte $00 -;;; ================================================== +;;; ============================================================ stash_stack: .byte 0 routine_table: .addr $7000, $7000, $7000 @@ -65,13 +65,13 @@ stash_x: .byte 0 stash_y: .byte 0 .endproc -;;; ================================================== +;;; ============================================================ L5103: .byte 0 L5104: .byte 0 L5105: .byte 0 -;;; ================================================== +;;; ============================================================ L5106: bit $D8EC bpl :+ @@ -482,7 +482,7 @@ L5576: MGTK_RELAY_CALL MGTK::GetEvent, event_params pla L55B9: rts -;;; ================================================== +;;; ============================================================ L55BA: bit L5606 bpl L55DF @@ -1165,7 +1165,7 @@ L5CF4: .byte 0 L5CF5: .byte 0 L5CF6: .byte 0 -;;; ================================================== +;;; ============================================================ L5CF7: MGTK_RELAY_CALL MGTK::OpenWindow, $D5B7 MGTK_RELAY_CALL MGTK::OpenWindow, $D5F1 @@ -1220,7 +1220,7 @@ L5DE0: lda ($06),y ldax #$D380 rts -;;; ================================================== +;;; ============================================================ L5DED: jsr L5DD7 stax $06 @@ -1231,7 +1231,7 @@ L5DED: jsr L5DD7 MGTK_RELAY_CALL MGTK::DrawText, $06 rts -;;; ================================================== +;;; ============================================================ L5E0A: jsr L5DD7 stax $06 @@ -1258,7 +1258,7 @@ L5E0A: jsr L5DD7 L5E56: .byte 0 -;;; ================================================== +;;; ============================================================ L5E57: jsr L5DD7 stax $06 @@ -1268,7 +1268,7 @@ L5E57: jsr L5DD7 jsr L5DED rts -;;; ================================================== +;;; ============================================================ L5E6F: jsr L5DD7 stax $06 @@ -1278,7 +1278,7 @@ L5E6F: jsr L5DD7 jsr L5DED rts -;;; ================================================== +;;; ============================================================ L5E87: ldx L5027 lda DEVLST,x @@ -1359,7 +1359,7 @@ L5F31: lda ($06),y sta $D920 return #$00 -;;; ================================================== +;;; ============================================================ L5F49: ldx path_buf cpx #$00 @@ -1370,7 +1370,7 @@ L5F49: ldx path_buf bne L5F49 L5F5A: rts -;;; ================================================== +;;; ============================================================ L5F5B: jsr L5ECB lda #$00 @@ -1485,7 +1485,7 @@ L606A: .byte 0 L606B: .byte 0 L606C: .byte 0 -;;; ================================================== +;;; ============================================================ L606D: lda $D5F1 jsr L62C8 @@ -1548,7 +1548,7 @@ L6110: inc L6128 L6127: .byte 0 L6128: .byte 0 -;;; ================================================== +;;; ============================================================ L6129: stx $0B sta $0A @@ -1585,7 +1585,7 @@ L614B: iny L615D: dey jmp L6135 -;;; ================================================== +;;; ============================================================ L6161: lda #$00 L6163: sta L61B0 @@ -1616,7 +1616,7 @@ L6181: lda $177F L61B0: .byte 0 -;;; ================================================== +;;; ============================================================ L61B1: lda $D5B7 jsr L62C8 @@ -1654,7 +1654,7 @@ L61E6: inx L6226: .byte 0 -;;; ================================================== +;;; ============================================================ L6227: sta L6273 clc @@ -1720,7 +1720,7 @@ L6274: ldx #$00 L62C7: .byte 0 -;;; ================================================== +;;; ============================================================ L62C8: sta $D212 MGTK_RELAY_CALL MGTK::GetWinPort, $D212 @@ -1858,7 +1858,7 @@ L6451: ldx #$00 L647B: .byte 0 -;;; ================================================== +;;; ============================================================ L647C: stax $06 ldy #$01 @@ -1938,7 +1938,7 @@ L64F5: lda L6515 L6515: .byte 0 -;;; ================================================== +;;; ============================================================ L6516: stax $06 ldy #$00 @@ -1988,7 +1988,7 @@ L656D: dex L6575: .byte 0 L6576: .res 16, 0 -;;; ================================================== +;;; ============================================================ L6586: bpl L658B L6588: return #$00 @@ -2057,7 +2057,7 @@ L6684: addr_call L5DED, $D484 addr_call L5DED, $D8F8 rts -;;; ================================================== +;;; ============================================================ L6693: lda $D5B7 jsr L62C8 @@ -2875,7 +2875,7 @@ L6F38: jsr L5F49 L6F3C: .byte 0 L6F3D: .byte 0 -;;; ================================================== +;;; ============================================================ PAD_TO $7000 .endproc ; common_overlay diff --git a/desktop/ovl5.s b/desktop/ovl5.s index 33f09c2..7762ab3 100644 --- a/desktop/ovl5.s +++ b/desktop/ovl5.s @@ -2,9 +2,9 @@ ;;; NB: Compiled as part of ovl34567.s -;;; ================================================== +;;; ============================================================ ;;; Overlay for File Copy -;;; ================================================== +;;; ============================================================ .org $7000 .proc file_copy_overlay @@ -89,7 +89,7 @@ L70C6: .byte $29 ; length of following data block entry 0, $6CF0 entry 0, $684F -;;; ================================================== +;;; ============================================================ L70F1: lda #1 sta path_buf2 @@ -158,7 +158,7 @@ L7178: jsr common_overlay::L6D27 .byte 0 -;;; ================================================== +;;; ============================================================ L7189: addr_call common_overlay::L647C, path_buf0 beq L7198 @@ -183,7 +183,7 @@ L7198: addr_call common_overlay::L647C, path_buf1 .byte 0 -;;; ================================================== +;;; ============================================================ L71D8: MGTK_RELAY_CALL MGTK::CloseWindow, winfo15 MGTK_RELAY_CALL MGTK::CloseWindow, winfo12 @@ -194,7 +194,7 @@ L71D8: MGTK_RELAY_CALL MGTK::CloseWindow, winfo15 txs return #$FF -;;; ================================================== +;;; ============================================================ L71F9: lda #1 sta path_buf2 @@ -261,7 +261,7 @@ L7289: sta $D920 jsr common_overlay::L606D L7295: rts -;;; ================================================== +;;; ============================================================ PAD_TO $7800 .endproc ; file_copy_overlay diff --git a/desktop/ovl6.s b/desktop/ovl6.s index 7140ab2..7d550c4 100644 --- a/desktop/ovl6.s +++ b/desktop/ovl6.s @@ -2,9 +2,9 @@ ;;; NB: Compiled as part of ovl34567.s -;;; ================================================== +;;; ============================================================ ;;; Overlay for File Delete -;;; ================================================== +;;; ============================================================ .org $7000 .proc file_delete_overlay @@ -96,7 +96,7 @@ L70EA: MGTK_RELAY_CALL MGTK::CloseWindow, winfo15 txs return #$FF -;;; ================================================== +;;; ============================================================ PAD_TO $7800 .endproc ; file_delete_overlay \ No newline at end of file diff --git a/desktop/ovl7.s b/desktop/ovl7.s index e96b909..848d7d1 100644 --- a/desktop/ovl7.s +++ b/desktop/ovl7.s @@ -2,9 +2,9 @@ ;;; NB: Compiled as part of ovl34567.s -;;; ================================================== +;;; ============================================================ ;;; Overlay for Selector (part of it, anyway) -;;; ================================================== +;;; ============================================================ .org $7000 .proc selector_overlay @@ -63,11 +63,11 @@ L707B: copy16 #$2001, $D484 sta $D8EC jmp common_overlay::L5106 -;;; ================================================== +;;; ============================================================ L709D: .res 16, 0 -;;; ================================================== +;;; ============================================================ L70AD: ldx L7207 @@ -140,7 +140,7 @@ L711D: addr_call common_overlay::L5E6F, $D849 MGTK_RELAY_CALL MGTK::SetPort, grafport3 rts -;;; ================================================== +;;; ============================================================ .byte $00 @@ -176,7 +176,7 @@ L7232: .byte $29 entry 0, $6CF0 entry 0, $684F -;;; ================================================== +;;; ============================================================ copy16 #$2001, $D484 jsr common_overlay::L6D27 @@ -442,7 +442,7 @@ L7521: cmp #'5' L7528: rts -;;; ================================================== +;;; ============================================================ PAD_TO $7800 .endproc ; selector_overlay diff --git a/macros.inc b/macros.inc index 70d67dd..723d130 100644 --- a/macros.inc +++ b/macros.inc @@ -1,19 +1,19 @@ -;;; ================================================== +;;; ============================================================ ;;; Generic Macros -;;; ================================================== +;;; ============================================================ .define is_immediate(arg) (.match (.mid (0, 1, {arg}), #)) .define is_register(arg) (.match ({arg}, x) .or .match ({arg}, y)) .define immediate_value(arg) (.right (.tcount ({arg})-1, {arg})) -;;; ================================================== +;;; ============================================================ ;;; Pad with zeros to the given address .macro PAD_TO addr .res addr - *, 0 .endmacro -;;; ================================================== +;;; ============================================================ ;;; Common patterns .macro return arg @@ -21,7 +21,7 @@ rts .endmacro -;;; ================================================== +;;; ============================================================ ;;; Calls with one parameter (address in A,X) .macro addr_call target, addr @@ -42,7 +42,7 @@ jmp target .endmacro -;;; ================================================== +;;; ============================================================ ;;; Calls with two paramters (call # in y, address in A,X) ;;; (various output orders to match original binary) @@ -75,7 +75,7 @@ .endmacro -;;; ================================================== +;;; ============================================================ ;;; 16-bit pseudo-ops ;;; Load A,X diff --git a/mgtk.inc b/mgtk.inc index 5f3f0b9..d99451b 100644 --- a/mgtk.inc +++ b/mgtk.inc @@ -1,6 +1,6 @@ -;;; ================================================== +;;; ============================================================ ;;; MouseGraphics ToolKit (w/ Graphics Primitives) -;;; ================================================== +;;; ============================================================ .scope MGTK @@ -8,9 +8,9 @@ MLI := $4000 ;; MLI-style call (jsr MLI ; .byte call ; .addr params) ;; Call from AUX (RAMRDON/RAMWRTON) -;;; ================================================== +;;; ============================================================ ;;; Graphics Primitives -;;; ================================================== +;;; ============================================================ ;;; Point record: ;;; @@ -175,9 +175,9 @@ Version := $1C ; Get toolkit version ;;; .byte (out) status ;;; .word (out) number -;;; ================================================== +;;; ============================================================ ;;; MouseGraphics ToolKit Calls -;;; ================================================== +;;; ============================================================ ;;; -------------------------------------------------- ;;; Initialization Calls @@ -466,7 +466,7 @@ ActivateCtl := $4C ; Activate/deactivate scroll bar ;;; $4E ??? ;;; (input length: 2 bytes) -;;; ================================================== +;;; ============================================================ ;;; Graphics Primitives Constants ;;; Used in GetWinPort / SetPortBits @@ -493,7 +493,7 @@ colormask_or := $00 textbg_black := $00 textbg_white := $7F -;;; ================================================== +;;; ============================================================ ;;; MouseGraphics ToolKit Constants ;;; Used in GetEvent @@ -570,7 +570,7 @@ inrect_outside := $00 inpoly_inside := $80 inpoly_outside := $00 -;;; ================================================== +;;; ============================================================ ;;; Offsets grafport_offset_viewloc := 0 @@ -609,7 +609,7 @@ winfo_size := 58 .endscope ; MGTK -;;; ================================================== +;;; ============================================================ ;;; Macros ;;; Call an MGTK entry point: