forth: fix prompt in QUIT conditions

This commit is contained in:
Virgil Dupras 2020-03-21 15:22:37 -04:00
parent 9791c0957d
commit 6487c713ef

View File

@ -151,11 +151,6 @@ forthMain:
.cinName: .cinName:
.db "C<", 0 .db "C<", 0
forthLoop:
ld hl, INTERPRET
push hl
jp EXECUTE+2
BEGIN: BEGIN:
.dw compiledWord .dw compiledWord
.dw LIT .dw LIT
@ -678,19 +673,33 @@ EXIT:
.dw EXIT .dw EXIT
.db 0 .db 0
QUIT: QUIT:
.dw compiledWord
.dw NUMBER
.dw 0
.dw FLAGS_
.dw STORE
.dw .private
.dw INTERPRET
.private:
.dw nativeWord .dw nativeWord
ld ix, RS_ADDR ld ix, RS_ADDR
jp forthLoop jp next
.db "ABORT" .db "ABORT"
.fill 2 .fill 2
.dw QUIT .dw QUIT
.db 0 .db 0
ABORT: ABORT:
.dw compiledWord
.dw .private
.dw QUIT
.private:
.dw nativeWord .dw nativeWord
; Reinitialize PS ; Reinitialize PS
ld sp, (INITIAL_SP) ld sp, (INITIAL_SP)
jp QUIT+2 jp next
abortUnderflow: abortUnderflow:
ld hl, .word ld hl, .word