andymccall / ez80op

A command line utility that returns information on eZ80 opcodes.
0 stars 0 forks source link

Make use of variables for heap, stack and init location for fasmg #10

Closed andymccall closed 2 months ago

andymccall commented 2 months ago

Enhancement: Make use of variables for heap, stack and init location for fasmg linking

Details: There are four variables in the Makefile that are using when linking the Agon binary of ez80op. Currently these are not used and the variables are hard coded into the command.

The variables are:

BSSHEAP_LOW ?= 080000
BSSHEAP_HIGH ?= 09FFFF
STACK_HIGH ?= 0AFFFF
INIT_LOC ?= 040000

These should be used in this line:

$(Z80_ASM) -n '$(AGDEV_BASE)/meta/ld.alm' -i 'DEBUG := 0' -i 'PROG_NAME := '\''$(Z80_PROJECT_NAME)'\''' -i 'HAS_LIBC := 1' -i 'HAS_LIBCXX := 1' -i 'HAS_AGON := 1' -i 'PREFER_OS_CRT := 0' -i 'PREFER_OS_LIBC := 0' -i 'HAS_EXIT_HANDLER := 1' -i 'HAS_ARG_PROCESSING := 0' -i 'include "$(AGDEV_BASE)/meta/linker_script"' -i 'range .bss $$080000 : $$09FFFF' -i 'provide __stack = $$0AFFFF' -i 'locate .header at $$040000' -i 'source "$(AGDEV_BASE)/lib/crt/crt0.src", "obj/z80/lto.src"' -i 'library "$(AGDEV_BASE)/lib/libload/fatdrvce.lib", "$(AGDEV_BASE)/lib/libload/fileioc.lib", "$(AGDEV_BASE)/lib/libload/fontlibc.lib", "$(AGDEV_BASE)/lib/libload/graphx.lib", "$(AGDEV_BASE)/lib/libload/keypadc.lib", "$(AGDEV_BASE)/lib/libload/msddrvce.lib", "$(AGDEV_BASE)/lib/libload/srldrvce.lib", "$(AGDEV_BASE)/lib/libload/usbdrvce.lib"' $(BIN_DIR)/$(Z80_PROJECT_NAME).bin