>> Compile time was measured. My favorite "bug" was the
>> many minutes it took to compile a constant expression
>> that involved shifting a constant INT_MAX bits by
>> performing that many 1-bit shifts.
>
> I don't know if this anecdote is an urban legend or if it really
> happened. I was told [a similar] story when I was interning as an operator
> at my alma mater, which was an IBM System/360 shop.
I heard it not from the grapevine, but from McKeeman himself.
Doug
> random small C programs with computable expected outputs
"computable" is subtle here. The only way to compute the
outputs was to run the program. McKeeman's trick was to
sic several completely unrelated compilers on the program
and let them vote on the answer.
Compile time was measured. My favorite "bug" was the
mmany minutes it took to compile a constant expression
that involved shifting a constant INT_MAX bits by
performing that many 1-bit shifts.
Doug
Doug's list is slightly off:
adb v7-v10
sdb v8-v10
sdb may actually have been in V7; I'm quite sure
it was present in 32/V. But it's not in the V7
manual.
adb and sdb were certainly working fine when I
arrived in 1127, but they still used ptrace
because nobody wanted to touch the code. I used
adb quite often (still would were it available
in modern worlds!), so I cared enough to take
it over, restructuring it quite a bit to make it
easier to retarget for different instruction
sets and byte orders, and of course to use /proc.
I also made some trivial, compatible changes to
how numbers were read and printed to conform to
Rob's Rule (of which I am also a fan) that what
a program presents as output it should also
accept as input.
sdb I wasn't as fond of, but I did want to get
rid of ptrace, so I tinkered it just enough to
accomplish that.
I do remember clearly celebrating the death of
ptrace by removing ptrace(2) from the copy of the
V8 manual in the UNIX Room. It took up two
pages, and they happened to be facing pages,
so I glued them together.
I wish it was as easy for others to have such
satisfaction these days.
Norman Wilson
Toronto ON
Brantley Coile just asked:
Looks like the mailman software works!
Say, do you know if there are any copies of the Gnot terminal schematics?
Brantley
I don't know, does anybody else know?
Cheers, Warren
> Sorry, I typed that in haste without testing. I don’t have a 2.11 system to try it on. However, reading the source code, I did that wrong. The args go on the stack, not in line with the code.
> mov $6, -(sp)
> mov a, -(sp)
> mov $1,-(sp)
> sys 4
Without suggesting that every helpful post should be tested, I find the superb https://unix50.org web emulator excellent for such things.
Many thanks to the folks hosting & maintaining this great resource!
> From: Jacob Ritorto
> I wonder if the differences are written up somewhere. I did try to look
> for more documentation but came up short.
Sounds like a perfect topic for a CHWiki page. :-) E.g. this one:
http://gunkies.org/wiki/Unix_V6_internals
which I did as a bit of an addendum to Lions, to explain rsav, qsav and ssav, and
similar topics.
I noticed in the comparison of your two binary files that the instructions
looked the same, but the a.out headers had a difference, but I didn't remember
the fields in the a.out header enough to know what the differences meant.
I thought I remembered doing an a.out page there, but apparently not. I
thought about doing one now, but decided it wasn't worth it; I just needed to
spin up my V6 system and do 'man a.out'! :-)
Noel
> From: Rob Pike
> Convenient though the shorthand may be, it always bothered me as
> inconsistent and misleading.
As someone who made very extensive use of procedure pointers (most notably in
upcalls, which never caught on, alas), I couldn't agree more.
Two very different things are happenging, but with the shorthand notation,
they share an identical representation. And for what? To save three characters?
Noel
> From: Derek Fawcus
> I think he means something like:
> (*((*((*((*f)()->g))()->h))()->i))()
So I've been confused by this thread, and I'm hoping someone can deconfuse me
- but I think I may have figured it out.
What's confusing me is that in C, the -> operator is followed by "an
identifier [which] designates a member of a structure or union object" (I
checked the spec to make sure my memory hadn't dropped any bits) - but g, h
above are arguments; so I couldn't figure out what was going on.
I think what may have happened is that initially the discussion was about C
("Pretty sure it was not in v7 C"), but then it switched to C++ - with which
I'm not familiar, hence my confusion - without explicitly indicating that
change (although the reference to Bjarne Stroustrup should been a clue). (And
that's why I thought "f()->g()->h()->i()" was ad hoc notation for "calls f(),
then calls g()".)
Am I tracking now?
Noel