View Single Post
Old 16 December 2015, 00:33   #14
Leffmann
 
Join Date: Jul 2008
Location: Sweden
Posts: 2,269
As long as you allocate, use, and deallocate, in the right order, it doesn't really matter.

One thing that could be good to know if you're playing with the stack like this: Exec uses your own stack when it switches tasks, so if you ever make multi-tasking programs then you can't use A7 as a general purpose register, it must always point to the top of your stack.

In your example here it's not necessary to save any registers, neither for the CLI nor the Workbench, you only need to remember to pass a return value in D0 for CLI programs, typically 0.
Leffmann is offline  
 
Page generated in 0.04221 seconds with 10 queries