+ compile time stack size setting

This commit is contained in:
carl 1998-08-17 12:28:21 +00:00
parent 26319a738a
commit 6937b1128a

View File

@ -26,7 +26,7 @@
| |
| useful constants | useful constants
| |
MINSTK = 8192 | Minimum 1K stack size MINSTK = 16384 | Minimum 16K stack size
MARGIN = 512 | Minimum memory to return to OS MARGIN = 512 | Minimum memory to return to OS
| |
@ -100,14 +100,10 @@ _start:
| calculate new stack size (store in d2) | calculate new stack size (store in d2)
| |
| ASSUME 8K STACK FOR THE MOMENT. | ASSUME 8K STACK FOR THE MOMENT.
| movel __stklen,a2 | a2 = &_STKSIZ movel __stklen,d2 | d2 = _STKSIZ
| movel a2,d2 | if __STKSIZ is undefined tstl d2 | if __STKSIZ is zero
bra minimum | use MINSTK beq minimum | use MINSTK
movel a2@,d2 | if __STKSIZ is positive bra setstk | use __STKSIZ
bpl setstk | use __STKSIZ
addl d3,d2 | if __STKSIZ is negative
cmpl #MINSTK,d2 | try (free space + __STKSIZ)
bge setstk | if < MINSTK
minimum: minimum:
movel #MINSTK,d2 | use MINSTK movel #MINSTK,d2 | use MINSTK
| |