ask help about Assembly Language

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 
已解决

ask help about Assembly Language

跳至解决方案
1,007 次查看
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  */

标签 (1)
0 项奖励
1 解答
414 次查看
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 项奖励
1 回复
415 次查看
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 项奖励