Skip to content

Commit

Permalink
Include "binary" symbol in the header sources
Browse files Browse the repository at this point in the history
  • Loading branch information
matushorvath committed Mar 14, 2024
1 parent 3fa44b8 commit adbba4c
Show file tree
Hide file tree
Showing 3 changed files with 22 additions and 15 deletions.
4 changes: 2 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ $(OBJDIR)/gen_%.input: $(OBJDIR)/gen_%.o $(LIBXIB)
$(run-ld)

# Microsoft Basic
MSBASIC_OBJS = $(BASE_OBJS) $(LIBXIB) binary.o msbasic_header.o msbasic_binary.o
MSBASIC_OBJS = $(BASE_OBJS) $(LIBXIB) msbasic_header.o msbasic_binary.o

$(BINDIR)/msbasic.input: $(MSBASIC_OBJS:%.o=$(OBJDIR)/%.o)
$(run-ld)
Expand All @@ -106,7 +106,7 @@ $(OBJDIR)/msbasic_binary.o: $(MSBASICDIR)/tmp/vm6502.bin
$(run-bin2obj)

# 6502 functional tests
FUNC_TEST_OBJS = $(BASE_OBJS) func_test_callback.o $(LIBXIB) binary.o func_test_header.o func_test_binary.o
FUNC_TEST_OBJS = $(BASE_OBJS) func_test_callback.o $(LIBXIB) func_test_header.o func_test_binary.o

$(BINDIR)/func_test.input: $(FUNC_TEST_OBJS:%.o=$(OBJDIR)/%.o)
$(run-ld)
Expand Down
22 changes: 13 additions & 9 deletions src/func_test_header.s
Original file line number Diff line number Diff line change
Expand Up @@ -3,21 +3,25 @@

# The binary is available in git repository https://github.com/Klaus2m5/6502_65C02_functional_tests

# Start address for the functional test binary
# Can be found using bin_files/6502_functional_test.lst, search for "Program start address is at"
.EXPORT binary

.IMPORT func_test_callback

binary:
# Start address for the functional test binary
# Can be found using bin_files/6502_functional_test.lst, search for "Program start address is at"
db 0x0400

# Load address for the functional test binary
# Load address for the functional test binary
db 0

# Set up tracing
# 0 - disable tracing
# -1 - trace always
# >0 - start tracing after passing that address
# Set up tracing
# 0 - disable tracing
# -1 - trace always
# >0 - start tracing after passing that address
db 0

# Callback address
.IMPORT func_test_callback
# Callback address
db func_test_callback

.EOF
11 changes: 7 additions & 4 deletions src/msbasic_header.s
Original file line number Diff line number Diff line change
@@ -1,16 +1,19 @@
# This the header for the MS Basic binary.
# It needs to be linked immediately after binary.o and immediately before the MS Basic binary itself.

# Start address for the MS Basic binary, set to -1 to use the reset vector.
.EXPORT binary

binary:
# Start address for the MS Basic binary, set to -1 to use the reset vector.
db -1

# Load address for the MS Basic binary, needs to match the BASROM memory region in $(MSBASICDIR)/vm6502.cfg.
# Load address for the MS Basic binary, needs to match the BASROM memory region in $(MSBASICDIR)/vm6502.cfg.
db 0xc000

# Disable tracing
# Disable tracing
db 0

# No callback
# No callback
db 0

.EOF

0 comments on commit adbba4c

Please sign in to comment.