Re: Time Gets Near For Agamemnon To Go



On Apr 16, 7:48 am, "Agamemnon" <agamem...@xxxxxxxxxxxxxxxx> wrote:
"Michael Urban" <ur...@xxxxxxxxx> wrote in message

news:gs7e6u$h6e$1@xxxxxxxxxxxxxxxxxxxx



In article <6OydnYZMG9tVznvUnZ2dnUVZ8r2dn...@xxxxxxxxxxxxxx>,
Agamemnon <agamem...@xxxxxxxxxxxxxxxx> wrote:

It's obvious you've never programmed a computer before. There's no
difference between machine code and assembly language other than the
former
is pure binary numbers and they latter is in the form of mnemonics which
are
converted to those numbers by something called an assembler.

Rubbish.  See below.

Back in the
days of the ZX81 and the ZX Spectrum I was programming directly in machine
code. Who needs an assembler when you've memorised the entire Z80
instruction set. When optimising mathematics it isn't a case of fine
tuning
the garbage produced by a compiler. It's garbage. It goes in the bin. All
compilers do is repeat code over and over again when it's not needed,
because that's how they work, and that slows the calculations down. A
compiler is the last thing you would use. Optimising mathematics means
writing it directly in machine code. If you ain't memorised the
instruction
set you could use an assembler, but only whimp would need one of those.

It's obvious that YOU've never actually tried to write anything
beyond trivial exercises in machine code.  Aside from 'memorising

Wrong.

the Z80 instruction set' the task involves many other things that
an assembler does for you.

Hint:
Insert an instruction into a machine-code program.  Now go back
and find and fix all the address references that changed as a result.

Easily enough done.



By comparison, insert an instruction into an assembler version
of the same program.

Assemblers are for whimps. If you understand the machine code then you don't
need one.

Ok, in addition to doing the rendering (and I provided the water
model, so you've no excuses on that part either), you should have no
problem with providing me with some machine-code. The MIPS is big-
endian or little-endian - it's software-flippable. So, if machine code
is identical to assembly, you should be able to write me a Mandelbrot
generator in machine code for the MIPS that will run in either state.
Hey, it can be done in assembly, and you say the two are the same.

I'll be fair and ask an 80x86 example as well. Provide me with an
assembly program that is dynamically relocatable and can be statically
configured to work with either 16-bit, 32-bit or 64-bit registers
without changing more than one line of code. Then provide me with a
machine-code program that can do the same, as a line-by-line
comparison. Show me that there is an exact 1:1 between the two.

It also seems extremely likely that you haven't looked at compiler
optimization technologies since the same era of the Z80, 30 years
ago.

Rubbish.

Hell, no. Aggy hasn't looked at compiler optimization at all. The
PETSpeed compiler had a four-pass optimizer that did a hell of a lot
more than instruction copying. I doubt Aggy comprehends much in the
way of compilers. He probably thinks the Dragon book refers to
something about Greek boats. He certainly doesn't understand the
mechanisms in, say, PGCC for Pentium-specific optimizations. Clearly,
since instructions are just "copied" in his world, there should be no
difference between C and Fortran in performance. If anything, C should
be faster as it's closer to assembly. Strange how it's the other way
round. I doubt Aggy has ever seen a parse tree and if his English is
anything to go by, the word "grammar" has no meaning to him either in
natural languages or EBNF. I sincerely doubt Aggy can explain the
differences between Microsoft's C++ compiler, that of Intel, Green
Hills or GCC. I doubt he even knew there were any differences, even if
he knew more than one compiler even existed. As for source-to-source
compiling and profile optimization - well, those are completely alien
to him. I'd say they were all Greek to him, as we know he can't speak
the language, but I don't want to encourage him.
.



Relevant Pages

  • Re: Assembler?
    ... Machine code IS assembler.. ... Compliers immediately introduce TRANSLATION from high level language to opcodes etc. ... Or it MAY use spare registers, or the processor MAY have a data stack pointer, or indeed any other method the compiler writers feel is optional may be used. ...
    (comp.os.linux.misc)
  • Re: linux elf
    ... > Both (machine code via assembler, ... >> In the case of the latter, if a C compiler were to translate to asm, ... > Well, object files contain object code, not assembler. ...
    (comp.os.linux.development.system)
  • Re: [Lit.] Buffer overruns
    ... Never heard of bootstrapping in compiler writing? ... in raw machine code, ... machine made of a new model there is not even an assembler ...
    (sci.crypt)
  • Re: Time Gets Near For Agamemnon To Go
    ... Who needs an assembler when you've memorised the entire Z80 ... When optimising mathematics it isn't a case of fine tuning ... compiler is the last thing you would use. ... writing it directly in machine code. ...
    (rec.arts.drwho)
  • Re: translating Python to Assembler
    ... program in machine code, which is all 1's and 0's. ... assembler has to be compiled in order to convert the opcodes to ... IMHO this "compilation" if trivial compared to HLL ... since it's just a translation from opcodes to numbers ...
    (comp.lang.python)