> On Feb 9, 3:34 am, marco.m.peter...@gmail.com wrote:> > Is Assembler Language essential in compiler construction? I've read a> > few e-Books on compiler construction and it always says that knowledge> > of assembly is essential.>> Frankly, most university first courses on compilers don't spend much> time on the back end of compilers; there just isn't time. And the> assembly languages of most modern processors are just too complex. I> would like to see the Java virtual machine or some other used virtual> machine be the target language for a first course on compilers, if> that is not already too much information. Students would find this> more interesting and useful than a faked machine language and more> reasonable than a real assembly language.

Another approach is to teach this in two stages using a real
processor. A few years ago (actually a lot of years ago) I used a
real processor and created documentation that eliminated all of the
redundant instructions.

I eliminated zero page specific addressing modes. I eliminated most of
the utility instructions like clear and complement registers. I
eliminated test instructions. This reduced the processor complexity
and in general it kept its functionality intact. This meant that in
the first round it minimized the time needed to become familiar with
the instruction set. The focus was on algorithmic optimization during
code generation.

The changes I made included creating a macro assembler for the new
reduced instruction set.

The second round could then focus on processor code generation
optimization.