Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

MACN11 - PDP-11 cross assembler. #2360

Merged
merged 7 commits into from
Feb 11, 2025
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
12 changes: 3 additions & 9 deletions build/basics.tcl
Original file line number Diff line number Diff line change
Expand Up @@ -4,15 +4,14 @@ patch_its_and_go
pdset

respond "*" ":login db\r"
sleep 1
type ":vk\r"

# Normally we'd save the old ITS as OITS, but since it was used for
# bootstrapping with another configuration, it's no longer any use.
type ":delete .;@ its\r"
respond "*" ":delete .;@ its\r"

# The new ITS is now canonical.
respond "*" ":rename .;@ nits, .;@ its\r"
sleep 1

respond "*" ":midas sysbin;_syseng;dump\r"
dump_switches
Expand Down Expand Up @@ -117,13 +116,9 @@ expect ":KILL"
respond "*" ":midas sysbin;_sysen2;find\r"
expect ":KILL"
respond "*" ":link sys;ts find,sysbin;find bin\r"
type ":vk\r"
respond "*" ":link sys;ts fi,sys;ts find\r"
type ":vk\r"
respond "*" ":link sys;ts comb,sys;ts find\r"
type ":vk\r"
respond "*" ":link sys2;ts lf,sys;ts find\r"
type ":vk\r"

respond "*" ":midas sys;ts dskuse_syseng;dskuse\r"
expect ":KILL"
Expand Down Expand Up @@ -405,8 +400,7 @@ respond "*" ":midas sys;ts palx_sysen1;palx\r"
expect ":KILL"

# GT40 boot ROM.
respond "*" ":palx gt40;_gt40;bootvt\r"
expect ":KILL"
palx "gt40;" "gt40;bootvt"

# PLAN/CREATE
respond "*" ":midas sys3;ts create_syseng;create\r"
Expand Down
52 changes: 52 additions & 0 deletions build/build.tcl
Original file line number Diff line number Diff line change
Expand Up @@ -173,6 +173,58 @@ proc arpanet {rfc file} {
}
}

proc macro10 {target sources} {
respond "*" ":macro\r"
respond "*" "$target=$sources\r"
expect "CORE USED"
respond "*" "\003"
respond "*" ":kill\r"
}

proc palx {target sources {actions ""}} {
respond "*" ":palx ${target}_$sources\r"
eval $actions
expect ":KILL"
}

proc macn11 {target sources {actions ""}} {
respond "*" ":macn11\r"
respond "*" "${target}_$sources\r"
eval $actions
expect "CORE USED"
respond "*" "\003"
respond "*" ":kill\r"
}

proc loader {files} {
respond "*" ":dec sys:loader\r"
respond "*" "$files/g\r"
expect "EXIT"
}

proc linker {files} {
respond "*" ":dec sys:link\r"
respond "*" "$files/go\r"
expect "EXIT" {
return
} "%LNKNED" {
# Sometimes there is this error; workaround is to retry.
respond "*" "$files/go\r"
expect "EXIT"
}
}

proc decuuo {file {dump ":pdump"}} {
respond "*" ":start 45\r"
respond "Command:" "d"
respond "*" "$dump $file\r"
respond "*" ":kill\r"
}

proc cwd {directory} {
respond "*" ":cwd $directory\r"
}

set ip [ip_address [lindex $argv 0]]
set gw [ip_address [lindex $argv 1]]

Expand Down
5 changes: 0 additions & 5 deletions build/dm.tcl
Original file line number Diff line number Diff line change
Expand Up @@ -13,11 +13,9 @@ expect ":KILL"

# Gun down dead demons.
respond "*" ":link taa; pwfile 999999, sysen1; pwfile >\r"
type ":vk\r"
respond "*" ":midas sysbin;_sysen2; gunner\r"
expect ":KILL"
respond "*" ":link sys; atsign gunner, sysbin; gunner bin\r"
type ":vk\r"

