From: peter@ferranti.com (peter da silva)
Subject: Re: The need for an assembler (was: Favorite CPU)
Reply-To: peter@ferranti.com (Peter da Silva)
Organization: Xenix Support, FICC
Date: Tue, 1 Sep 1992 15:26:27 GMT

In article <1992Aug31.055948.14380@news.columbia.edu> lasner@watsun.cc.columbia.edu (Charles Lasner) writes:
> But this has nothing to do with any other argument!  Assembler programmers
> for years have learned model-dependent quirks, and where needed use
> conditional assembly to handle the problem, or macroes.

I see. And you can do this for the 68050 or 80586 today?

> All you have
> succeeded in saying is that there are compilers which may or may not generate
> punky code, and that you can affect changes to the relative punkiness of the
> code without any yardsticks for whether the code truly is or is not "worthy"
> compared to rewriting the application in assembler by a truly competent
> person.

I'm saying that the code is almost certainly not "worthy" *of* being hand-
hacked by a competant programmer in assembler.

[ list PDP-11 optimization of "jeq" to "beq" or "bne-jmp" ]

> There are demented assemblers out there.

That's not demented, that's a reasonable action for the assembler to take. If
I counted the bytes to the destination by hand I'd do the same thing, and it'd
have taken me more time.

Not to mention that about the only assembler I've used that *doesn't* at
least combine a bunch of unrelated opcodes under a single mnemonic was the
1802's, and that's one I implemented myself.

> True, but totally irrelevant.  Your perception of similarity importance is
> somewhat strange, and in any case shows nothing for the argument of abstraction
> as was stated.  If anything, it helps prove the usual one-to-one correspondance
> between assembler and machine language since they *better* be different.

You missed the point... the "mov"s in question aren't even in the same *family*
of opcodes. They may not even put the register specs in the same place in the
instruction. It's not like the PDP-11 where "MOV" and "MOVB" are variants of
the same opcode.

> >Only in CISC processors, and probably not even the majority for those.

> Is the PDP-8 a CISC?

That's one of those heavily debated points, isn't it. Is the 1802?

> >> Machine code as you describe it hasn't been used since the '50's, least of
> >> all by you :-).

> >I've written a lot of 1802 machine code in the course of hacking real-time,
> >implementing Forth and debugging my 1802 assembler. I've *still* got parts
> >of the 1802 machine code floating around in my head...

> That's not the same thing as you implied.  All assembler programmers use
> short sections of things like DEBUG assemble and unassemble commands for
> non-symbolic numerical assembler.  I can read PDP-8 octal dumps directly and
> tell you what's going on.

I don't know if I could do it now, but I've written substantial amounts of
code for the 1802 (not just debugging code) directly in hex, simply because I
didn't *have* an assembler handy (when you're working in the field with 4K
of ROM something's gotta give and it's not the application), and I've read
hex dumps directly. I've also read hex for the Z80, even if it's a pain (the
Z80 is better appreciated in octal). And for the PDP-11 (though that's gotten
pretty stale). I can beat my hairy assembler breast with the best of them. I
choose not to, because I've got better uses for my coding time than bumming
cycles. Not to mention engaging in this debate...

> Knowing the machine-level code of an architecture and occasionally dealing
> with it is not the same thing at all as writing in machine language, as
> was typically done in the '50's, where sometimes the attitude was that
> a utility to merely state what you could in machine language would be
> considered a waste of valuable machine time :-).

Well, it was a waste of valuable ROM space, which comes to the same thing.
-- 
Peter da Silva                                               `-_-'
$ EDIT/TECO LOVE                                              'U` 
%TECO-W-OLDJOKE Not war?                        Have you hugged your wolf today?
Ferranti Intl. Ctls. Corp.      Sugar Land, TX  77487-5012       +1 713 274 5180
Newsgroups: alt.folklore.computers