From 03926b8688c7510f9143dec42065dbb7212df66d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Maja=20K=C4=85dzio=C5=82ka?= Date: Mon, 6 Mar 2023 02:10:07 +0100 Subject: [PATCH] Perform `1 load` automatically when built with -DAUTOLOAD This is not done by default, as I like to keep a known-good version of the code at blocks 101 and upwards, as a fallback if break the main copy. This might be desirable for other usecases, though. Closes #7 --- boot.s | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/boot.s b/boot.s index 0c63a48..a79b361 100644 --- a/boot.s +++ b/boot.s @@ -92,6 +92,12 @@ start: mov [di + DRIVE_NUMBER - CompressedEnd], dl push dx ; for FORTH code +%ifdef AUTOLOAD + push 1 + mov ax, LOAD + jmp InterpreterLoop.execute +%endif + ReadLine: mov di, InputBuf mov [InputPtr], di @@ -166,6 +172,7 @@ STATE equ $+1 jz short .compile ; Execute the word +.execute: RetSP equ $+1 mov di, RS0 pop bx