View Single Post
Old 08 March 2019, 11:11   #226
phx
Natteravn
 
phx's Avatar
 
Join Date: Nov 2009
Location: Herford / Germany
Posts: 2,500
Quote:
Originally Posted by meynaf View Post
This is only Amiga ABI.
I wrote "most common ABI", because the m68k Unix ABIs (e.g. V.4) are the same as Amiga (when we disregard the FPU). I know Atari is different, at least for some TOS calls it trashes a2 and d2 - but not for all? And the Atari C-compilers mostly still apply the "common ABI". Didn't know about MacOS.

Quote:
Every routine must have some comment at start indicating what it does, what it takes, and what registers it alters (or preserves).
True. But when you decide that your project follows an ABI you only have to document saved registers when they are different from the ABI. And it saves you from checking the notes of every function you call, as long as you can be sure it follows the ABI. That's quite convenient, less chaotic and compatible with C.
phx is offline  
 
Page generated in 0.04692 seconds with 11 queries