-
Notifications
You must be signed in to change notification settings - Fork 71
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
bc.s compile error #84
Comments
bc.s will not assemble standalone but rather as a very particularly ordered
B compile/link invocation. That said, I have not fully tested bc.s because
I believe it adds interactive tracing to a B program which I honestly never
needed (and it also possibly requires a special display.) But we should
get that working!
|
I have seen examples of BC being used on YouTube. I would love to figure out how to compile this as well. Writing B code is possibly the only reason to really play around with Unix v0 IMO. It seems that the folks at the LivingComputer Museum figured this out. |
diff --git a/src/cmd/bc.s b/src/cmd/bc.s
index 4d1ed6a..3738119 100644
--- a/src/cmd/bc.s
+++ b/src/cmd/bc.s
@@ -1,6 +1,12 @@
"** 06-5-12.pdf page 7
" bc
+" bit 0: dtrace
+" bit 1: ddisp
+" bit 2: histog
+" bit 3: stop
+trmode = 001
+
jmp start
rinit:
jms initio
@@ -11,7 +17,7 @@ initio: 0
jmp rinit
jms inter
inter: 0
- las
+ law trmode " load trace mode (was: las)
and o17
sza
jms trace
@@ -46,15 +52,15 @@ trace: 0
and d1
sza
jms dtrace
- las
+ law trmode " load trace mode (was: las)
and d2
sza
jms ddisp
- las
+ law trmode " load trace mode (was: las)
and d4
sza
jms histog
- las
+ law trmode " load trace mode (was: las)
and d8
sza
jmp stop You can then assemble a B program with it:
The "multiply defined" warnings can be safely ignored. Running the resultant assembled program with "dtrace" mode on spits out a line for every B interpreter opcode, like this:
The fields are: address, opcode, arguments. The other modes are less interesting. |
Neat. Since "las" reads the console switches so you twiddle the
settings at runtime with simh "dep sr NNN"
|
kato:pdp7-unix tom$ tools/as7 src/cmd/bc/bc.s
I
II
src/cmd/bc/bc.s
src/cmd/bc/bc.s:3: start not defined
src/cmd/bc/bc.s:9: fetch not defined
src/cmd/bc/bc.s:17: pc not defined
src/cmd/bc/bc.s:19: pc not defined
src/cmd/bc/bc.s:23: sp not defined
src/cmd/bc/bc.s:35: sp not defined
src/cmd/bc/bc.s:36: t1 not defined
src/cmd/bc/bc.s:37: t1 not defined
src/cmd/bc/bc.s:45: d1 not defined
src/cmd/bc/bc.s:53: d4 not defined
src/cmd/bc/bc.s:59: stop not defined
src/cmd/bc/bc.s:63: pc not defined
src/cmd/bc/bc.s:70: putc not defined
src/cmd/bc/bc.s:76: putc not defined
src/cmd/bc/bc.s:78: putc not defined
src/cmd/bc/bc.s:87: putc not defined
src/cmd/bc/bc.s:92: putc not defined
src/cmd/bc/bc.s:93: flush not defined
src/cmd/bc/bc.s:100: dp not defined
src/cmd/bc/bc.s:104: pc not defined
src/cmd/bc/bc.s:106: sp not defined
src/cmd/bc/bc.s:108: lastv not defined
src/cmd/bc/bc.s:111: B not defined
src/cmd/bc/bc.s:112: pbs not defined
src/cmd/bc/bc.s:120: dp not defined
src/cmd/bc/bc.s:121: t1 not defined
src/cmd/bc/bc.s:122: t2 not defined
src/cmd/bc/bc.s:124: t1 not defined
src/cmd/bc/bc.s:129: t2 not defined
src/cmd/bc/bc.s:131: t2 not defined
src/cmd/bc/bc.s:132: t1 not defined
src/cmd/bc/bc.s:133: d1 not defined
src/cmd/bc/bc.s:134: t3 not defined
src/cmd/bc/bc.s:135: t3 not defined
src/cmd/bc/bc.s:137: t1 not defined
src/cmd/bc/bc.s:138: t1 not defined
src/cmd/bc/bc.s:142: t2 not defined
src/cmd/bc/bc.s:163: lastv not defined
src/cmd/bc/bc.s:164: lastv not defined
src/cmd/bc/bc.s:174: pbs not defined
src/cmd/bc/bc.s:179: pc not defined
src/cmd/bc/bc.s:183: t1 not defined
src/cmd/bc/bc.s:184: t1 not defined
src/cmd/bc/bc.s:195: t1 not defined
src/cmd/bc/bc.s:196: lastv not defined
src/cmd/bc/bc.s:197: lastv not defined
src/cmd/bc/bc.s:199: dm1 not defined
src/cmd/bc/bc.s:202: dsm not defined
src/cmd/bc/bc.s:203: t1 not defined
src/cmd/bc/bc.s:213: n not defined
src/cmd/bc/bc.s:214: b not defined
src/cmd/bc/bc.s:234: flush not defined
src/cmd/bc/bc.s:235: d1 not defined
src/cmd/bc/bc.s:237: stop not defined
src/cmd/bc/bc.s:239: flush not defined
src/cmd/bc/bc.s:240: d1 not defined
src/cmd/bc/bc.s:242: stop not defined
src/cmd/bc/bc.s:244: flush not defined
src/cmd/bc/bc.s:245: d1 not defined
src/cmd/bc/bc.s:247: stop not defined
src/cmd/bc/bc.s:278: ecla not defined
src/cmd/bc/bc.s:280: putc not defined
The text was updated successfully, but these errors were encountered: