Email: Password: Remember Me | Create Account (Free)

Back to Subject List

Old thread has been locked -- no new posts accepted in this thread
???
11/08/01 13:13
Read: times


 
#16427 - RE: ReG. reentrant functions
Well thats correct ... infact i tried out doing it this way ...

// 8051 Initial C Source File
#include <stdio.h>
#include "sfr.h"

void _reentrant CreateArray();
void _InitSerialPort(void);
void Delay(void);

main()
{
// delete the following line if you do not want to use the 8051 serial port for i/o
//_InitSerialPort();
// TODO: Add your source code here
printf("TIMES FMn");
CreateArray();
while(1)
{
_ti=0;
_sbuf = '@';
Delay();
}
}

void _reentrant CreateArray()
{
int Block[256];
int *Point;
int Count;
Point=Block;
for(Count=0;Count<=255;Count++)
{
*Point=0x55;
Point++;
Delay();
_ti=0;
_sbuf = '*';
}
Point=Block;
for(Count=0;Count<=255;Count++)
{
if(*Point==0x55)
{
_ti =0;
_sbuf='>';
}
Point++;
Delay();
}
}

void Delay(void)
{
int Loop;
for(Loop=0;Loop<=3000;Loop++) ;
}

after compiling and linking this code , i referred to its map file ... that gave me a reference to the absolute address in the external RAM, at which the VIRTUAL STACK segment has been relocated .... now , using a dis-assembler, i tried viewing that particular external RAM segment ... i found it to be loaded with the desired contents ... so from this could i conclude that all the automatic variables , used by the reentrant function gets memory space in the VIRTUAL STACK SEGMENT ... could u please get this conclusion confirmed , sir ....

--Bhaskar

List of 14 messages in thread
TopicAuthorDate
ReG. reentrant functions            01/01/70 00:00      
RE: ReG. reentrant functions            01/01/70 00:00      
RE: ReG. reentrant functions            01/01/70 00:00      
RE: ReG. reentrant functions            01/01/70 00:00      
RE: ReG. reentrant functions            01/01/70 00:00      
RE: ReG. reentrant functions            01/01/70 00:00      
RE: ReG. reentrant functions            01/01/70 00:00      
RE: ReG. reentrant functions            01/01/70 00:00      
RE: ReG. reentrant functions            01/01/70 00:00      
RE: ReG. reentrant functions            01/01/70 00:00      
RE: ReG. reentrant functions - Peter            01/01/70 00:00      
RE: ReG. reentrant functions - Peter            01/01/70 00:00      
RE: ReG. reentrant functions - Peter            01/01/70 00:00      
RE: ReG. reentrant functions - Peter            01/01/70 00:00      

Back to Subject List