Skip to content

Commit

Permalink
Perform 1 load automatically when built with -DAUTOLOAD
Browse files Browse the repository at this point in the history
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
  • Loading branch information
meithecatte committed Mar 6, 2023
1 parent 5016138 commit 03926b8
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions boot.s
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -166,6 +172,7 @@ STATE equ $+1
jz short .compile

; Execute the word
.execute:
RetSP equ $+1
mov di, RS0
pop bx
Expand Down

0 comments on commit 03926b8

Please sign in to comment.