From 3f2a8d57f5ded66405ca8ac1689aa1336cd5cb74 Mon Sep 17 00:00:00 2001 From: Peter Ferrie Date: Mon, 13 Feb 2017 13:20:24 -0800 Subject: [PATCH] add a compile-time guard of memory map --- src/passport.a | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/passport.a b/src/passport.a index 7ef2292..c510773 100755 --- a/src/passport.a +++ b/src/passport.a @@ -96,6 +96,7 @@ flag = $FF ; byte ; Application constants (not zero addresses) RELBASE = $6800 ; address to move Passport code ; so that it's out of the way +LOWPOINT = $4300 ; lowest available address for code BASEPAGE = $10 ; Special Delivery tracer assumes ; this is $10, so don't change it! TRUE = $00 ; Lots of code assumes this is $00 @@ -798,3 +799,6 @@ LastMover !if ($B500 - ((255 + LastMover - FirstMover) & $FF00)) != RELBASE { !serious "RELBASE requires adjustment to ", ($B500 - ((255 + LastMover - FirstMover) & $FF00)) } +!if ($B500 - ((255 + LastMover - FirstMover) & $FF00)) < LOWPOINT { + !serious "code is too large to fit in available space!" +}