Action
Sets the available space for the software stack.
Syntax
$SWSTACK = var
Remarks
Var |
A numeric decimal value. |
While you can configure the SW Stack in Options, Compiler, Chip, it is good practice to put the value into your code. This way you do no need the cfg(configuration) file.
The $SWSTACK directive overrides the value from the IDE Options.
It is important that the $SWSTACK directive occurs in your main project file. It may not be included in an $include file as only the main file is parsed for $SWSTACK
See also
Example
'--------------------------------------------------------------------------------
'name : adc.bas
'copyright : (c) 1995-2005, MCS Electronics
'purpose : demonstration of GETADC() function for 8535 or M163 micro
'micro : Mega163
'suited for demo : yes
'commercial addon needed : no
'use in simulator : possible
' Getadc() will also work for other AVR chips that have an ADC converter
'--------------------------------------------------------------------------------
$regfile = "m163def.dat" ' we use the M163
$crystal = 4000000
$hwstack = 32 ' default use 32 for the hardware stack
$swstack = 10 'default use 10 for the SW stack
$framesize = 40 'default use 40 for the frame space