Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
230 changes: 113 additions & 117 deletions build/basics.tcl

Large diffs are not rendered by default.

67 changes: 64 additions & 3 deletions build/build.tcl
Original file line number Diff line number Diff line change
Expand Up @@ -110,12 +110,54 @@ proc ip_address {string} {
format "%o" $x
}

proc expect_load {} {
# Loading a FASL outputs a number in the current base.
# Loading a source file outputs T.
expect -re {[\r\n]([0-9]+\.?|T) *[\r\n]}
}

# Respond to the output from (load ...).
proc respond_load { r } {
expect -re {[\r\n][0-9]+\.? *[\r\n]}
expect_load
type $r
}

# Call the LISP compiler. The action argument is evalutated first to
# send commands to LISP for setting up the compilation environment.
# The second argument is a list of files to be compiled.
proc complr_action {action files} {
respond "*" "complr\013"
expect "LISP COMPILER"
if {$action ne ""} {
respond "_" "\007"
eval $action
type "(maklap)"
}
foreach i $files {
respond "_" "$i\r"
}
respond "_" "\032"
respond ") " ":kill\r"
}

# Call the LISP compiler, first loading a set of libraries to set up
# the compilation environment.
proc complr_load {libs files} {
set action ""
set respond {respond "*"}
foreach i $libs {
set action "$action$respond \"(load '$i)\"\n"
set respond "respond_load"
}
set action "$action;expect_load\n"
complr_action $action $files
}

# Call LISP compiler with no fuss.
proc complr {files} {
complr_action {} $files
}

