* Re: [TUHS] One's complement (was: reviving a bit of WWB)
@ 2020-09-25 15:21 Noel Chiappa
2020-09-25 15:30 ` Warner Losh
0 siblings, 1 reply; 6+ messages in thread
From: Noel Chiappa @ 2020-09-25 15:21 UTC (permalink / raw)
To: tuhs; +Cc: jnc
> From: Warner Losh
> I'm pretty sure PDP-10 wasn't 1's compliment / was 2's compliment..
Just to confirm, I pulled out my PDP-10 Hardware Reference Manual; Vol I - CPU
(EK-10/20-HR-001), and it does indeed say (pg. 1-12): "The fixed-point
arithmetic instructions use 2's complement representations to do binary
arithmetic." Selah.
Noel
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [TUHS] One's complement (was: reviving a bit of WWB)
2020-09-25 15:21 [TUHS] One's complement (was: reviving a bit of WWB) Noel Chiappa
@ 2020-09-25 15:30 ` Warner Losh
2020-09-25 16:10 ` Ronald Natalie
0 siblings, 1 reply; 6+ messages in thread
From: Warner Losh @ 2020-09-25 15:30 UTC (permalink / raw)
To: Noel Chiappa; +Cc: The Eunuchs Hysterical Society
[-- Attachment #1: Type: text/plain, Size: 913 bytes --]
On Fri, Sep 25, 2020, 9:22 AM Noel Chiappa <jnc@mercury.lcs.mit.edu> wrote:
> > From: Warner Losh
>
> > I'm pretty sure PDP-10 wasn't 1's compliment / was 2's compliment..
>
> Just to confirm, I pulled out my PDP-10 Hardware Reference Manual; Vol I -
> CPU
> (EK-10/20-HR-001), and it does indeed say (pg. 1-12): "The fixed-point
> arithmetic instructions use 2's complement representations to do binary
> arithmetic." Selah.
>
Back in school, we had our machine organization course. When we learned
about 1's complement, the professor said "I've used a lot of machines that
had this. You will likely never see one with it. There are no operational
machines on campus with that." It stuck with me. We had a TOPS-20
machine... the odd turn of phrase was due to a professor that had a board
of unknown origin hanging on the wall that was a rumored to be a CDC or
similar... ah, the mid 80s...
Warner
>
[-- Attachment #2: Type: text/html, Size: 1533 bytes --]
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [TUHS] One's complement (was: reviving a bit of WWB)
2020-09-25 15:30 ` Warner Losh
@ 2020-09-25 16:10 ` Ronald Natalie
0 siblings, 0 replies; 6+ messages in thread
From: Ronald Natalie @ 2020-09-25 16:10 UTC (permalink / raw)
To: Warner Losh, Noel Chiappa; +Cc: The Eunuchs Hysterical Society
[-- Attachment #1: Type: text/plain, Size: 1014 bytes --]
The DECSystem20 (and the PDP-10 before) were 36 bit two's complement
machines. You had to go back to the PDP-1 if you want one's complement
in the DEC line. The CDCs and UNIVACs were the only ones that were
still kicking around in my era.
>>
>>Just to confirm, I pulled out my PDP-10 Hardware Reference Manual; Vol
>>I - CPU
>>(EK-10/20-HR-001), and it does indeed say (pg. 1-12): "The fixed-point
>>arithmetic instructions use 2's complement representations to do
>>binary
>>arithmetic." Selah.
>
>Back in school, we had our machine organization course. When we learned
>about 1's complement, the professor said "I've used a lot of machines
>that had this. You will likely never see one with it. There are no
>operational machines on campus with that."It stuck with me. We had a
>TOPS-20 machine... the odd turn of phrase was due to a professor that
>had a board of unknown origin hanging on the wall that was a rumored to
>be a CDC or similar... ah, the mid 80s...
Warner
[-- Attachment #2: Type: text/html, Size: 2527 bytes --]
^ permalink raw reply [flat|nested] 6+ messages in thread
* [TUHS] reviving a bit of WWB
@ 2020-09-19 1:51 Doug McIlroy
2020-09-20 18:42 ` arnold
0 siblings, 1 reply; 6+ messages in thread
From: Doug McIlroy @ 2020-09-19 1:51 UTC (permalink / raw)
To: tuhs
I would like to revive Lorinda Cherry's "parts".
Implicit in "revival" is dispelling the hundreds
of warnings from gcc -Wpedantic -Wall -Wextra.
Has anybody done this already?
Doug
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [TUHS] reviving a bit of WWB
2020-09-19 1:51 [TUHS] reviving a bit of WWB Doug McIlroy
@ 2020-09-20 18:42 ` arnold
2020-09-20 19:28 ` Will Senn
0 siblings, 1 reply; 6+ messages in thread
From: arnold @ 2020-09-20 18:42 UTC (permalink / raw)
To: tuhs, doug
Doug McIlroy <doug@cs.dartmouth.edu> wrote:
> I would like to revive Lorinda Cherry's "parts".
> Implicit in "revival" is dispelling the hundreds
> of warnings from gcc -Wpedantic -Wall -Wextra.
> Has anybody done this already?
>
> Doug
I haven't tried this. I do suggest starting with 'gcc -m32' so that
you're not fighting 64 bit issues at the same time as everything else.
HTH,
Arnold
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [TUHS] reviving a bit of WWB
2020-09-20 18:42 ` arnold
@ 2020-09-20 19:28 ` Will Senn
2020-09-20 20:12 ` Steve Nickolas
0 siblings, 1 reply; 6+ messages in thread
From: Will Senn @ 2020-09-20 19:28 UTC (permalink / raw)
To: arnold; +Cc: tuhs, doug
When I read Doug’s message. I figured it was sarcasm related to the voluminous warnings that are generated these days and was harkening back to some paper Lorinda Cherry wrote about how they were needless additions to the perfection that was the original C compiler (that’s sarcasm) that I had never seen before. When you responded as you did, i began to realize the error of my conception :). If I’m. understanding now, Doug wants to resurrect the Writer’s workbench amalgamation of tools, most of which were written by Lorinda Cherry and he’s wanting to eliminate all of gcc’s warnings. I suppose Lorinda Cherry might actually have approved of -Wall in principle, as there is a strong parallelism between grammars here.
When I teach student to use -Wall (with clang), I tell them that it’s very handy to see all of the warnings, but to only address those that they feel are value add, so to speak. I give the same advice to the writers I advise... just cuz Word tells you not to use passive voice, doesn’t mean that it isn’t often appropriate. One specific gcc/clang warning that I get a lot goes like this:
while(entry = getutxent()){
// Do stuff with entry;
}
Sure, it’s a tricky bit, but the printed fix is to add a set of do nothing parens:
while((entry = getutxent()))
Hardly edifying :).
Much better would ve the explicit compare:
while((entry = getutxent()) != NULL)
But even that implies the programmer isn’t capable of differentiating = and ==.
That said, most -Wall stuff is ok, and I’d love to see an up to date wwb kit with few to no warnings!
Good luck,
Will
Sent from my iPhone
> On Sep 20, 2020, at 1:42 PM, arnold@skeeve.com wrote:
>
> Doug McIlroy <doug@cs.dartmouth.edu> wrote:
>
>> I would like to revive Lorinda Cherry's "parts".
>> Implicit in "revival" is dispelling the hundreds
>> of warnings from gcc -Wpedantic -Wall -Wextra.
>> Has anybody done this already?
>>
>> Doug
>
> I haven't tried this. I do suggest starting with 'gcc -m32' so that
> you're not fighting 64 bit issues at the same time as everything else.
>
> HTH,
>
> Arnold
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [TUHS] reviving a bit of WWB
2020-09-20 19:28 ` Will Senn
@ 2020-09-20 20:12 ` Steve Nickolas
2020-09-24 2:25 ` Dave Horsfall
0 siblings, 1 reply; 6+ messages in thread
From: Steve Nickolas @ 2020-09-20 20:12 UTC (permalink / raw)
To: Will Senn; +Cc: tuhs, doug
[-- Attachment #1: Type: text/plain, Size: 457 bytes --]
On Sun, 20 Sep 2020, Will Senn wrote:
> while((entry = getutxent()))
>
> Hardly edifying :).
>
> Much better would ve the explicit compare:
>
> while((entry = getutxent()) != NULL)
>
> But even that implies the programmer isn’t capable of differentiating = and ==.
My version of that is "while (0!=(entry=getutxevent()))".
(Of course, that assumes NULL is 0, but I don't think I've run into any
architecture so braindead as to not have NULL=0.)
-uso.
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [TUHS] reviving a bit of WWB
2020-09-20 20:12 ` Steve Nickolas
@ 2020-09-24 2:25 ` Dave Horsfall
2020-09-24 2:33 ` Clem Cole
0 siblings, 1 reply; 6+ messages in thread
From: Dave Horsfall @ 2020-09-24 2:25 UTC (permalink / raw)
To: The Eunuchs Hysterical Society
On Sun, 20 Sep 2020, Steve Nickolas wrote:
> (Of course, that assumes NULL is 0, but I don't think I've run into any
> architecture so braindead as to not have NULL=0.)
I don't remember the details mow, but I recall an architecture where NULL
was -0... Turing save us from 1-complement machines!
-- Dave
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [TUHS] reviving a bit of WWB
2020-09-24 2:25 ` Dave Horsfall
@ 2020-09-24 2:33 ` Clem Cole
2020-09-25 0:18 ` [TUHS] One's complement (was: reviving a bit of WWB) Greg 'groggy' Lehey
0 siblings, 1 reply; 6+ messages in thread
From: Clem Cole @ 2020-09-24 2:33 UTC (permalink / raw)
To: Dave Horsfall; +Cc: The Eunuchs Hysterical Society
[-- Attachment #1: Type: text/plain, Size: 601 bytes --]
Dave: Seymour used ones complement on the 3000 and 6000 series.
Maybe there? The primary HLLs I used on the CDC boxes were FTN and
Pascal, but I would not be surprised if that was were you saw it.
On Wed, Sep 23, 2020 at 10:26 PM Dave Horsfall <dave@horsfall.org> wrote:
> On Sun, 20 Sep 2020, Steve Nickolas wrote:
>
> > (Of course, that assumes NULL is 0, but I don't think I've run into any
> > architecture so braindead as to not have NULL=0.)
>
> I don't remember the details mow, but I recall an architecture where NULL
> was -0... Turing save us from 1-complement machines!
>
> -- Dave
>
[-- Attachment #2: Type: text/html, Size: 1172 bytes --]
^ permalink raw reply [flat|nested] 6+ messages in thread
* [TUHS] One's complement (was: reviving a bit of WWB)
2020-09-24 2:33 ` Clem Cole
@ 2020-09-25 0:18 ` Greg 'groggy' Lehey
2020-09-25 0:22 ` Warner Losh
0 siblings, 1 reply; 6+ messages in thread
From: Greg 'groggy' Lehey @ 2020-09-25 0:18 UTC (permalink / raw)
To: Clem Cole; +Cc: The Eunuchs Hysterical Society
[-- Attachment #1: Type: text/plain, Size: 890 bytes --]
On Wednesday, 23 September 2020 at 22:33:38 -0400, Clem Cole wrote:
> Dave: Seymour used ones complement on the 3000 and 6000 series.
> Maybe there? The primary HLLs I used on the CDC boxes were FTN and
> Pascal, but I would not be surprised if that was were you saw it.
I think most of the bigger pre-IBM 360 machines used one's complement.
Didn't the PDP-10? I knew it not only from the CDC 3200 and 3800, but
primarily from Univac (1108 and 494). The Univac techies explained to
me that the primary arithmetic function was subtraction; addition was
subtracting the complement. And that worked faster with one's
complement.
Greg
--
Sent from my desktop computer.
Finger grog@lemis.com for PGP public key.
See complete headers for address and phone numbers.
This message is digitally signed. If your Microsoft mail program
reports problems, please read http://lemis.com/broken-MUA
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 163 bytes --]
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [TUHS] One's complement (was: reviving a bit of WWB)
2020-09-25 0:18 ` [TUHS] One's complement (was: reviving a bit of WWB) Greg 'groggy' Lehey
@ 2020-09-25 0:22 ` Warner Losh
2020-09-25 1:39 ` John Cowan
0 siblings, 1 reply; 6+ messages in thread
From: Warner Losh @ 2020-09-25 0:22 UTC (permalink / raw)
To: Greg 'groggy' Lehey; +Cc: The Eunuchs Hysterical Society
[-- Attachment #1: Type: text/plain, Size: 842 bytes --]
On Thu, Sep 24, 2020 at 6:20 PM Greg 'groggy' Lehey <grog@lemis.com> wrote:
> On Wednesday, 23 September 2020 at 22:33:38 -0400, Clem Cole wrote:
> > Dave: Seymour used ones complement on the 3000 and 6000 series.
> > Maybe there? The primary HLLs I used on the CDC boxes were FTN and
> > Pascal, but I would not be surprised if that was were you saw it.
>
> I think most of the bigger pre-IBM 360 machines used one's complement.
> Didn't the PDP-10? I knew it not only from the CDC 3200 and 3800, but
> primarily from Univac (1108 and 494). The Univac techies explained to
> me that the primary arithmetic function was subtraction; addition was
> subtracting the complement. And that worked faster with one's
> complement.
>
Don't know about the others, but I'm pretty sure PDP-10 wasn't 1's
compliment / was 2's compliment..
Warner
[-- Attachment #2: Type: text/html, Size: 1278 bytes --]
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [TUHS] One's complement (was: reviving a bit of WWB)
2020-09-25 0:22 ` Warner Losh
@ 2020-09-25 1:39 ` John Cowan
0 siblings, 0 replies; 6+ messages in thread
From: John Cowan @ 2020-09-25 1:39 UTC (permalink / raw)
To: Warner Losh; +Cc: The Eunuchs Hysterical Society
[-- Attachment #1: Type: text/plain, Size: 1038 bytes --]
On Thu, Sep 24, 2020 at 8:22 PM Warner Losh <imp@bsdimp.com> wrote:
Don't know about the others, but I'm pretty sure PDP-10 wasn't 1's
>> compliment / was 2's compliment..
>
>
Correct. The PDP-1 (18 bits) was DEC's 1's complement machine. Its direct
successors the 4/7/9/15 had both 1's and 2's complement arithmetic. The
12-bit 5/8/12 machines had only 2's complement, but retained the PDP-4
mnemonic TAD (Two's-complement Add). By the time the 36-bit 6/10/20 line
was designed, it was clear that 1's complement was history, and the
mnemonic was changed to ADD.
(The PDP-3 was a PDP-1 with a 36-bit data path, and only one ever went into
production; the PDP-2 was to be a 24-bit machine, perhaps a compromise
between 6-bit and 8-bit byte systems, but was never even designed.)
John Cowan http://vrici.lojban.org/~cowan cowan@ccil.org
I marvel at the creature: so secret and so sly as he is, to come sporting
in the pool before our very window. Does he think that Men sleep without
watch all night? --Faramir
[-- Attachment #2: Type: text/html, Size: 1841 bytes --]
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2020-09-25 16:17 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-09-25 15:21 [TUHS] One's complement (was: reviving a bit of WWB) Noel Chiappa
2020-09-25 15:30 ` Warner Losh
2020-09-25 16:10 ` Ronald Natalie
-- strict thread matches above, loose matches on Subject: below --
2020-09-19 1:51 [TUHS] reviving a bit of WWB Doug McIlroy
2020-09-20 18:42 ` arnold
2020-09-20 19:28 ` Will Senn
2020-09-20 20:12 ` Steve Nickolas
2020-09-24 2:25 ` Dave Horsfall
2020-09-24 2:33 ` Clem Cole
2020-09-25 0:18 ` [TUHS] One's complement (was: reviving a bit of WWB) Greg 'groggy' Lehey
2020-09-25 0:22 ` Warner Losh
2020-09-25 1:39 ` John Cowan
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).