aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorB. Watson <urchlay@slackware.uk>2025-04-28 08:19:11 -0400
committerB. Watson <urchlay@slackware.uk>2025-04-28 08:19:11 -0400
commitac44a300e363e976b2ad36d8208bb1cd7828ad64 (patch)
treed71708056632c020f5105e3d447366e3905edaf5
parentba3ffa27f20b697a8bc1de49a582efdef2182231 (diff)
downloadatari8-self-relocator-ac44a300e363e976b2ad36d8208bb1cd7828ad64.tar.gz
reloc.s: commentary.
-rw-r--r--reloc.s9
1 files 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