proc build_macsyma_portion {} {
respond "*" "complr\013"
respond "_" "\007"
Expand Down Expand Up @@ -143,6 +185,10 @@ proc build_macsyma_portion {} {
set timeout 100
}

proc make_link {to from} {
respond "*" ":link $to,$from\r"
}

set timeout 100
proc setup_timeout {} {
# Don't do this until after you've called "spawn", otherwise it'll cause a
Expand All @@ -167,9 +213,9 @@ proc arpanet {rfc file} {
# Others do not.
global mchn
if [string equal "$mchn" "DM"] {
respond "*" ":link sys;atsign $rfc, $file\r"
make_link "sys;atsign $rfc" $file
} else {
respond "*" ":link device;lbsign $rfc, $file\r"
make_link "device;lbsign $rfc" $file
}
}

Expand Down Expand Up @@ -237,6 +283,21 @@ proc linker {files} {
}
}

# Load a binary file, do some potentially purifying and dumping
# actions, and kill the job.
proc purify {job file actions} {
respond "*" ":job $job\r"
respond "*" ":load $file\r"
eval $actions
# Some actions leave the job around, others don't. The following
# will take care of both cases.
respond "*" "$job\033\030"
expect -exact "--Kill--" {
type " "
} -exact "No Such Job" {
}
}

proc decuuo {file {dump ":pdump"}} {
respond "*" ":start 45\r"
respond "Command:" "d"
Expand Down
42 changes: 21 additions & 21 deletions build/dm.tcl
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,9 @@ midas "sys; atsign demstr" "sysen2; demstr"
midas "sysen2; ts demst" "sysen2; demst"

# Gun down dead demons.
respond "*" ":link taa; pwfile 999999, sysen1; pwfile >\r"
make_link "taa; pwfile 999999" " sysen1; pwfile >"
midas "sysbin;" "sysen2; gunner"
respond "*" ":link sys; atsign gunner, sysbin; gunner bin\r"
make_link "sys; atsign gunner" " sysbin; gunner bin"

# Line printer unspooler demon.
midas "sys; atsign unspoo" "sysen1; unspoo" {
Expand All @@ -33,32 +33,32 @@ midas "sys; atsign survey" "survey; survey"

# Survey giver demon.
midas "survey; atsign surgiv" "surgiv"
respond "*" ":link sys; atsign surgiv, survey;\r"
make_link "sys; atsign surgiv" " survey;"

# Survey sender demon.
respond "*" ":link sys; atsign sursnd, survey;\r"
make_link "sys; atsign sursnd" " survey;"

# Login program.
midas "sysbin;" "syseng; booter"
# Enter an empty password for AS.
respond "*" ":job pw\r"
respond "*" "2/"
respond "0" "\0331'AS\033\r"
respond "\n" ":job booter\r"
respond "*" ":load sysbin;\r"
respond "*" "start/"
respond "LITTER" "\033q\033x"
respond "*" "a/"
respond "0" "\0331'\033\r"
respond "\n" ":go scramble\r"
expect "ILOPR"
respond "0>>0" "a/"
respond " " ":job pw\r"
respond "*" "3/"
respond "0" "\0331q\r"
respond "\n" "\033y"
respond " " "sys;\021 \021 pass \021 words\r"
respond "*" ":kill\r"
respond "*" ":kill\r"
respond "\n" ":vk\r"
purify booter "sysbin;" {
respond "*" "start/"
respond "LITTER" "\033q\033x"
respond "*" "a/"
respond "0" "\0331'\033\r"
respond "\n" ":go scramble\r"
expect "ILOPR"
respond "0>>0" "a/"
respond " " ":job pw\r"
respond "*" "3/"
respond "0" "\0331q\r"
respond "\n" "\033y"
respond " " "sys;\021 \021 pass \021 words\r"
respond "*" ":kill\r"
}
mkdir "(init)"
respond "*" ":link (init); as hactrn, sys2; ts shell\r"
make_link "(init); as hactrn" " sys2; ts shell"
37 changes: 18 additions & 19 deletions build/emacs.tcl
Original file line number Diff line number Diff line change
@@ -1,16 +1,15 @@
midas "sysbin;" ".teco.;teco"
respond "*" ":job teco\r"
respond "*" ":load sysbin;teco bin\r"
sleep 2
respond "*" "dumpit\033g"
sleep 2
respond "TECPUR" "\r"
respond "*" ":kill\r"
respond "*" ":link sys;ts teco,.teco.;tecpur >\r"
respond "*" ":link sys;ts t, sys; ts teco\r"
purify teco "sysbin;teco bin" {
sleep 2
respond "*" "dumpit\033g"
sleep 2
respond "TECPUR" "\r"
}
make_link "sys;ts teco" ".teco.;tecpur >"
make_link "sys;ts t" " sys; ts teco"

respond "*" ":link sys2;ts emacs,emacs;ts >\r"
respond "*" ":link sys2;ts ne,emacs;ts >\r"
make_link "sys2;ts emacs" "emacs;ts >"
make_link "sys2;ts ne" "emacs;ts >"
respond "*" ":emacs\r"
respond "EMACS Editor" "\033xrun\033einit\033? Generate\r"
expect -timeout 1000 -exact { -> DSK: EMACS; [PURE]}
Expand All @@ -29,8 +28,8 @@ respond "*" ":teco\r"
respond "&" "mmrun\033purify\033dump\033ts 163\033\033"
respond "&" "\003"
respond "*" ":kill\r"
respond "*" ":link sys2;ts edit,sys2;ts emacs\r"
respond "*" ":link sys2;ts e, sys2; ts emacs\r"
make_link "sys2;ts edit" "sys2;ts emacs"
make_link "sys2;ts e" " sys2; ts emacs"

# BABYL, BABYLM, CACHE, FIXLIB, IVORY, MKDUMP, OUTLINE-MODE, PL1,
# TEACH-C100, TMACS and WORDAB are generated with IVORY.
Expand Down Expand Up @@ -101,7 +100,7 @@ respond "*" ":rename emacs;\[rmai\] \021:ej, emacs;\[rmai\] 147\r"

# Support canonical phrase "er emacs;emacs init$ @y :m(hfx*)$"
# at end of personal init file
respond "*" ":link emacs;emacs init,emacs;* emacs\r"
make_link "emacs;emacs init" "emacs;* emacs"

# make TS BABYL
midas "sys3;ts babyl" "kmp;babyl"
Expand All @@ -125,8 +124,8 @@ send "\r"
expect ":KILL"
# The previous file version was 62, dated 1982-01-05.
respond "*" ":rename emacs; tsinfo >, tsinfo 63\r"
respond "*" ":link sys2;ts info,emacs;tsinfo >\r"
respond "*" ":link sys2;ts h, sys2; ts info\r"
make_link "sys2;ts info" "emacs;tsinfo >"
make_link "sys2;ts h" " sys2; ts info"

respond "*" ":emacs\r"
respond "EMACS Editor" "\033XLoad Library\033docond\r"
Expand Down Expand Up @@ -156,10 +155,10 @@ send "\r"
respond "*" ":move turnip; ts view, sys3;\r"

# VDIR
respond "*" ":link sys3; ts vdir, ts view\r"
make_link "sys3; ts vdir" " ts view"

# RMODE
respond "*" ":link sys1; ts rmode, .teco.;\r"
make_link "sys1; ts rmode" " .teco.;"

# Make TECORD within Emacs work
respond "*" ":link info;tecord 999999,.teco.;tecord >\r"
make_link "info;tecord 999999" ".teco.;tecord >"
20 changes: 6 additions & 14 deletions build/haunt.tcl
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,7 @@ log_progress "ENTERING BUILD SCRIPT: HAUNT"
cwd "haunt"

# build ops4
respond "*" "complr\013"
respond "_" "haunt;_haunt;ops4 lsp\r"
respond "_" "\032"
type ":kill\r"
complr {"haunt;_haunt;ops4 lsp"}

# dump ops4
respond "*" "lisp\013"
Expand All @@ -17,14 +14,9 @@ respond ":\$Job Suspended\$" ":pdump haunt;ts ops4\r"
type ":kill\r"

# build compile haunt lisp code
respond "*" "complr\013"
respond "_" "haunt;_haunt;comman lsp\r"
respond "_" "haunt;_haunt;haunt lsp\r"
respond "_" "haunt;_haunt;slurp lsp\r"
respond "_" "haunt;_haunt;tlist lsp\r"
respond "_" "haunt;_haunt;user lsp\r"
respond "_" "\032"
type ":kill\r"
complr {"haunt;_haunt;comman lsp" "haunt;_haunt;haunt lsp"
"haunt;_haunt;slurp lsp" "haunt;_haunt;tlist lsp"
"haunt;_haunt;user lsp"}

# dump haunt
respond "*" ":haunt;ops4\r"
Expand All @@ -34,5 +26,5 @@ respond "*" ":pdump haunt;ts haunt\r"
type ":kill\r"

# make available in SYS:
respond "*" ":link sys3;ts haunt,haunt;ts haunt\r"
respond "*" ":link sys3;ts ops4,haunt;ts ops4\r"
make_link "sys3;ts haunt" "haunt;ts haunt"
make_link "sys3;ts ops4" "haunt;ts ops4"
51 changes: 24 additions & 27 deletions build/ka10/processor.tcl
Original file line number Diff line number Diff line change
Expand Up @@ -17,13 +17,13 @@ omidas "dsk0:.;@ mark" "syseng; mark"
midas "sys3; ts utnam" "lars; utnam"

# Name Dragon
respond "*" ":link syseng;tvkbd rooms, sysen2;\r"
make_link "syseng;tvkbd rooms" "sysen2;"
midas "sysbin;" "sysen2;namdrg"
respond "*" ":link channa;rakash namdrg, sysbin; namdrg bin\r"
make_link "channa;rakash namdrg" "sysbin; namdrg bin"

# STUFF
midas "sys1;ts stuff" "sysen2;stuff"
respond "*" ":link channa;rakash tvfix, sys1; ts stuff\r"
make_link "channa;rakash tvfix" "sys1; ts stuff"

# IOELEV, PDP-11 doing I/O for the PDP-10 host.
# The "AI" IOELEV, also known as CHAOS-11.
Expand Down Expand Up @@ -82,10 +82,9 @@ omidas "dsk0:.;@ dazdrt" "klh; dazdrt" {

# Knight TV Spacewar
midas "gjd;" "swr data"
respond "*" ":job swr\r"
respond "*" ":load gjd; swr bin\r"
respond "*" "first\033,last\033\060ygjd; swr ships\r"
respond "*" ":kill\r"
purify swr "gjd; swr bin" {
respond "*" "first\033,last\033\060ygjd; swr ships\r"
}
respond "*" ":midas games;ts tvwar_spcwar; tvwar\r"
expect ":KILL"

Expand Down Expand Up @@ -144,7 +143,7 @@ midas "dsk0:.;@ 3406" "stan.k; 3406"

# 340D
midas "stan.k;mod11 bin" "340d"
respond "*" ":link sys1;ts 340d, stan.k; mod11 bin\r"
make_link "sys1;ts 340d" "stan.k; mod11 bin"

# Munching squares for 340 display.
midas "lars; ts munch" "munch"
Expand All @@ -154,11 +153,11 @@ midast "dsk0: .; @ munch" "lars; munch" {

# Minskytron, translated from PDP-1.
midas "dsk0: lars; ts minsky" "minsky tron"
respond "*" ":link dsk0: .; @ minsky, lars; ts minsky\r"
make_link "dsk0: .; @ minsky" "lars; ts minsky"

# Edward Lorenz' strange attactor.
midas "dsk0: lars; ts lorenz" "lorenz"
respond "*" ":link dsk0: .; @ lorenz, lars; ts lorenz\r"
make_link "dsk0: .; @ lorenz" "lars; ts lorenz"

# Mandelbrot.
midas "lars; ts tvbrot" "tvbrot"
Expand Down Expand Up @@ -190,23 +189,21 @@ midas "sysbin;" "syseng;scrimp"
midas "sys3;ts carpet" "syseng;carpet"

# Patch PDP-6 LISP to run on PDP-10.
respond "*" ":job lisp\r"
respond "*" ":load .; @ lisp\r"
respond "*" "33777//\031"
respond "*" "\033q\033,777777\033\033z"
respond "*" "pitele+13/"
respond "FSC" "push p,b\n"
respond "FSC" "jrst patch\r"
respond "\n" "patch/"
respond "0" "move b,echocc\n"
respond "0" "add b,ticc\n"
respond "0" "dpb b,.+3\n"
respond "0" "pop p,b\n"
respond "0" "jrst pitele+15\n"
respond "0" "331000,,a\r"
respond "\n" "\033y"
respond " " "dsk0:.;@ lisp\r"
respond "*" ":kill\r"
purify lisp ".; @ lisp" {
respond "*" "33777//\031"
respond "*" "\033q\033,777777\033\033z"
respond "*" "pitele+13/"
respond "FSC" "push p,b\n"
respond "FSC" "jrst patch\r"
respond "\n" "patch/"
respond "0" "move b,echocc\n"
respond "0" "add b,ticc\n"
respond "0" "dpb b,.+3\n"
respond "0" "pop p,b\n"
respond "0" "jrst pitele+15\n"
respond "\n" "\033y"
respond " " "dsk0:.;@ lisp\r"
}

# Lisp display slave, PDP-6 version.
midas "sys; atsign 6slave" "sysen2; ld10" {
Expand Down
Loading