Maker Pro
Maker Pro

My Vintage Dream PC

J

Joe Pfeiffer

Walter Bushell said:
Write a c compiler in c is the basic exercise.

That's a bigger exercise than needed to get the point across. When I
taught the class a couple of times I defined a small subset of C I
called Cb (pronounced C flat); it wsa written in C, lex, and yacc, and
generated Motorola HC11 code.
 
C

Charles Richmond

Joe said:
Charles Richmond said:
[snip...] [snip...] [snip...]

I knew an "auld fart" who took an early computer course at Michigan
State University in 1954. He was programming some incarnation of an
Illiac. In this early course, they programmed in *absolute* machine
code. He talked about adding several no-ops at the end of each loop,
so that more instructions could be added *without* changing the branch
address by simply replacing no-ops.

At that time for this machine, they used "KSNJFL" instead of "ABCDEF"
for the last six digits of hexidecimal. And so the "king size numbers
just for laughs" or "kind souls never josh fat ladies" mnemonics.

And I'd have to look it up, but there was actually a reason why the
character encoding they were using made KSNJFL sensible. One could
argue that meant the encoding wasn't sensible....
I "researched" this before and received the following information:

In "KSNJFL", each letter was represented by the correct decimal value
in the five-level teletype code that communicated with the computer.
The computer input was mainly paper tape produced by teletype.

Charlie Jones of the University of Iowa sent the following to me in
an email:

Here is the 5-level code used by Illiac, transcribed from THE ILLIAC
MINIATURE MANUAL, by John Halton, Digital Computer Laboratory File 260,
University of Illinois, Urbana, 1958, page 3. I have preserved the
layout as much as is possible using ASCII:


THE TAPE CODE
-------------
| Characters | n for 92 | Characters | n for 92
Tape Holes | F/S | L/S | Orders Tape Holes | F/S | L/S | Orders
---------------------------------- ----------------------------------

| o | 0 P 2F |O o | Delay Delay 3F
| o O| 1 Q 66F |O o O| $(Tab) D 67F
| o O | 2 W 130F |O o O | CR/LF CR/LF 131F
| o OO| 3 E 194F |O o OO| ( B 195F
| oO | 4 R 258F |O oO |L/S=Letter-Shift 259F
| oO O| 5 T 322F |O oO O| , V 323F
| oOO | 6 Y 386F |O oOO | ) A 387F
| oOOO| 7 U 450F |O oOOO| / X 451F
| Oo | 8 I 514F |OOo | Delay Delay 515F
| Oo O| 9 O 578F |OOo O| = G 579F
| Oo O | + K 642F |OOo O | . M 643F
| Oo OO| - S 706F |OOo OO|F/S=Number-Shift 707F
| OoO | N N 770F |OOoO | ' H 771F
| OoO O| J J 834F |OOoO O| : C 835F
| OoOO | F F 898F |OOoOO | x Z 899F
| OoOOO| L L 962F |OOoOOO| Space Space 963F
 
C

Charles Richmond

jmfbahciv said:
The university I went to had a grad level course which consisted of
writing a compiler. There were no classes.

So you just read books, wrote your own compiler, turned it in, and got
a grade??? *No* one was teaching you any of this???
 
C

Charles Richmond

Joe said:
That's a bigger exercise than needed to get the point across. When I
taught the class a couple of times I defined a small subset of C I
called Cb (pronounced C flat); it wsa written in C, lex, and yacc, and
generated Motorola HC11 code.

Isn't it *more* difficult to produce code for the 8-bit HC-11 than
it would be for the MC68000 ??? The MC68000 has a reasonable assembly
language/machine language for producing code. You can use actual
multiply and divide instructions rather than writing your own multiply
and divide *routines*. (You probably *gave* the students those routines
to call from the compiler binary output.)

And how about linkage to functions??? You *did* have functions???
 
C

Charles Richmond

jmfbahciv said:
<grin> I once had a secretary who would condemn anybody
who drank beer but would figure out how to spend an hour
making ditto copies.

/BAH

I had a friend who was a grad student. Once he went into the
department office and asked the secretary for some "dildo paper".
She just handed him some ditto paper and said nothing.
 
J

Joe Pfeiffer

Charles Richmond said:
Isn't it *more* difficult to produce code for the 8-bit HC-11 than
it would be for the MC68000 ??? The MC68000 has a reasonable assembly
language/machine language for producing code. You can use actual
multiply and divide instructions rather than writing your own multiply
and divide *routines*. (You probably *gave* the students those routines
to call from the compiler binary output.)

The HC11 has the huge advantage that it's the machine we use in our
assembly language class (we have them build a SBC and control LEGO
robots with it), so the students already know it and they know the
simulator we use for it.

It's also got multiply and divide instructions. The thing about a toy
language for a class, though is that if it didn't have them, the
language could be defined to not have them either (you have to have
enough operations to exercise operator precedence, but bitwise boolean
operations would suffice for that).
And how about linkage to functions??? You *did* have functions???

It's got push and pop instructions, pushes return addresses on the
stack, does indexed addressing....
 
J

Joe Pfeiffer

Charles Richmond said:
I had a friend who was a grad student. Once he went into the
department office and asked the secretary for some "dildo paper".
She just handed him some ditto paper and said nothing.

Dr. Freud, paging Dr. Freud to the white courtesy phone...
 
K

Kim Enkovaara

Ahem said:
The bad thing is that it's proprietary storage with no
available documentation on the storage format (at least there wasn't when I
used ClearCase). It was also fragile when I used it and hard to set up. It
may have improved but using it made me think fondly of CVS.