# Line printer unspooler demon.
respond "*" ":midas sys; atsign unspoo_sysen1; unspoo\r"
Expand All @@ -41,11 +39,9 @@ expect ":KILL"
respond "*" ":midas survey; atsign surgiv_surgiv\r"
expect ":KILL"
respond "*" ":link sys; atsign surgiv, survey;\r"
type ":vk\r"

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

# Login program.
respond "*" ":midas sysbin;_syseng; booter\r"
Expand All @@ -72,4 +68,3 @@ respond "*" ":kill\r"
respond "*" ":kill\r"
mkdir "(init)"
respond "*" ":link (init); as hactrn, sys2; ts shell\r"
type ":vk\r"
2 changes: 1 addition & 1 deletion build/emacs.tcl
Original file line number Diff line number Diff line change
Expand Up @@ -148,7 +148,7 @@ respond "\n" "\033x& compress file\033turnip; view >\r"
respond "Compressing file" "\030\003"
respond "*" ":kill\r"
respond "*" ":tctyp aaa\r"
respond "*" ":cwd kmp\r"
cwd "kmp"
respond "*" "kmp\033\023"
respond "*" ":dumpt \033turnip;view\r"
expect "Dumped to"
Expand Down
2 changes: 1 addition & 1 deletion build/haunt.tcl
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
log_progress "ENTERING BUILD SCRIPT: HAUNT"

respond "*" ":cwd haunt\r"
cwd "haunt"

# build ops4
respond "*" "complr\013"
Expand Down
3 changes: 2 additions & 1 deletion build/ka10/include.tcl
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,8 @@ proc make_dskdmp {} {
# Paper tape DSKDMP. This is used for booting ITS.
respond "*" $emulator_escape
punch_tape "$out/dskdmp.rim"
type ":midas ptp:_system;dskdmp\r"
type ":vk\r"
respond "*" ":midas ptp:_system;dskdmp\r"
dskdmp_switches "Y"
expect ":KILL"
}
Expand Down
20 changes: 6 additions & 14 deletions build/ka10/processor.tcl
Original file line number Diff line number Diff line change
Expand Up @@ -25,40 +25,32 @@ expect ":KILL"

# Name Dragon
respond "*" ":link syseng;tvkbd rooms, sysen2;\r"
type ":vk\r"
respond "*" ":midas sysbin;_sysen2;namdrg\r"
expect ":KILL"
respond "*" ":link channa;rakash namdrg, sysbin; namdrg bin\r"
type ":vk\r"

# STUFF
respond "*" ":midas sys1;ts stuff_sysen2;stuff\r"
expect ":KILL"
respond "*" ":link channa;rakash tvfix, sys1; ts stuff\r"
type ":vk\r"

# IOELEV, PDP-11 doing I/O for the PDP-10 host.
# The "AI" IOELEV, also known as CHAOS-11.
# STUFF prefers to have it in the "." directory.
respond "*" ":palx dsk0:.;_system;ioelev\r"
respond "MACHINE NAME =" "AI\r"
expect ":KILL"
palx "dsk0:.;" "system;ioelev" { respond "MACHINE NAME =" "AI\r" }

# TV-11. STUFF prefers it to be in the "." directory.
respond "*" ":palx dsk0:.;_system;tv\r"
expect ":KILL"
palx "dsk0:.;" "system;tv"

# XGP-11. STUFF prefers it to be SYSBIN; VXGP BIN.
respond "*" ":palx sysbin;vxgp bin_sysen2;xgp\r"
expect ":KILL"
palx "sysbin;vxgp bin" "sysen2;xgp"

# CCONS. STUFF prefers it to be in the CONS directory.
mkdir "cons"
respond "*" ":palx cons;_lmcons;ccons\r"
expect ":KILL"
palx "cons;" "lmcons;ccons"

# Old Spacewar
respond "*" ":cwd spcwar\r"
cwd "spcwar"
respond "*" ":midas;324 spcwar; war\r"
expect ":KILL"
respond "*" ":midas spcwar; stars\r"
Expand Down Expand Up @@ -267,7 +259,7 @@ respond "*" ":midas ptp:_maint;hhtest\r"
expect ":KILL"

