ask help about Assembly Language

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

ask help about Assembly Language

Jump to solution
999 Views
robert_zhang
Contributor I

i study assembly language now,in function asm_set_ipl:

i see a instruction as following,but i dont konw the meaning of 8 that at the left of a6.in programer reference datasheet,i dont find the explanation,who can help me or tell me where can find some stuff about it?

    move.l  8(A6),D6    /* get argument  */

Labels (1)
0 Kudos
1 Solution
406 Views
pgo
Senior Contributor V

Dear Robert,

 

 The instruction loads a longword (4 bytes) from the memory address calculated from the sum of A6 and an offset of 8 from the instruction.  The longword is loaded into D6.

 

An example with numbers:

 

Say A6 contains 0x10000

mem[0x10008..0x1000B] => D6

 

It is likely that A6 is being used as a frame pointer and the 8 is an offset into the stack frame used to pass parameters to the function (from C code?).

 

bye

View solution in original post

0 Kudos
1 Reply
407 Views
pgo
Senior Contributor V

Dear Robert,

 

 The instruction loads a longword (4 bytes) from the memory address calculated from the sum of A6 and an offset of 8 from the instruction.  The longword is loaded into D6.

 

An example with numbers:

 

Say A6 contains 0x10000

mem[0x10008..0x1000B] => D6

 

It is likely that A6 is being used as a frame pointer and the 8 is an offset into the stack frame used to pass parameters to the function (from C code?).

 

bye

0 Kudos