From 53ca319b60ee36ee4f4f8b83fc199c8aa89a8647 Mon Sep 17 00:00:00 2001 From: Miquel Sabaté Solà Date: Tue, 10 Feb 2026 23:04:58 +0100 Subject: Add a sanity check for the LEVEL variable MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Miquel Sabaté Solà --- include/asm.s | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'include/asm.s') diff --git a/include/asm.s b/include/asm.s index 09229f9..e44aedf 100644 --- a/include/asm.s +++ b/include/asm.s @@ -1,3 +1,8 @@ +;; Sanity check for the 'LEVEL' build parameter. +.if !(LEVEL >= 0 && LEVEL < 8) + .error "You have defined a bad 'LEVEL' value, it should be between 0 and 7 (both included)" +.endif + ;; Jump And Link: jump to subroutine but use the return address that the caller ;; had whenever the given subroutine runs `rts`. In other words, "link" the ;; return address from the caller to the callee. -- cgit v1.2.3