$FRAMESIZE

Top  Previous  Next

Action

Sets the available space for the frame.

 

 

Syntax

$FRAMESIZE = var

 

 

Remarks

Var

A numeric decimal value.

 

While you can configure the Frame Size 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 $FRAMESIZE directive overrides the value from the IDE Options.

 

It is important that the $FRAMESIZE directive occurs in your main project file. It may not be included in an $include file as only the main file is parsed for $FRAMESIZE.

 

noticeYou need a minimum frame size of 24 bytes. This space is used by a number of routines. For example string<>numeric conversion routines. If you use Print numVar, then the numeric variable "numvar" is converted into a string representation of the binary number. The framespace buffer is used for that. While the framespace server as dynamic memory, a fixed address is used. For this reason the buffer has a fixed size of 24 bytes.

 

 

See also

$SWSTACK, $HWSTACK

 

 

 

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