# NTS TECO-6
respond "*" ":cwd .teco.\r"
cwd ".teco."
respond "*" ":midas;73\r"
expect "MIDAS"
respond "\n" "TECODM REL_TECO DUMMY\r"
Expand Down
72 changes: 28 additions & 44 deletions build/kl10/processor.tcl
Original file line number Diff line number Diff line change
Expand Up @@ -45,19 +45,10 @@ expect ":KILL"
copy_to_klfe "ucode;u1 ram"

# KLDDT
respond "*" ":cwd kldcp\r"
respond "*" ":macro\r"
respond "*" "klddt=klddt\r"
expect "CORE USED"
respond "*" "\003"
respond "*" ":kill\r"
respond "*" ":dec sys:link\r"
respond "*" "klddt/go\r"
respond "EXIT" ":start 45\r"
respond "Command:" "d"
respond "*" "\033y"
respond " " "kldcp; klddt bin\r"
respond "*" ":kill\r"
cwd "kldcp"
macro10 "klddt" "klddt"
linker "klddt"
decuuo "kldcp; klddt bin" "\033y"
respond "*" ":mcnvrt kldcp; klddt bin\r"
expect ":KILL"
move_to_klfe "kldcp; klddt a10"
Expand All @@ -68,8 +59,7 @@ expect ":KILL"

# KL10 front end debugger. Put it in the same directory as the
# "MC" IOELEV.
respond "*" ":palx sysbin;_syseng; klrug\r"
expect ":KILL"
palx "sysbin;" "syseng; klrug"
# 11STNK expects a copy in the . directory.
respond "*" ":copy sysbin; klrug bin, .;\r"

Expand All @@ -79,8 +69,7 @@ expect ":KILL"
respond "*" ":link .; ts boot11, sys1; ts 11stnk\r"

# KL10 diagnostics console program.
respond "*" ":palx kldcp;_kldcp\r"
expect ":KILL"
palx "kldcp;" "kldcp"
respond "*" ":11stnk\r"
respond "*" "R"
respond "FILENAME" "\r"
Expand All @@ -92,37 +81,34 @@ expect ":KILL"
move_to_klfe ".temp.; kldcp bin"

# KL10 diagnostic console utility
respond "*" ":palx kldcp;_kldcpu\r"
expect ":KILL"
palx "kldcp;" "kldcpu\r"
respond "*" ":pcnvrt kldcp; kldcpu bin\r"
move_to_klfe "kldcp; kldcpu a11"

# PDP-11 debugger.
# 16K is used with the DL10 IOELEV.
respond "*" ":palx .; 11ddt 16k_kldcp; 11ddt\r"
respond "PDP11=" "40\r"
respond "EISSW=" "0\r"
respond "MAPSW=" "0\r"
respond "HCOR=" "100000\r"
respond "TT10SW=" "0\r"
respond "VT05SW=" "0\r"
respond "DEBSW=" "0\r"
expect ":KILL"
palx ".; 11ddt 16k" "kldcp; 11ddt" {
respond "PDP11=" "40\r"
respond "EISSW=" "0\r"
respond "MAPSW=" "0\r"
respond "HCOR=" "100000\r"
respond "TT10SW=" "0\r"
respond "VT05SW=" "0\r"
respond "DEBSW=" "0\r"
}
# 14K is used with the console IOELEV.
respond "*" ":palx dsk0:.;11ddt 14k_kldcp; 11ddt\r"
respond "PDP11=" "40\r"
respond "EISSW=" "0\r"
respond "MAPSW=" "0\r"
respond "HCOR=" "70000\r"
respond "TT10SW=" "0\r"
respond "VT05SW=" "0\r"
respond "DEBSW=" "0\r"
expect ":KILL"
palx "dsk0:.;11ddt 14k" "kldcp; 11ddt" {
respond "PDP11=" "40\r"
respond "EISSW=" "0\r"
respond "MAPSW=" "0\r"
respond "HCOR=" "70000\r"
respond "TT10SW=" "0\r"
respond "VT05SW=" "0\r"
respond "DEBSW=" "0\r"
}

