Cannot boot TOPS‑20 from the panel switches
Nobody has claimed this yet.
Assessment
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Newbie friendliness
- 88/100
- Issue type
- Bug
- Clarity
- Clearly specified
- Activity status
- Active
- Tech stack
- awk, shell
- Domain
- cli, operating-systems
Research direction
Start in pdpcontrol.sh at the awk lookup that matches the scansw10 result against systems/selections. Reproduce with the 0200 entry and pdpcontrol start, then verify that the lookup selects tops20 rather than hills-blinky. Done means the panel value matches the selection entry as text without breaking the fallback.
Written by the indexing model from the issue text.
Description
Overview
In pdpcontrol.sh of PiDP‑10, the logic that matches the panel switch value (the return code of scansw10) against systems/selections fails to detect the correct entry.
As a result, even when the panel switch is set to 0200 (TOPS‑20), the system always falls back to hills-blinky instead of booting TOPS‑20.
Cause
The comparison in awk is performed as a numeric comparison, not a string comparison.
In awk, a number with a leading zero (e.g., 0200) is interpreted as octal:
0200 (octal) = 128 (decimal)
$1 in systems/selections is the string "0200"
→ when coerced to a number, it becomes 200 (decimal)
Therefore:
128 ≠ 200
The comparison fails, and the fallback value (hills-blinky) is selected.
Problematic Code (pdpcontrol.sh)
sel=`awk '$1 == '$sys' { sys = $2; exit } END { if(sys) print sys; else print "hills-blinky" }' < /opt/pidp10/systems/selections`
Here:
$1 == 0200
is treated by awk as a numeric (octal) comparison, not a string comparison.
Steps to Reproduce
Ensure systems/selections contains the entry:
コード
0200 tops20
Set the panel switch to 0200.
Run:
pdpcontrol start
The system incorrectly selects hills-blinky instead of tops20.
Proposed Fix (use string comparison)
Pass the shell variable to awk as a string, ensuring $1 is compared as text:
sel=`awk '$1 == "'$sys'" { sys = $2; exit } END { if(sys) print sys; else print "hills-blinky" }' < /opt/pidp10/systems/selections`
This forces:
$1 == "0200"
which correctly matches the entry in systems/selections.
- Dominant language
- C
- Stars
- 47
- Forks
- 11
- PR merge metrics
- No merged PRs in 30d
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from obsolescence/pidp10
-
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
obsolescence/pidp10#30 · 4 comments ·
-
Difficulty 4/5 3-5 days Newbie friendliness 45/100
obsolescence/pidp10#31 ·
-
Difficulty 4/5 3-5 days Newbie friendliness 25/100
obsolescence/pidp10#29 · 4 comments ·
-
Arch installs Open
Difficulty 2/5 1-3 hours Newbie friendliness 45/100
obsolescence/pidp10#26 ·
-
Difficulty 1/5 Under an hour Newbie friendliness 48/100
obsolescence/pidp10#24 · 1 comment · 1 reaction ·
All issues in obsolescence/pidp10
Similar issues
-
level/task module/gcp type/bug
Difficulty 2/5 1-3 hours Newbie friendliness 85/100
-
Difficulty 1/5 Under an hour Newbie friendliness 86/100
hapostgres/pg_auto_failover#1190 ·
-
docs
Difficulty 1/5 Under an hour Newbie friendliness 85/100
-
P3 sonic-vpp
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
sonic-net/sonic-buildimage#29662 ·
-
Difficulty 1/5 Under an hour Newbie friendliness 94/100
spack/spack-packages#6586 ·