Jeff Loeliger - 2007-10-10

Logged In: YES
user_id=1431918
Originator: YES

We will continune with the current plan of letting the assembler fit the commands into instructions and add specific syntax elements later to control ALU or RAM zero usage.

Email message between Jeff and Zoltan:

> How do you differentiate ALU clearing a register and using the RAM
> > zero feature to clear a register?
> >
> > diob = 0;
> > p = 0;
> >
> > Can be done in 1 instruction, but how do I specify which one is done
> > by the ALU and which by the RAM zero? Do I need to do something like:
> >
> > diob = 0 + 0;
> > p = 0;
> >
> > This shows that the first one is an ALU and the second is a RAM zero.
> > ALU operations always have 2 or 2 implied operands.

The idea was that the assembler works it out which way to do it,
depending on other operations performed by the ALU/memory. That is, if
you do an ALU operation, the the clear is done by a memory op, if you
do a memory op, then it's done by the ALU. I considered it the same
problem as when you write reg = 0; in which case it is an ALU operation
but it can be done by many different ways and instruction formats, so
it is up to the assembler to choose one. There is a preferential order:
for example, in case of zeroing p or diob the assembler would choose
ALU first (unless the ALU is already in use) and memory second, so in
your example diob would be loaded by ALU and p by memory (and go into
a single instruction).

However, if you want, we can use some syntax trickery, like your example
above to give the user absolute explicite control if optimisation is
off. Do you want that?