# The KL10 console "MC" IOELEV.
respond "*" ":palx .; cons11_system;ioelev\r"
respond "MACHINE NAME =" "MC\r"
expect ":KILL"
palx ".; cons11" "system;ioelev" { respond "MACHINE NAME =" "MC\r" }
respond "*" ":11stnk\r"
respond "*" "D"
respond "FILENAME" ".; 11ddt 14k\r"
Expand All @@ -138,16 +124,14 @@ move_to_klfe ".temp.; ioelev a11"
# The KL10 "MC-DL" IOELEV. Put in same directory as KLRUG BIN.
# TS BOOT11 stuffs it over DL10 in timesharing. TS 11BOOT makes a
# @ BOOT11 to stuff out of timesharing.
respond "*" ":palx sysbin;_system;ioelev\r"
respond "MACHINE NAME =" "MC\r"
expect ":KILL"
palx "sysbin;" "system;ioelev" { respond "MACHINE NAME =" "MC\r" }

# 11BOOT
respond "*" ":midas;324 sys3;ts 11boot_syseng;11boot\r"
expect ":KILL"
# Note, must be run with symbols loaded.
# Takes IOELEV BIN and KLRUG BIN from the current directory.
respond "*" ":cwd sysbin\r"
cwd "sysbin"
respond "*" "11boot\033\013"
expect ":KILL"
respond "*" ":move sysbin;@ boot11, .;\r"
Expand Down
1 change: 0 additions & 1 deletion build/ks10/include.tcl
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,6 @@ proc prepare_frontend {} {
pdset

respond "*" ":login db\r"
sleep 1
type ":vk\r"

respond "*" ":midas sysbin;_kshack;ksfedr\r"
Expand Down
4 changes: 2 additions & 2 deletions build/ks10/processor.tcl
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ log_progress "ENTERING BUILD SCRIPT: PROCESSOR"
# Programs particular to the KS10 processor.

# KNS10, KS10 console
respond "*" ":cwd kshack\r"
cwd "kshack"
respond "*" ":cross\r"
respond "*" "FOR21.DAT/PTP,KNS10.PNT/M80/OCT/CRF/EQ:PASS2:SCECOD=CONDEF.M80,HCORE.M80,CMDS.M80,SUBRTN.M80,DR.M80,MSG.M80,STORE.M80\r"
expect "Core used"
Expand All @@ -21,7 +21,7 @@ expect ":KILL"
respond "*" ":copy kshack; mcr ram, .; ram ram\r"

# Update microcode on frontend filesystem.
type ":ksfedr\r"
respond "*" ":ksfedr\r"
respond "!" "write\r"
respond "Are you sure" "yes\r"
respond "Which file" "ram\r"
Expand Down
4 changes: 2 additions & 2 deletions build/lisp.tcl
Original file line number Diff line number Diff line change
Expand Up @@ -787,7 +787,7 @@ respond "UKBD" "(quit)"
expect ":KILL"

# Lisp Logo
respond "*" ":cwd llogo\r"
cwd "llogo"
respond "*" ":complr\r"
respond "_" "germ\r"
respond "_" "ioc\r"
Expand Down Expand Up @@ -835,7 +835,7 @@ respond "_" "\032"
type ":kill\r"

# 2500 microcode
respond "*" ":cwd minsky\r"
cwd "minsky"
respond "*" "lisp\013"
respond "Alloc?" "n\r"
respond "*" "(setq gc-overflow '(lambda (x) t))"
Expand Down
4 changes: 2 additions & 2 deletions build/mark.tcl
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,9 @@ start_dskdmp_its

pdset
respond "*" ":login db\r"
sleep 1
type ":vk\r"

type $emulator_escape
respond "*" $emulator_escape
mount_tape "$out/minsrc.tape"

type ":dump\r"
Expand Down
Loading