Sign in

username:

password:



Not a member?

Search basicx



Search tips

Subscribe to basicx



basicx by Keywords

Accelerometer | ADC | ADXL | Adxl20 | AVR | BasicStamp | BX-35 | BX28 | BX35 | COM3 | Compiler | Downloader | EEPROM | Electromagnet | GetADC | GP2D1 | GPS | I2C | IDE | Keypad | LCD | LCD+ | MIDI | Motors | Multitasking | Netmedia | Networking | PCB | PID | PlaySound | PWM | Relays | RTC | Servo | ShiftOut | SitePlayer | SPI | Stack | Timer | USB


Ads

Discussion Groups

See Also

DSPFPGAElectronics

Discussion Groups | BasicX | Stack, Local and global memory allocation

Discussion forum for the BasicX family of microcontroller chips.

Stack, Local and global memory allocation - Brad Watts AMT Inc. - Sep 23 12:23:00 2002

Hi;
Here's a question to see who really understands memory location on the
BX-24...

When setting up a queue for communications on Com1, I can declare them
either as global or in the Sub Main as local. If declared local, they can be
passed ByRef to other subroutines and the function is the same as declaring
them as Global. what I noticed is that if they are declared as local, the
memory map shows more Ram available to the stack. Questions:

1. Will either method give more Stack space than the other?
2. If the stack was to over-write the Ram, what would go first: Local
variables in the offending sub (which could be the same memory location as
other local variables in other routines) or global variables?
3. Does anyone have a good test for checking stack Vs variable ram space?
( can ya cut-paste-send it??)

Cheers

Brad.




(You need to be a member of basicx -- send a blank email to basicx-subscribe@yahoogroups.com )