diff --git a/Makefile b/Makefile index 8d67956b..404f95e7 100644 --- a/Makefile +++ b/Makefile @@ -29,7 +29,7 @@ SRC = syseng sysen1 sysen2 sysen3 sysnet kshack dragon channa \ moon teach ken lmio1 llogo a2deh chsgtv clib sys3 lmio turnip \ mits_s rab stan_k bs cstacy kp dcp2 -pics- victor imlac rjl mb bh \ lars drnil radia gjd maint bolio cent shrdlu vis cbf digest prs jsf \ - decus bsg muds54 + decus bsg muds54 hello DOC = info _info_ sysdoc sysnet syshst kshack _teco_ emacs emacs1 c kcc \ chprog sail draw wl pc tj6 share _glpr_ _xgpr_ inquir mudman system \ xfont maxout ucode moon acount alan channa fonts games graphs humor \ diff --git a/doc/hello-lisp.md b/doc/hello-lisp.md index dc230a00..fc52a4d6 100644 --- a/doc/hello-lisp.md +++ b/doc/hello-lisp.md @@ -34,3 +34,5 @@ file and writes out `ts hello`. (suspend ":kill " '(ts hello)) ;Save image as an executable program. (hello)) ;Executable program will start from here. ``` + +These files are available in the HELLO directory. diff --git a/src/hello/hello.lisp b/src/hello/hello.lisp new file mode 100644 index 00000000..b3f91126 --- /dev/null +++ b/src/hello/hello.lisp @@ -0,0 +1,8 @@ +;;; -*- lisp -*- + +;; Hello world example for Maclisp. When this is compiled to HELLO +;; FASL, the file HELLO LOADER will dump out an executable program. +(defun hello () + (princ "Hello Maclisp!") + (terpri) + (quit)) diff --git a/src/hello/hello.loader b/src/hello/hello.loader new file mode 100644 index 00000000..aca2918b --- /dev/null +++ b/src/hello/hello.loader @@ -0,0 +1,15 @@ +;;; -*- lisp -*- + +(comment) ;Magic allocation comment. + +;; This is the load and dump script for HELLO LISP. Pass the HELLO LOADER +;; file name on the LISP command line. + +(progn + (close (prog1 infile (inpush -1))) ;Close channel for this file. + (fasload hello fasl) + (gc) + (purify 0 0 'bporg) ;Purify memory pages. + (sstatus flush t) ;Share pure pages with Maclisp. + (suspend ":kill " '(ts hello)) ;Write executable image. + (hello)) ;Start executing here.