From ac44a300e363e976b2ad36d8208bb1cd7828ad64 Mon Sep 17 00:00:00 2001 From: "B. Watson" Date: Mon, 28 Apr 2025 08:19:11 -0400 Subject: reloc.s: commentary. --- reloc.s | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/reloc.s b/reloc.s index c073f30..857be8f 100644 --- a/reloc.s +++ b/reloc.s @@ -1,6 +1,9 @@ +;;; reloc.s - relocate code. this is just one puzzle piece. +;;; see README.txt for details. ; uncomment to enable user-friendly "MEMLO is too high" error. -; adds ~80 bytes to the code size (40% larger). +; adds ~80 bytes to the code size. also, makes reloc.xex non-relocatable. +; currently not a problem, but may be in the future. ;verbose_memlo_check = 1 .export _main @@ -33,12 +36,12 @@ _main: ; if MEMLO isn't on a page boundary, move it up to the next ; page, e.g. $1cfc => $1d00. lda MEMLO - beq memlo_00 + beq calc_offset inc MEMLO+1 lda #0 sta MEMLO -memlo_00: +calc_offset: lda code_start+1 sec sbc MEMLO+1 -- cgit v1.2.3