[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [f-cpu] Resume of Fcpu features



On Sun, Dec 02, 2001 at 10:40:01PM +0100, Yann Guidon wrote:
[...]
> > In fact, we have at least four modes:
> > 
> >         register (most instructions)
> >         indirect (2-operand load/store)
> >         indirect with postincrement (loadi, storei, 3-operand load/store)
> >         immediate (loadcons, loadaddr)
> > 
> 
> i'm sorry, but "addressing mode" is not "instruction format".
> loadcons and loadaddr are not considered as "addressing modes"
> because they don't access memory. furthermore,
> "indirect" is the same as "register" (in my own terminology).
> postincremented is not very different, there's only a bit more parallism.

This has always been a little bit confusing...

In my vocabulary, "addressing mode" means "where the operands come from".
"immediate" means: from the instruction, "register" means: it's stored
in a register, and "indirect" means, of course, that its *address*
is stored in a register, and the operand itself resides in memory.

One the other hand, one could claim that there are only "immediate" and
"register" modes (load/store take the address operand from a register,
and no instruction fetches its operands from memory directly, like Intel
CPUs do).

> the thing that i want being remembered is that there is only
> one way to access the memory. The programmer must remember to
> prepare the pointers in the registers as soon as possible,
> before using the register to effectively access data.

Then let's not waste time talking about "addressing modes", but say
what we mean: operands and results have to be moved from/to memory,
using the load and store instructions, and the memory address has to be
calculated explicitly.

-- 
 Michael "Tired" Riepe <Michael.Riepe@stud.uni-hannover.de>
 "All I wanna do is have a little fun before I die"
*************************************************************
To unsubscribe, send an e-mail to majordomo@seul.org with
unsubscribe f-cpu       in the body. http://f-cpu.seul.org/