View Single Post
Old 16 June 2019, 17:11   #5
Docent
Registered User
 
Join Date: Mar 2019
Location: Poland
Posts: 59
Quote:
Originally Posted by Thomas Richter View Post
There is no crash on a real machine in this case, either. The 68K family always aligns its stack, so "subq.l #1,a7" does not quite do what you expect it to do. The same holds for "move.b d0,-(a7)" or similar instructions.
Stack is aligned to word address only in Postincrement Register Indirect
or Predecrement Register Indirect addressing modes. Subq.l should decrement a7 by 1 but the move.b d0, -(a7) will decrement by 2. Bsr does decrement stack while pushing return address on it (similar to -(a7)) , so it also aligns stack to word address.






Docent is offline  
 
Page generated in 0.05130 seconds with 11 queries