1
0
mirror of https://github.com/PDP-10/its.git synced 2026-04-19 01:18:29 +00:00

Update Muddle hello world example.

Use MDL 55.  Remove reference to LARS directory.  Move call to SAVE-IT
from the source file to the Muddle session.
This commit is contained in:
Lars Brinkhoff
2023-02-23 10:26:23 +01:00
parent 43810baab6
commit dfb09da1e3
2 changed files with 14 additions and 15 deletions

View File

@@ -31,34 +31,34 @@ with this content:
<QUIT>> <QUIT>>
<DEFINE SAVE-IT () <DEFINE SAVE-IT ()
<COND (<=? <SAVE "LARS; HELLO SAVE"> "SAVED"> <QUIT>)> <COND (<=? <SAVE "HELLO SAVE"> "SAVED"> <QUIT>)>
<HELLO>> <HELLO>>
<SAVE-IT>
``` ```
`HELLO` is the main program which prints a message and terminates. `HELLO` is the main program which prints a message and terminates.
`SAVE-IT` is used to create a `SAVE` file and arranges to call `HELLO` `SAVE-IT` is used to create a `SAVE` file and arranges to call `HELLO`
when it's restored. when it's restored.
Now start `:muddle` and type `<FLOAD "HELLO MUD">` and Now start `:mud55` and type `<FLOAD "HELLO MUD">` and
<kbd>Escape</kbd>. It should look like this: <kbd>Escape</kbd>. Next, type `<SAVE-IT>`<kbd>Escape</kbd>.
It should look like this:
``` ```
:muddle :mud55
MUDDLE 56 IN OPERATION. MUDDLE 55 IN OPERATION.
LISTENING-AT-LEVEL 1 PROCESS 1 LISTENING-AT-LEVEL 1 PROCESS 1
<FLOAD "HELLO MUD">$ <FLOAD "HELLO MUD">$
"DONE"
<SAVE-IT>$
:KILL :KILL
``` ```
A `HELLO SAVE` file has been created with the `HELLO` procedure in it. A `HELLO SAVE` file has been created with the `HELLO` procedure in it.
To run it, start `:muddle` again and type `<RESTORE "HELLO SAVE">`: To run it, start `:mud55` again and type `<RESTORE "HELLO SAVE">`:
``` ```
*:muddle *:mud55
MUDDLE 56 IN OPERATION. MUDDLE 55 IN OPERATION.
LISTENING-AT-LEVEL 1 PROCESS 1 LISTENING-AT-LEVEL 1 PROCESS 1
<RESTORE "HELLO SAVE">$ <RESTORE "HELLO SAVE">$
Hello, muddled world! Hello, muddled world!

View File

@@ -1,5 +1,6 @@
;"Hello world example for Muddle. Load this file with FLOAD to make a" ;"Hello world example for Muddle. Load this file with FLOAD, and type"
;"HELLO SAVE file which can later be loaded into Muddle with RESTORE." ;"<SAVE-IT>$ to make a HELLO SAVE file which can later be loaded into"
;"Muddle with RESTORE."
<DEFINE HELLO () <DEFINE HELLO ()
<PRINC "Hello, muddled world!"> <PRINC "Hello, muddled world!">
@@ -9,5 +10,3 @@
<DEFINE SAVE-IT () <DEFINE SAVE-IT ()
<COND (<=? <SAVE "HELLO SAVE"> "SAVED"> <QUIT>)> <COND (<=? <SAVE "HELLO SAVE"> "SAVED"> <QUIT>)>
<HELLO>> <HELLO>>
<SAVE-IT>