mirror of
https://github.com/mi57730/a2d.git
synced 2024-11-29 07:49:20 +00:00
Build: DeskTop and overlays as one target
This commit is contained in:
parent
45e649b57c
commit
7c1ead2a8e
@ -7,8 +7,7 @@ OUTDIR = out
|
||||
|
||||
HEADERS = $(wildcard ../*.inc) $(wildcard ../inc/*.inc) $(wildcard *.inc)
|
||||
|
||||
SEGMENTS = loader mgtk desktop invoker \
|
||||
ovl1 ovl1a ovl1b ovl1c ovl2 ovl34567
|
||||
SEGMENTS = loader mgtk desktop
|
||||
|
||||
TARGETS = $(OUTDIR)/DESKTOP2.built
|
||||
|
||||
@ -25,17 +24,10 @@ clean:
|
||||
rm -f $(OUTDIR)/*.built
|
||||
rm -f $(OUTDIR)/*.sys
|
||||
|
||||
$(OUTDIR)/desktop_res.inc: desktop_res.s desktop_res_builder.s res/build_res_inc.pl
|
||||
$(CC65)/ca65 $(CAFLAGS) --listing $(OUTDIR)/desktop_res.list -o $@ desktop_res_builder.s
|
||||
cat $(OUTDIR)/desktop_res.list | res/build_res_inc.pl > $@
|
||||
|
||||
$(OUTDIR)/desktop.o: desktop.s $(HEADERS) desktop_aux.s desktop_lc.s desktop_main.s desktop_res.s
|
||||
$(OUTDIR)/desktop.o: desktop.s $(HEADERS) desktop_* ovl*.s
|
||||
$(CC65)/ca65 $(CAFLAGS) --listing $(basename $@).list -o $@ $<
|
||||
|
||||
$(OUTDIR)/ovl34567.o: ovl34567.s $(HEADERS) $(OUTDIR)/desktop_res.inc ovl3.s ovl4.s ovl5.s ovl6.s ovl7.s
|
||||
$(CC65)/ca65 $(CAFLAGS) --listing $(basename $@).list -o $@ $<
|
||||
|
||||
$(OUTDIR)/%.o: %.s $(HEADERS) $(OUTDIR)/desktop_res.inc
|
||||
$(OUTDIR)/%.o: %.s $(HEADERS)
|
||||
$(CC65)/ca65 $(CAFLAGS) --listing $(basename $@).list -o $@ $<
|
||||
|
||||
# Built DeskTop segments
|
||||
|
@ -20,3 +20,27 @@
|
||||
.include "desktop_aux.s"
|
||||
.include "desktop_lc.s"
|
||||
.include "desktop_main.s"
|
||||
|
||||
.include "invoker.s"
|
||||
|
||||
.include "ovl1.s"
|
||||
.include "ovl1a.s"
|
||||
.include "ovl1b.s"
|
||||
.include "ovl1c.s"
|
||||
.include "ovl2.s"
|
||||
|
||||
.macro jump_table_entry addr
|
||||
.byte 0
|
||||
.addr addr
|
||||
.endmacro
|
||||
|
||||
;;; ============================================================
|
||||
;;; Interdependent Overlays
|
||||
|
||||
.include "ovl3.s" ; Selector (1/2) @ $9000-$9FFF
|
||||
.include "ovl4.s" ; Common @ $5000-$6FFF
|
||||
.include "ovl5.s" ; File Copy @ $7000-$77FF
|
||||
.include "ovl6.s" ; File Delete @ $7000-$77FF
|
||||
.include "ovl7.s" ; Selector (2/2) @ $7000-$77FF
|
||||
|
||||
common_overlay_L5000 := common_overlay::L5000
|
||||
|
@ -1,9 +0,0 @@
|
||||
.setcpu "6502"
|
||||
|
||||
.include "../mgtk.inc"
|
||||
.include "../desktop.inc"
|
||||
.include "../macros.inc"
|
||||
.include "../inc/prodos.inc"
|
||||
|
||||
.org $D200
|
||||
.include "desktop_res.s"
|
@ -1,9 +1,3 @@
|
||||
.setcpu "6502"
|
||||
|
||||
.include "apple2.inc"
|
||||
.include "../inc/apple2.inc"
|
||||
.include "../inc/prodos.inc"
|
||||
.include "../macros.inc"
|
||||
|
||||
;;; ============================================================
|
||||
;;; Segment loaded into MAIN $290-$3EF
|
||||
|
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@ -1,18 +1,9 @@
|
||||
.setcpu "6502"
|
||||
|
||||
.include "apple2.inc"
|
||||
.include "../inc/apple2.inc"
|
||||
.include "../inc/prodos.inc"
|
||||
.include "../mgtk.inc"
|
||||
.include "../desktop.inc"
|
||||
.include "../macros.inc"
|
||||
|
||||
;;; ============================================================
|
||||
;;; Overlay for Disk Copy
|
||||
;;; Overlay for Disk Copy - $0800 - $09FF (file 1/4)
|
||||
;;; ============================================================
|
||||
|
||||
.org $800
|
||||
.proc disk_copy_overlay
|
||||
.org $800
|
||||
|
||||
jmp start
|
||||
|
||||
|
@ -1,18 +1,9 @@
|
||||
.setcpu "6502"
|
||||
|
||||
.include "apple2.inc"
|
||||
.include "../inc/apple2.inc"
|
||||
.include "../inc/prodos.inc"
|
||||
.include "../mgtk.inc"
|
||||
.include "../desktop.inc"
|
||||
.include "../macros.inc"
|
||||
|
||||
;;; ============================================================
|
||||
;;; Overlay for Disk Copy #2
|
||||
;;; Overlay for Disk Copy - $1800 - $19FF (file 2/4)
|
||||
;;; ============================================================
|
||||
|
||||
.org $1800
|
||||
.proc disk_copy_overlay2
|
||||
.org $1800
|
||||
|
||||
jmp start
|
||||
|
||||
|
@ -1,11 +1,9 @@
|
||||
.setcpu "6502"
|
||||
;;; ============================================================
|
||||
;;; Overlay for Disk Copy - $D000 - $F1FF (file 3/4)
|
||||
;;; ============================================================
|
||||
|
||||
.include "apple2.inc"
|
||||
.include "../macros.inc"
|
||||
.include "../mgtk.inc"
|
||||
.include "../desktop.inc"
|
||||
.include "../inc/apple2.inc"
|
||||
.include "../inc/prodos.inc"
|
||||
.proc disk_copy_overlay3
|
||||
.org $D000
|
||||
|
||||
L0000 := $0000
|
||||
L0080 := $0080
|
||||
@ -33,8 +31,6 @@ L51ED := $51ED
|
||||
.endif
|
||||
.endmacro
|
||||
|
||||
.org $D000
|
||||
|
||||
jmp LD5E1
|
||||
|
||||
;;; ============================================================
|
||||
@ -3304,3 +3300,5 @@ LF1F5: pla
|
||||
lda $C000
|
||||
.byte $2C
|
||||
.byte $10
|
||||
|
||||
.endproc
|
@ -1,9 +1,9 @@
|
||||
.setcpu "6502"
|
||||
;;; ============================================================
|
||||
;;; Overlay for Disk Copy - $0800 - $12FF (file 4/4)
|
||||
;;; ============================================================
|
||||
|
||||
.include "apple2.inc"
|
||||
.include "../macros.inc"
|
||||
.include "../inc/apple2.inc"
|
||||
.include "../inc/prodos.inc"
|
||||
.proc disk_copy_overlay4
|
||||
.org $800
|
||||
|
||||
L0006 := $0006
|
||||
LDAEE := $DAEE
|
||||
@ -18,8 +18,6 @@ LE6FD := $E6FD
|
||||
LE766 := $E766
|
||||
LE7A8 := $E7A8
|
||||
|
||||
.org $800
|
||||
|
||||
|
||||
.macro exit_with_result arg
|
||||
lda #arg
|
||||
@ -1490,3 +1488,5 @@ L12DA: lda $D133
|
||||
sta $D12D
|
||||
jsr LE137
|
||||
yax_call LDBE0, $46, $D12D
|
||||
|
||||
.endproc
|
@ -1,38 +1,9 @@
|
||||
.setcpu "6502"
|
||||
|
||||
.include "apple2.inc"
|
||||
.include "../inc/apple2.inc"
|
||||
.include "../inc/prodos.inc"
|
||||
.include "../mgtk.inc"
|
||||
.include "../desktop.inc"
|
||||
.include "../macros.inc"
|
||||
.include "out/desktop_res.inc"
|
||||
|
||||
;;; ============================================================
|
||||
;;; Overlay for Format/Erase
|
||||
;;; ============================================================
|
||||
|
||||
.org $800
|
||||
.proc format_erase_overlay
|
||||
|
||||
;;; Entry points in desktop_main
|
||||
.scope desktop_main
|
||||
prompt_input_loop := $A567
|
||||
jump_relay := $A899
|
||||
bell := $AACE
|
||||
set_cursor_watch := $B3E7
|
||||
set_cursor_pointer := $B403
|
||||
detect_double_click2 := $B445
|
||||
LB509 := $B509 ; ???
|
||||
draw_dialog_label := $B590
|
||||
draw_text1 := $B708
|
||||
draw_dialog_title := $B723
|
||||
adjust_case := $B781
|
||||
set_port_from_window_id := $B7B9
|
||||
clear_path_buf2 := $BD69 ; ???
|
||||
clear_path_buf1 := $BD75 ; ???
|
||||
reset_state := $BEB1
|
||||
.endscope
|
||||
.org $800
|
||||
|
||||
L0800: pha
|
||||
jsr desktop_main::set_cursor_pointer
|
||||
@ -174,7 +145,7 @@ L09B8: jsr desktop_main::prompt_input_loop
|
||||
|
||||
L09C2: pha
|
||||
jsr desktop_main::set_cursor_pointer
|
||||
jsr desktop_main::reset_state
|
||||
jsr desktop_main::reset_grafport3a
|
||||
MGTK_RELAY_CALL MGTK::CloseWindow, winfo_alert_dialog
|
||||
ldx L09D8
|
||||
pla
|
||||
@ -282,7 +253,7 @@ L0B2A: jsr desktop_main::prompt_input_loop
|
||||
beq L0AD1
|
||||
L0B31: pha
|
||||
jsr desktop_main::set_cursor_pointer
|
||||
jsr desktop_main::reset_state
|
||||
jsr desktop_main::reset_grafport3a
|
||||
MGTK_RELAY_CALL MGTK::CloseWindow, winfo_alert_dialog
|
||||
ldx L0B47
|
||||
pla
|
||||
|
@ -1,21 +1,9 @@
|
||||
.setcpu "6502"
|
||||
|
||||
;;; NB: Compiled as part of ovl34567.s
|
||||
|
||||
;;; ============================================================
|
||||
;;; Overlay for Selector (part of it, anyway)
|
||||
;;; ============================================================
|
||||
|
||||
.org $9000
|
||||
.proc selector_overlay2
|
||||
|
||||
;;; Entry points in desktop_main
|
||||
launch_dialog := $A500
|
||||
set_cursor_watch := $B3E7
|
||||
set_cursor_pointer := $B403
|
||||
detect_double_click2 := $B445
|
||||
draw_text1 := $B708
|
||||
set_port_from_window_id := $B7B9
|
||||
.org $9000
|
||||
|
||||
sta L938E
|
||||
ldx #$FF
|
||||
@ -165,14 +153,14 @@ L913F: cmp #$04
|
||||
|
||||
L9146: lda L938D
|
||||
jsr L979D
|
||||
jsr set_cursor_watch
|
||||
jsr desktop_main::set_cursor_watch
|
||||
lda L938D
|
||||
jsr L9A97
|
||||
beq L915D
|
||||
jsr set_cursor_pointer
|
||||
jsr desktop_main::set_cursor_pointer
|
||||
jmp L933F
|
||||
|
||||
L915D: jsr set_cursor_pointer
|
||||
L915D: jsr desktop_main::set_cursor_pointer
|
||||
lda #$FF
|
||||
sta L938D
|
||||
jsr L99F5
|
||||
@ -304,13 +292,13 @@ L926D: ldy L9104
|
||||
beq L927B
|
||||
jmp L936E
|
||||
|
||||
L927B: jsr set_cursor_pointer
|
||||
L927B: jsr desktop_main::set_cursor_pointer
|
||||
jmp L900F
|
||||
|
||||
L9281: .byte 0
|
||||
L9282: lda L938D
|
||||
jsr L979D
|
||||
jsr set_cursor_watch
|
||||
jsr desktop_main::set_cursor_watch
|
||||
lda L938D
|
||||
jsr L9BD5
|
||||
stax $06
|
||||
@ -384,7 +372,7 @@ L931B: iny
|
||||
lda L938A
|
||||
sta buf_win_path
|
||||
jsr JUMP_TABLE_LAUNCH_FILE
|
||||
jsr set_cursor_pointer
|
||||
jsr desktop_main::set_cursor_pointer
|
||||
lda #$FF
|
||||
sta L938D
|
||||
jmp L936E
|
||||
@ -417,7 +405,7 @@ L938F: .byte 0
|
||||
|
||||
L9390: MGTK_RELAY_CALL MGTK::OpenWindow, winfo_entry_picker
|
||||
lda winfo_entry_picker
|
||||
jsr set_port_from_window_id
|
||||
jsr desktop_main::set_port_from_window_id
|
||||
MGTK_RELAY_CALL MGTK::SetPenMode, penXOR
|
||||
MGTK_RELAY_CALL MGTK::FrameRect, rect_D6D8
|
||||
MGTK_RELAY_CALL MGTK::FrameRect, rect_D6E0
|
||||
@ -507,11 +495,11 @@ L94A7: .byte 0
|
||||
L94A8: .byte 0
|
||||
|
||||
L94A9: MGTK_RELAY_CALL MGTK::MoveTo, pos_D708
|
||||
addr_call draw_text1, $AE40
|
||||
addr_call desktop_main::draw_text1, $AE40
|
||||
rts
|
||||
|
||||
L94BA: MGTK_RELAY_CALL MGTK::MoveTo, pos_D70C
|
||||
addr_call draw_text1, $AE96
|
||||
addr_call desktop_main::draw_text1, $AE96
|
||||
rts
|
||||
|
||||
L94CB: stax $06
|
||||
@ -650,7 +638,7 @@ L9678: lda findwindow_window_id
|
||||
return #$FF
|
||||
|
||||
L9683: lda winfo_entry_picker
|
||||
jsr set_port_from_window_id
|
||||
jsr desktop_main::set_port_from_window_id
|
||||
lda winfo_entry_picker
|
||||
sta screentowindow_window_id
|
||||
MGTK_RELAY_CALL MGTK::ScreenToWindow, screentowindow_params
|
||||
@ -717,7 +705,7 @@ L976A: cmp L938D
|
||||
lda L979C
|
||||
sta L938D
|
||||
jsr L979D
|
||||
L977E: jsr detect_double_click2
|
||||
L977E: jsr desktop_main::detect_double_click2
|
||||
rts
|
||||
|
||||
L9782: sec
|
||||
@ -1257,7 +1245,7 @@ L9BFC: jsr L9DA7
|
||||
rts
|
||||
|
||||
L9C09: sta warning_dialog_num
|
||||
yax_call launch_dialog, $0C, warning_dialog_num
|
||||
yax_call desktop_main::launch_dialog, $0C, warning_dialog_num
|
||||
rts
|
||||
|
||||
DEFINE_OPEN_PARAMS open_params, $1C00, $800
|
||||
|
@ -1,28 +0,0 @@
|
||||
|
||||
.setcpu "6502"
|
||||
|
||||
.include "apple2.inc"
|
||||
.include "../inc/apple2.inc"
|
||||
.include "../inc/prodos.inc"
|
||||
.include "../mgtk.inc"
|
||||
.include "../desktop.inc"
|
||||
.include "../macros.inc"
|
||||
.include "out/desktop_res.inc"
|
||||
|
||||
.macro jump_table_entry addr
|
||||
.byte 0
|
||||
.addr addr
|
||||
.endmacro
|
||||
|
||||
dummy1234 := $1234
|
||||
|
||||
;;; ============================================================
|
||||
;;; Interdependent Overlays
|
||||
|
||||
.include "ovl3.s" ; Selector (1/2) @ $9000-$9FFF
|
||||
.include "ovl4.s" ; Common @ $5000-$6FFF
|
||||
.include "ovl5.s" ; File Copy @ $7000-$77FF
|
||||
.include "ovl6.s" ; File Delete @ $7000-$77FF
|
||||
.include "ovl7.s" ; Selector (2/2) @ $7000-$77FF
|
||||
|
||||
common_overlay_L5000 := common_overlay::L5000
|
@ -1,13 +1,9 @@
|
||||
.setcpu "6502"
|
||||
|
||||
;;; NB: Compiled as part of ovl34567.s
|
||||
|
||||
;;; ============================================================
|
||||
;;; Overlay for Common Routines (Selector, File Copy/Delete)
|
||||
;;; ============================================================
|
||||
|
||||
.org $5000
|
||||
.proc common_overlay
|
||||
.org $5000
|
||||
|
||||
;;; ============================================================
|
||||
|
||||
@ -259,7 +255,7 @@ L531F: bit L5105
|
||||
beq L5341
|
||||
cmp #MGTK::Ctl::vertical_scroll_bar
|
||||
bne L5340
|
||||
lda winfo_entrydlg_file_picker_vscroll
|
||||
lda winfo_entrydlg_file_picker::vscroll
|
||||
and #$01
|
||||
beq L5340
|
||||
jmp L5469
|
||||
@ -269,7 +265,7 @@ L5340: rts
|
||||
L5341: lda winfo_entrydlg_file_picker
|
||||
sta screentowindow_window_id
|
||||
MGTK_RELAY_CALL MGTK::ScreenToWindow, screentowindow_params
|
||||
add16 screentowindow_windowy, winfo_entrydlg_file_picker_cliprect+2, screentowindow_windowy
|
||||
add16 screentowindow_windowy, winfo_entrydlg_file_picker::cliprect+2, screentowindow_windowy
|
||||
lsr16 screentowindow_windowy
|
||||
lsr16 screentowindow_windowy
|
||||
lsr16 screentowindow_windowy
|
||||
@ -391,7 +387,7 @@ L5488: lda #MGTK::Ctl::vertical_scroll_bar
|
||||
jsr L606D
|
||||
rts
|
||||
|
||||
L54BA: lda winfo_entrydlg_file_picker_vthumbpos
|
||||
L54BA: lda winfo_entrydlg_file_picker::vthumbpos
|
||||
sec
|
||||
sbc #$09
|
||||
bpl L54C4
|
||||
@ -405,7 +401,7 @@ L54C4: sta updatethumb_thumbpos
|
||||
jsr L606D
|
||||
rts
|
||||
|
||||
L54DF: lda winfo_entrydlg_file_picker_vthumbpos
|
||||
L54DF: lda winfo_entrydlg_file_picker::vthumbpos
|
||||
clc
|
||||
adc #$09
|
||||
cmp $177F
|
||||
@ -421,7 +417,7 @@ L54EF: sta updatethumb_thumbpos
|
||||
jsr L606D
|
||||
rts
|
||||
|
||||
L550A: lda winfo_entrydlg_file_picker_vthumbpos
|
||||
L550A: lda winfo_entrydlg_file_picker::vthumbpos
|
||||
bne L5510
|
||||
rts
|
||||
|
||||
@ -437,8 +433,8 @@ L5510: sec
|
||||
jsr L555F
|
||||
jmp L550A
|
||||
|
||||
L5533: lda winfo_entrydlg_file_picker_vthumbpos
|
||||
cmp winfo_entrydlg_file_picker_vthumbmax
|
||||
L5533: lda winfo_entrydlg_file_picker::vthumbpos
|
||||
cmp winfo_entrydlg_file_picker::vthumbmax
|
||||
bne L553C
|
||||
rts
|
||||
|
||||
@ -1604,7 +1600,7 @@ L606C: .byte 0
|
||||
|
||||
L606D: lda winfo_entrydlg_file_picker
|
||||
jsr set_port_for_window
|
||||
MGTK_RELAY_CALL MGTK::PaintRect, winfo_entrydlg_file_picker_cliprect
|
||||
MGTK_RELAY_CALL MGTK::PaintRect, winfo_entrydlg_file_picker::cliprect
|
||||
lda #$10
|
||||
sta picker_entry_pos
|
||||
lda #$08
|
||||
@ -1720,7 +1716,7 @@ L6163: sta L61B0
|
||||
rts
|
||||
|
||||
L6181: lda $177F
|
||||
sta winfo_entrydlg_file_picker_vthumbmax
|
||||
sta winfo_entrydlg_file_picker::vthumbmax
|
||||
.assert MGTK::Ctl::vertical_scroll_bar = MGTK::activatectl_activate, error, "need to match"
|
||||
lda #MGTK::Ctl::vertical_scroll_bar
|
||||
sta activatectl_which_ctl
|
||||
@ -1801,15 +1797,15 @@ L624A: ldx #$00
|
||||
rol L6273
|
||||
asl a
|
||||
rol L6273
|
||||
sta winfo_entrydlg_file_picker_cliprect+2
|
||||
sta winfo_entrydlg_file_picker::cliprect+2
|
||||
ldx L6273
|
||||
stx winfo_entrydlg_file_picker_cliprect+3
|
||||
stx winfo_entrydlg_file_picker::cliprect+3
|
||||
clc
|
||||
adc #70
|
||||
sta winfo_entrydlg_file_picker_cliprect+6
|
||||
sta winfo_entrydlg_file_picker::cliprect+6
|
||||
lda L6273
|
||||
adc #0
|
||||
sta winfo_entrydlg_file_picker_cliprect+7
|
||||
sta winfo_entrydlg_file_picker::cliprect+7
|
||||
rts
|
||||
|
||||
L6273: .byte 0
|
||||
@ -1845,7 +1841,7 @@ L62C7: .byte 0
|
||||
;;; ============================================================
|
||||
|
||||
.proc set_port_for_window
|
||||
sta getwinport_params2_window_id
|
||||
sta getwinport_params2::window_id
|
||||
MGTK_RELAY_CALL MGTK::GetWinPort, getwinport_params2
|
||||
MGTK_RELAY_CALL MGTK::SetPort, grafport2
|
||||
rts
|
||||
|
@ -1,13 +1,9 @@
|
||||
.setcpu "6502"
|
||||
|
||||
;;; NB: Compiled as part of ovl34567.s
|
||||
|
||||
;;; ============================================================
|
||||
;;; Overlay for File Copy
|
||||
;;; ============================================================
|
||||
|
||||
.org $7000
|
||||
.proc file_copy_overlay
|
||||
.org $7000
|
||||
|
||||
L7000: jsr common_overlay::create_common_dialog
|
||||
jsr L7052
|
||||
|
@ -1,13 +1,9 @@
|
||||
.setcpu "6502"
|
||||
|
||||
;;; NB: Compiled as part of ovl34567.s
|
||||
|
||||
;;; ============================================================
|
||||
;;; Overlay for File Delete
|
||||
;;; ============================================================
|
||||
|
||||
.org $7000
|
||||
.proc file_delete_overlay
|
||||
.org $7000
|
||||
|
||||
L7000: jsr common_overlay::create_common_dialog
|
||||
jsr L704D
|
||||
|
@ -1,13 +1,9 @@
|
||||
.setcpu "6502"
|
||||
|
||||
;;; NB: Compiled as part of ovl34567.s
|
||||
|
||||
;;; ============================================================
|
||||
;;; Overlay for Selector (part of it, anyway)
|
||||
;;; ============================================================
|
||||
|
||||
.org $7000
|
||||
.proc selector_overlay
|
||||
.org $7000
|
||||
|
||||
L7000: stx L73A9
|
||||
sty L73AA
|
||||
|
@ -1,50 +0,0 @@
|
||||
#!/usr/bin/env perl
|
||||
use strict;
|
||||
use warnings;
|
||||
|
||||
my @symbols = ();
|
||||
my @equates = ();
|
||||
|
||||
# TODO: Handle nested procs
|
||||
my $proc = '';
|
||||
|
||||
while (<STDIN>) {
|
||||
chomp;
|
||||
next unless m/^00([0-9A-F]{4}) 2 .. .. .. .. (.*)/;
|
||||
my ($addr, $line) = ($1, $2);
|
||||
$line =~ s/;.*//;
|
||||
$line =~ s/^\s*|\s*$//;
|
||||
next unless $line;
|
||||
if ($line =~ m/^\.proc\s+(\S+)/) {
|
||||
$proc = $1;
|
||||
push @symbols, [$proc, $addr];
|
||||
next;
|
||||
}
|
||||
if ($line =~ m/^\.endproc/) {
|
||||
$proc = '';
|
||||
next;
|
||||
}
|
||||
|
||||
if ($line =~ m/^(\S+)\s*:=\s*(.*)/) {
|
||||
my ($symbol, $value) = ($1, $2);
|
||||
next if $value =~ m/::/;
|
||||
$value =~ s/\*/\$$addr/; # foo := * + 2
|
||||
$symbol = $proc . '_' . $symbol if $proc;
|
||||
push @equates, [$symbol, $value];
|
||||
next;
|
||||
}
|
||||
|
||||
if ($line =~ m/^(\S+):/) {
|
||||
my ($symbol) = ($1);
|
||||
$symbol = $proc . '_' . $symbol if $proc;
|
||||
push @symbols, [$symbol, $addr];
|
||||
}
|
||||
}
|
||||
|
||||
foreach my $pair (@symbols) {
|
||||
printf "%-30s := \$%s\n", @$pair[0], @$pair[1];
|
||||
}
|
||||
|
||||
foreach my $pair (@equates) {
|
||||
printf "%-24s := %s\n", @$pair[0], @$pair[1];
|
||||
}
|
@ -31,9 +31,9 @@ function stats {
|
||||
#do_make clean
|
||||
do_make all
|
||||
|
||||
COMMON="loader mgtk invoker ovl1 ovl1a ovl1b ovl1c ovl2"
|
||||
TARGETS="desktop $COMMON ovl34567"
|
||||
SOURCES="desktop_main desktop_res desktop_aux $COMMON ovl3 ovl4 ovl5 ovl6 ovl7"
|
||||
COMMON="loader mgtk"
|
||||
TARGETS="$COMMON desktop"
|
||||
SOURCES="$COMMON desktop_main desktop_res desktop_aux invoker ovl1 ovl1a ovl1b ovl1c ovl2 ovl3 ovl4 ovl5 ovl6 ovl7"
|
||||
|
||||
# Verify original and output match
|
||||
echo "Verifying diffs:"
|
||||
|
Loading…
Reference in New Issue
Block a user