Re: A89: Memory Indirect Postindexed [Addressing] Mode


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

Re: A89: Memory Indirect Postindexed [Addressing] Mode




You don't have to worry about that one, unless you plan to program 68020 or
above. That addressing mode is non existent in 68000.
besides that, It says quite clearly how it works in the text on said page.

//Olle

Scott Noveck wrote:
> 
> Here's a question for anyone who _really_ knows their 68k well.  I guarantee
> it'll confuse the heck outta everyone here.
> 
> How do you use "Memory Indirect Postindexed [Addressing] Mode"???  The
> motorola syntax is:
> 
> ([bd,An],Xn.SIZE*SCALE,od)    [all 4 user-specified values are optional]
> 
> which can be found on page 2-11 of the Programmer's Reference Manual, along
> with a load of motorola technical terms and a pretty flowchart.  It appears
> to use two levels of indirection, although I can't find any realistic use
> for it (maybe a C compiler can?)
> 
> oh, and get this - it allows for up to FIVE extension words, or a single
> instruction of MORE THAN 12 BYTES!
> 
> if you use 'bsr routine' with this code, I THINK it should put $FFFFFFFF in
> d1.  I'm not sure if it assembles, but it seems to fit what the book says.
> Can someone tell me if this would work, or, if not, what the hell this
> addressing mode does and why it exists?
> 
> routine:                        ;all this should just be "st d1"
>  move.l d0,-(a7)                ;save d0
>  lea label1,a0                  ;base memory address
>  move.l #2,d0                   ;number of [words] to be added later
>  move.l (4,a0,d0.l,4),d1        ;first operand should be (label3) =
> $FFFFFFFF
>  move.l (a7)+,d0                ;restore d0
>  rts                            ;return
> 
> label1:
>   dc.l 0
>   dc.l label2                   ;label1 + 4
> 
> label2:
>  dc.l 0
>  dc.l 0
>  dc.l 0                         ;label2 + (2 * 2)
>  dc.l label3                    ;label2 + (2 * 2) + 4
> 
> label3:
>  dc.l $FFFFFFFF
> 
>     -Scott



Follow-Ups: References: