1
0
mirror of https://github.com/PDP-10/its.git synced 2026-02-07 00:47:06 +00:00
Files
PDP-10.its/build/pdp10-ka/start
2020-01-26 18:15:54 +01:00

67 lines
1.1 KiB
Bash
Executable File

#!/bin/sh
TVCON=${TVCON:--2}
EXIT=:
trap "" QUIT INT TERM
started() {
EXIT="$EXIT;stop $1 $2"
trap "$EXIT" EXIT
echo "$1 started, pid $2"
}
stop() {
echo -n "Stopping $1... "
kill "$2" 2> /dev/null
sleep 2
kill -9 "$2" 2> /dev/null
echo "OK"
}
gt40() {
(sleep 3; tools/simh/BIN/pdp11 build/pdp10-ka/gt40 >gt40.log 2>&1) &
started GT40 "$!"
}
tv11() {
(sleep 3; tools/tv11/tv11 -s 4 -p 10011 localhost >tv11.log 2>&1) &
started TV-11 "$!"
}
tvcon() {
(sleep 4; tools/tv11/tvcon/tvcon $TVCON localhost >tvcon.log 2>&1) &
started "TV-console" "$!"
}
type340() {
cp build/pdp10-ka/run out/pdp10-ka/run
}
help() {
cat <<EOF
This start script takes several command line arguments:
help - Display this help text.
type340 - Enable the Type 340 display.
gt40 - Start a GT40 emulator.
tv11 - Start a TV-11 emulator.
tvcon - Start a TV display.
EOF
touch out/pdp10-ka/nohelp
}
sed 's/set dpy enabled/set dpy disabled/' < build/pdp10-ka/run > out/pdp10-ka/run
test -f out/pdp10-ka/nohelp || help
while test -n "$1"; do
"$1"
shift
done
tools/sims/BIN/pdp10-ka out/pdp10-ka/run
exit 0