So, I have discovered, to my astonishment, that the double-word version of the
DIV instruction on the PDP-11 won't do a divide if the result won't fit into
15 bits. OK, I can understand it bitching if the quotient wouldn't fit into 16
bits - but what's the problem with returning an unsigned quotient?
And, just for grins, the results left in the registers which hold the quotient
and remainer is different in the -11/23 (KDF11-A) and the -11/73 (KDJ11-A).
(Although, to be fair, the PDP-11 Architecture Manual says 'register contents
are unpredictable if there's an overflow'.)
Oh well, guess I'll have to redo my kludgy fix to gmtime() (the distributed
version of which in V6 qhas a problem when the number of 8-hour periods since
the epoch overflows 15 bits)! I guess I'll have to fix it for real, instead of
my kludgy fix (which extended it to work for 16-bit results). :-)
I discovered this when I plugged in an -11/73 to make sure the prototype QSIC
(our RK11/etc emulator for the QBUS) worked with the -11/73 as well as the
-11/23 (which is what we'd mostly been using - when we first started working
on the DMA and interrupts, we did try them both). I noticed that with the
-11/73, the date printed incorrectly:
Sun Mar 10 93:71:92 EST 1991
After a certain amount of poking and prodding, I discovered the issue - and
on further reading, discovered the limitation to 15-bit results.
For those who are interested in the details, here's a little test program that
displays the problem:
r = ldiv(a, b, d);
m = ldivr;
printf("a: 0%o %d. b: 0%o %d. d: 0%o %d.\n", a, a, b, b, d, d);
printf("q: 0%o %d. r: 0%o %d.\n", r, r, m, m);
and, for those who don't have V6 source at hand, here's ldiv():
mov 2(sp),r0
mov 4(sp),r1
div 6(sp),r0
mov r1,_ldivr
rts pc
So here are the results, first from a simulator:
tld 055256 0145510 070200
a: 055256 23214. b: 0145510 -13496. d: 070200 28800.
q: 0147132 -12710. r: 037110 15944.
This is _mathematically_ correct: 055256,0145510 = 1521404744., 070200 =
28800., and 1521404744./28800. = 0147132.
And on the -11/23:
a: 055256 23214. b: 0145510 -13496. d: 070200 28800.
q: 055256 23214. r: 037110 15944.
Note that the returned 'quotient' is simply the high part of the dividend.
And on the -11/73:
a: 055256 23214. b: 0145510 -13496. d: 070200 28800.
q: 055256 23214. r: 037110 15944.
Note that in addition to the quotient behaviour, as with the /23, the
'remainder' is the low part of the dividend.
Noel
> From: Paul McJones <paul(a)mcjones.org>
> I suspect the CPU architect (Gene Amdahl -- not exactly a dullard)
> intended programmers store array elements at increasing memory
> addresses, and reference an array element relative to the address of the
> last element plus one. This would allow a single index register (and
> there were only three) to be used as the index and the (decreasing)
> count.
I suspect the younger members of the list, who've only ever lived in a world
in which one lights ones cigars with mega-gates, so to speak, may be missing
the implication here.
Back when the 704 (a _tube_ machine) was built, a register meant a whole row
of tubes. That's why early machines had few/one register(s).
So being able to double up on what a register did like this was _HYYUUGE_.
Noel
On 3/17/2018 8:54 AM, Dave Horsfall <dave(a)horsfall.org> wrote:
> ... Was it the 704, or the 709? I recall that the
> array indexing order mapped directly into its index register or something
> ...
It first ran on the IBM 704, whose index registers subtracted (as did
the follow-on 709, 7090, etc), so array indexing went from higher memory
addresses to lower.
> The bookshelf: I had most of those books once; what's the one on the
> bottom right? It has a "paperback" look about it, but I can't quite make
> it out because of the reflection on the spine.
I'm not sure, and things have shifted since then on the shelves, but I
sent the original photo to your email address.
On 3/17/2018 12:22 PM, Steve Simon <steve(a)quintile.net> wrote:
> on the subject of fortran’s language, i remember hearing tell of a French version. anyone ever meet any?
Yes: here is the French version of the original Fortran manual, with
keywords in French (via
http://www.softwarepreservation.org/projects/FORTRAN/)
Anonymous. FORTRAN Programmation Automatique de L'Ordinateur IBM 704 :
Manuel du Programmeur. IBM France, Institut de Calcul Scientifique,
Paris. No date, 51 pages. Given to Paul McJones by John Backus.
http://archive.computerhistory.org/resources/text/Fortran/102663111.05.01.a…
Dave Horsfall <dave(a)horsfall.org> wrote:
> We lost computer pioneer John Backus on this day in 2007; amongst other
> things he gave us FORTRAN (yuck!) and BNF, which is ironic, really,
> because FORTRAN has no syntax to speak of.
I think of FORTRAN as having established the very idea of high-level programming languages. For example, John McCarthy’s first idea for what became LISP was to extend FORTRAN with function subroutines written in assembly language for list-manipulation. (He had to give up on this idea when he realized a conditional expression operator wouldn’t work correctly since both the then-expression and the else-expression would be evaluated before the condition was tested.) The original FORTRAN compiler pioneered code optimization, generating code good enough for the users at the physics labs and aerospace companies. For more on this compiler, see:
http://www.softwarepreservation.org/projects/FORTRAN/
Disclosure: I worked with John in the 1970s (on functional programming) — see:
http://www.mcjones.org/dustydecks/archives/2007/04/01/60/ .
Paul McJones
The first Internet domain, symbolics.com, was registered in 1985 at 0500Z
("Zulu" time, i.e. UTC).
--
Dave Horsfall DTM (VK2KFU) "Those who don't understand security will suffer."
> So what are its origins? Where did it first appear?
It was a direct copy from CTSS, which already had it
n 1965 when we BTL folk began to use it.
The greatest MOTD story of all time happened at CTSS.
To set the stage, the CTSS editor made a temp file,
always of the same name, in one's home directory.
The MOTD was posted by the administrator account.
The password file was plain text, maintained by
editing it.
And multiple people had access to the administrator
account.
It happened one day that one administrator was
working on the password file at the same time
another was posting MOTD. The result: the password
file (probably the most secret file on the system)
got posted as the MOTD (the most public).
Upon seeing the password file type out before him,
an alert user shut the machine down by writing
and running one line of assembly code:
HERE TRA *HERE
(The star is for indirect addressing, and indirection
was transitive.)
Doug
One of the things that's always fascinated me about Unix is the community
aspect; in particular, I imagine that in the early days when machines were
multiplexed among many simultaneous users, I wonder whether there was a
greater sense of knowing what others were up to, working on, or generally
doing.
I think of the /etc/motd file as being a part of this. It is, in some very
real sense, a way to announce things to the entire user community.
So what are its origins? Where did it first appear? I haven't dug into
this, but I imagine it was at Berkeley. What was it used for early on at
individual sites?
- Dan C.
> From: Dave Horsfall
> he would've been the registraNT, no?
Symbolics was the registrant.
I may have spoken too soon, Postel/ISI might not have been the registrar when
".com" was set up, so maybe it was someone at SRI/NIC. (The memory is dim.) I
don't remember how "MIT.EDU" got registered - I'm not sure if I did it. It
was definitely Jon handing out addresses, not SRI - I do recall us going to
Jon to get 128.30 & 31.
Noel
> From: Michael Kjörling
> the DNS RFCs (initially 1034, 1035) were only published in 1987...
Ah, those were later versions; the originals were:
0882 Domain names: Concepts and facilities. P.V. Mockapetris. November
1983.
0883 Domain names: Implementation specification. P.V. Mockapetris.
November 1983.
Both were updated by RFC0973 before being replaced by 1034/1035.
You might also want to look at:
0881 Domain names plan and schedule. J. Postel. November 1983.
0897 Domain name system implementation schedule. J. Postel. February 1984.
0921 Domain name system implementation schedule - revised. J. Postel. October 1984.
Note that ".com" didn't exist in the early revs.
Noel