+91 9945200008     support@uttaracomputers.com
LOGIN     REGISTER    

Audio-19, page (Compilation) 17 - stack pointer content

0
0

Audio-19, page (Compilation) 17, under ‘another example’, we are showing x = 20; as ‘move.l 20, (sp+4)’.

Shouldn’t it just be the contents of sp (instead of sp+4) since we already did a ‘sub.a 4,sp’ previously?

I must be missing something obvious..

  • You must to post comments
0
0

(sp) is correct to refer to the new reference y.  But the instruction refers to variable x which is exactly 4 bytes above sp because of “sub sp,4” instruction !!

 

  • kes333@hotmail.com
    Understood. I wish I listened to that audio part one more time before asking. Sorry. :(
  • kes333@hotmail.com
    Understood. I wish I listened to that audio part one more time before asking. Sorry. :(
  • You must to post comments
Showing 1 result
Your Answer

Please first to submit.