The 68020 supports both preindexed and postindexed memory indirect addressing modes. What, in this context, are preindexing and postindexing? If only one of these addressing modes could be implemented, which do you think is the better alternative? Explain your reasoning with examples.
What will be an ideal response?
68020 memory indirect addressing allows you to access two levels of table in a single instruction. In the first
level, a table is accessed and a pointer located. That pointer takes you to a second table. Consequently the
68020 operation MOVE ([A0]),D0 is implemented in RTL as
[temp] ? [[A0]] ;read memory location pointed at by A0
[D0] ? [[temp]] ;read memory location pointed at by temp
This simple memory indirect addressing assumes basic one?dimensional tables are being accessed. Either table
could involve two or more dimensions and offsets. For example the table of vectors could be accessed by the
indirect address given by [X,A0,D1] where D1 is an index register and X is a constant. This is called preindexing
in 68020?speak because the indexing takes place on the first table search (the table of pointers).
The second table (the destination where the actual operands are stored) could also be indexed and the address
of the operand could be given by [pointer, D2,Y] where pointer is the pointer read from memory and D2 is a
register offset and Y a constant. This is called post indexing because it takes place during the second level table
search. (Note that this use of pre? and post?indexing is not the same as autoindexing or incrementing/decrementing where a pointer is updated before/after its use).
The full address with both pre? and post?indexing would be ([X,A0,D1],D2,Y]). However, as this requires three
registers and two constants to be specified, the 68020 permits only one index register to be used, either D1 or
D2.
If only one mode could be used, I would suggest that post?indexing is the better option because that allows
complex data structures to be searched.
You might also like to view...
To maintain backward compatibility of a document, save it as a ________ file
A) .doc B) .docx C) .dotm D) dotx
Suppose a program to print paychecks secretly leaks a list of names of employees earning more than a certain amount each month. What controls could be instituted to limit the vulnerability of this leakage?
What will be an ideal response?