It's still proprietary. There might be some hope that the client side
will be opened now that IBM owns rational. They would still get the
money from the server side, and the client-computer support would be
easier.

CC is sometimes fragile, it needs administration. But on the other hand
it supports many features that the others don't. For example the
building avoidance is a nice feature in big environments i.e. if the
versioned file is already compiled in someones view it is just copied
over, not compiled.

CVS is something I don't like, SVN is CVS with steroids, but still quite
old fashioned. Especially branching etc. is quite bad in CVS, and was
quite bad in SVN until recently. But still ClearCase is much better if
huge amount of branches, labels etc is used. I also like the idea of the
new distributed VCS systems (git, bitkeeper etc.), they are the future I
would say. In distributed systems the single points of failure
are not there, and they scale nicely with the amount of developers.

--Kim
 
A

Ahem A Rivet's Shot

It's still proprietary. There might be some hope that the client side
will be opened now that IBM owns rational. They would still get the
money from the server side, and the client-computer support would be
easier.

CC is sometimes fragile, it needs administration. But on the other hand

Being fragile was an instant death issue for me - a VCS must not
lose data *ever*, when I tried it CC lost whole projects.
it supports many features that the others don't. For example the
building avoidance is a nice feature in big environments i.e. if the
versioned file is already compiled in someones view it is just copied
over, not compiled.

Scary - compilation is often sensitive to the environment.
CVS is something I don't like, SVN is CVS with steroids, but still quite
old fashioned. Especially branching etc. is quite bad in CVS, and was

Yes it is - but then I prefer to keep branching to a minimum and
use the "develop in head and merge to release branch" approach rather than
the "develop in a branch and merge to head" which I find to be unmanageable
no matter what tools are used.
quite bad in SVN until recently. But still ClearCase is much better if
huge amount of branches, labels etc is used. I also like the idea of the
new distributed VCS systems (git, bitkeeper etc.), they are the future I
would say. In distributed systems the single points of failure
are not there, and they scale nicely with the amount of developers.

You may well be right, although AFAIK they all lose the nice
feature of CVS that the RCS files it uses are readable and easily found. In
extremis you can even repair an RCS file with vi if you manage to break one
somehow.
 
J

jmfbahciv

Joe said:
Most CS departments have an undergrad class in compiler writing, in
which the term project is to write (for a toy language, of course).
They don't write it in machine code!

This was in the late 60s and the system was an IBM 1620.

/BAH
 
J

jmfbahciv

Charles said:
So you just read books,

What books? I don't recall ever seeing a text book.
wrote your own compiler, turned it in,

Not turned it in. Demo'ed it.
and got
a grade???

No grade. The compiler either worked or it didn't. When it worked,
you got an A.
*No* one was teaching you any of this???

I never got to take the class. and there wasn't anybody to
teach it. The people who did write one learned as they went.
They knew how a compiler was supposed to work because we had
FORTRAN II on the system.

/BAH
 
J

jmfbahciv

Joe said:
The HC11 has the huge advantage that it's the machine we use in our
assembly language class (we have them build a SBC and control LEGO
robots with it), so the students already know it and they know the
simulator we use for it.

It's also got multiply and divide instructions. The thing about a toy
language for a class, though is that if it didn't have them, the
language could be defined to not have them either (you have to have
enough operations to exercise operator precedence, but bitwise boolean
operations would suffice for that).


It's got push and pop instructions, pushes return addresses on the
stack, does indexed addressing....

Kewl. All of those are important. I'd add indirection.

/BAH
 
J

Joe Pfeiffer

jmfbahciv said:
Kewl. All of those are important. I'd add indirection.

If you mean memory-indirect addressing, no such luck. It's a nice
little machine, but not perfect...
 
M

Michael Wojcik

John said:
Just make sure the files are intact and that the VCS itself will be
runnable in the long term.

I have RCS archives that are more than 20 years old, which have been
moved from machine to machine and OS to OS, and which are still
perfectly usable. I can extract any version of the source they
contain, and all the metadata is available.

If RCS mysteriously stopped working tomorrow, and I couldn't get it
working again (unlikely, since I have all the sources, and I'm quite
familiar with them, having ported them from Unix to OS/2 and written a
distributed version for OS/400), I could still get the tip version of
the sources from the RCS files themselves, as they're plain ASCII with
reverse deltas in a simple markup language.

With a decent VCS, there shouldn't be any worries about it being
"runnable in the long term". The repository should be accessible as
long as the programs themselves remain relevant. When we can no longer
read ASCII files, I won't need those sources for anything.
 
M

Michael Wojcik

Kim said:
CVS is something I don't like, SVN is CVS with steroids, but still quite
old fashioned. Especially branching etc. is quite bad in CVS, and was
quite bad in SVN until recently.

Branching and merging is significantly better in CVSNT (particularly
thanks to mergepoints). I understand it's better yet in EVS, the
successor to CVSNT, though I haven't used EVS myself.

Branching and merging is now adequate in the current release of
Subversion, which has more or less caught up to CVSNT in terms of
mergepoints and has a better data model for branching and merging
filesystem changes.

Pre-mergepoint merging in Subversion and regular CVS is a horrible
mess. It's almost worse than it was with RCS; at least RCS didn't
pretend to do any of the bookkeeping for you.
 
S

Scott Lurndal

Kim Enkovaara said:
CC is sometimes fragile, it needs administration. But on the other hand
it supports many features that the others don't. For example the
building avoidance is a nice feature in big environments i.e. if the
versioned file is already compiled in someones view it is just copied
over, not compiled.

We did this with a modified version of cvs in the last 80's/early 90's.

scott
 
Top