diff --git a/stage1/words.s b/stage1/words.s index 147a439..0ff5b49 100644 --- a/stage1/words.s +++ b/stage1/words.s @@ -284,6 +284,12 @@ INITIAL_WORDS: .ascii "words$" .balign 8 + .quad shutdown + .byte 9 + .byte LISP_OBJECT_TYPE_INTEGER + .ascii "shutdown$" + .balign 8 + # end .quad 0 .quad 0 diff --git a/stage2/make.mk b/stage2/make.mk index 085113c..63ed654 100644 --- a/stage2/make.mk +++ b/stage2/make.mk @@ -1,6 +1,9 @@ stage2.lsp: $(wildcard stage2/*.lsp) # strip comments sed -E '/^ *(;.*)?$$/d' $^ > stage2.lsp + if [[ "${SHUTDOWN}" == 1 ]]; then \ + echo "(call-native shutdown$$ 0)" >> stage2.lsp \ + fi clean-stage2: rm -f stage2.lsp