diff --git a/Makefile b/Makefile index af0cdc1..0adfbaa 100644 --- a/Makefile +++ b/Makefile @@ -9,8 +9,8 @@ ls9: ls9.c ls9.image: ls9 ls9.ls9 rm -f ls9.image - echo "(dump-image \"ls9.image\")" | ./ls9 -q - echo "(save)" | ./ls9 -l src/disasm.ls9 -l src/man.ls9 -l src/info.ls9 -l src/repl.ls9 -l src/boottools.ls9 -l src/profile.ls9 + echo "(dump-image \"ls9.image\")" | ./ls9 -bq + echo "(save)" | ./ls9 -b -l src/disasm.ls9 -l src/man.ls9 -l src/info.ls9 -l src/repl.ls9 -l src/boottools.ls9 -l src/profile.ls9 test: ls9 ls9.image ./ls9 test.ls9 diff --git a/README.org b/README.org index 5e3649e..88f0e98 100644 --- a/README.org +++ b/README.org @@ -24,7 +24,11 @@ maybe boot itself one day + A bunch of silly programs ** How to build if you really want to build it: -Just run make +Just run ~make~ +** How to run +~./ls9 start.ls9~ +starts in the main big daddy REPL +~./ls9 -b~ gives the lame sauce C REPL ** Bug reporting email me ** I HAVE AN IDEA!!! diff --git a/ls9.c b/ls9.c index b2d9146..1cd6c27 100644 --- a/ls9.c +++ b/ls9.c @@ -5236,6 +5236,7 @@ void kbdintr(int sig) { } int Quiet = 0; +int Bootstrap = 0; void initrts(void) { Rts = NIL; @@ -5566,6 +5567,9 @@ int main(int argc, char **argv) { loadfile(cmdarg(argv[i])); j = strlen(argv[i]); break; + case 'b': + Bootstrap++; + break; case 'q': Quiet = 1; break; @@ -5576,9 +5580,6 @@ int main(int argc, char **argv) { } } bindset(S_quiet, Quiet? TRUE: NIL); - if (!Quiet && NULL == argv[i]) { - prints("LISP9 "); prints(VERSION); nl(); prints("type (start-repl) to get to the all-lisp repl"); nl(); - } Argv = NULL == argv[i]? NIL: argvec(&argv[i+1]); start(); if (setjmp(Restart) != 0) exit(EXIT_FAILURE); @@ -5586,6 +5587,6 @@ int main(int argc, char **argv) { loadfile(argv[i]); exit(EXIT_SUCCESS); } - repl(); + if (Bootstrap) repl(); /* REPL for bootstrapping the userspace */ return 0; } diff --git a/src/profile.ls9 b/src/profile.ls9 index f2c0966..5096d84 100644 --- a/src/profile.ls9 +++ b/src/profile.ls9 @@ -9,6 +9,7 @@ ;; edit the (prompt) function to control the FREPL prompt ;; BUG you must run (flush (outport)) at the end of the function (defun (prompt) - (princ "; ") ;; A basic change - ;; IDEAS: Show the time, heap space, and add auto image dumping + (princ "; ") ;; A basic prompt change + (save) ;; Auto save you image + (gc) ;; Take out the garbage (flush (outport))) diff --git a/start.ls9 b/start.ls9 new file mode 100644 index 0000000..88d16ac --- /dev/null +++ b/start.ls9 @@ -0,0 +1 @@ +(local-boot)