More things

This commit is contained in:
Fulton Browne 2021-08-28 09:30:44 -07:00
parent e724b09a55
commit c6b0d4160a
5 changed files with 16 additions and 9 deletions

View File

@ -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

View File

@ -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!!!

9
ls9.c
View File

@ -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;
}

View File

@ -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)))

1
start.ls9 Normal file
View File

@ -0,0 +1 @@
(local-boot)