From 6924a81e2b638983ecb5fde41c5185f1d0c55d36 Mon Sep 17 00:00:00 2001 From: Neil Webber Date: Mon, 2 Oct 2023 20:05:02 -0500 Subject: [PATCH] cleanup --- boot.py | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git a/boot.py b/boot.py index a42b53f..3374f40 100644 --- a/boot.py +++ b/boot.py @@ -114,14 +114,19 @@ def boot_bin(p, fname, /, *, addr=0, deposit_only=False, return addr if deposit_only else None +def make_unix_machine(loglevel='INFO'): + p = PDP1170(loglevel=loglevel) + + p.associate_device(KW11(p.ub), 'KW') # line clock + p.associate_device(KL11(p.ub), 'KL') # console + p.associate_device(RPRM(p.ub), 'RP') # disk drive + return p + + def boot_unix(p=None, loglevel='INFO'): if p is None: - p = PDP1170(loglevel='INFO') - - p.associate_device(KW11(p.ub), 'KW') # line clock - p.associate_device(KL11(p.ub), 'KL') # console - p.associate_device(RPRM(p.ub), 'RP') # disk drive + p = make_unix_machine(loglevel=loglevel) # load, and execute, the key-in bootstrap boot_hp(p)