![]() |
![]() |
#1 |
Registered User
Join Date: Mar 2016
Location: Ozherele
Posts: 229
|
how can I save some stack space?
I have found out that the vanilla A500 doesn't support system calls working with filename patterns. So I have written a small library which can be used with any Amiga. Some functions in this library are recursive so I have to think how to reduce the stack load. The best way I know is to save only 16-bit data of pointers. So instead of a plain MOVEM.L I use
Code:
suba.l a3,a2 suba.l a3,a4 suba.l a3,a5 movem.w a2/a4/a5,-(sp) bsr parse movem.w (sp)+,a2/a4/a5 adda.l a3,a2 adda.l a3,a4 adda.l a3,a5 |
![]() |
![]() |
#2 | |
Registered User
Join Date: Jan 2008
Location: Warsaw/Poland
Age: 56
Posts: 2,042
|
Quote:
I dont know size of your a2/a3/a4 registers, but for your example, i will use next code: bsr.w parse lea xx(a3),a2 lea yy(a3),a4 lea zz(a3),a5 |
|
![]() |
![]() |
#3 |
Registered User
Join Date: Mar 2016
Location: Ozherele
Posts: 229
|
Thank you. It seems there are no easy ways to get less stack loading.
|
![]() |
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
Thread Tools | |
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
What order does Exec save the registers on the stack during a context switch? | bloodline | Coders. General | 2 | 21 February 2017 18:33 |
How much stack space do we need? | AGS | Coders. System | 3 | 18 March 2015 17:00 |
Space Quest III - save game issue - WHDLoad | dJOS | support.Games | 7 | 18 October 2012 02:45 |
Would this save disk space? | Djay | Coders. General | 4 | 03 August 2010 00:00 |
Balkanski Konflikt, Save the Earth & Space Checkers | tomcat666 | request.Old Rare Games | 10 | 04 March 2009 10:46 |
|
|