The following code: fwsUniChar c; fwsUniChar *temp; temp=p->inPtr; c = *temp; temp++; p->inPtr = temp; correctly increments the pointer p by 0x01 instead of fwsUniChar c = p->inPtr++; which incorrectly increments the pointer p by 0x101 This code compiles and runs correctly with ANSI C compilers Also routine1() reentrant { enum ElementTagType type; routine2(&type); } routine2(enum ElementTagType *type) { type = START_TAG; } does not work (i.e. type in routine1 is not set to START_TAG after calling routine 2. There is a default XBPSTACK Any Ideas Thanks Barry
I tried to duplicate the first problem using the following example code and couldn't:
struct info_st { char *ptr; int number_1; long number_2; }; char junk[] = "1234567890"; char *check_struct_ptr_inc (struct info_st *p) { volatile char c; c = *p->ptr++; return (c); } void main (void) { struct info_st ppp = { junk, 12, 123456789L }; check_struct_ptr_inc (&ppp); while (1); }
I am using version 7.06a (the latest version of the compiler)and a large memory model. I'll try your test program on Monday, and try to determine what the problem is. Thanks Barry
This simple example fails on the DS80C400. Before call PPP->PTR X:010676 After call PPP->PTR X:010777 The compiler does not work for the DS80C400.
Which simple example? Jon
Your simple example.
Hmmm. It works just fine here. Maybe we have different project options. I'm using LX51 and AX51 with LARGE memory model (variables in XDATA) and 512K contiguous mode. Jon
Jon, I am using the same tools for the Dallas 400 chip. Keil has reproduced both prolems and is working on a fix (I hope). I have also found another reentrant and &ptr problem. Which I have reported to Keil. Thanks for the simple example. Barry
I am using Contiguous Mode: 16MB program, if that matters.
For anyone else with these problems, each has been corrected and added to the knowledgebase. Refer to: http://www.keil.com/support/docs/2605.htm and http://www.keil.com/support/docs/2606.htm Jon