Hello!
I have uVision that compiles fine with the C51 v7.03 compiler and the related package, but not complete with the 8.06. I used two different Keil installations. All files are in the same folder.
In the 8.06 I get linker errors like "object does not fit in to pdata page" and "0080H". This looks like the compiler was thinking the PDATA was only 128 bytes, but it is set to 256 bytes in the startup.a51. Any clue what's different in the newer Keil package?
Also there is a warning in 8.06 (which does not show in 7.03) "converting non-pointer to pointer" on this
ptr_xdata = sPtr_obj->Adresse;
while the vars are set like this:
uchar uc_set_obj( uchar pdata *ptr_Set) { uchar i; uchar xdata *ptr_xdata; struct stOBJADR code *sPtr_obj; sPtr_obj=&Obj[*ptr_Set]; . . . ptr_xdata = sPtr_obj->Adresse; }
The struct stOBJADR has a member "uint Adresse;"
I can see no wrong use of the pointers. I just want to be sure that the warning does not affect the code to not work correctly.
It shouldn't need saying yet another time, but apparently it does: No, that pointer is not of type uint. It's of type pointer-to-uint. A uint is not a pointer any more than a car is a driver's license. Staying in that image, you got a warning because you tried to put the car in your inside pocket. I'm just translating it from our language, Herr Broeker, to english. I don't know why the guys here are such nitpickers, but in german we say: Zeiger und Zeigertyp. Ein Zeiger, der auf eine uint-Variable zeigt, ist vom Typ uint. Und eine Zeigeradresse ist die Adresse, wo der Zeiger draufzeigt, und nicht seine eigene! Wie sollte man diese Adresse denn sonst nennen???
OK, in order to get this straight, folks: How do you call the adress the pointer points to? How do you call the value the pointer points to?
I don't know why the guys here are such nitpickers,
Because most of the responders earn their income by writing programs in C.
How do you call the adress the pointer points to?
Value/content of the pointer.
How do you call the value the pointer points to?
Content of the memory address referenced by the pointer.
Did you read all the other postings on this thread yet ? If not, could you do so and comment on whether they make things clearer ? Could you also answer the questions I asked about the -> operator ? I assume that much of the confusion you experience stems from a misconception on what this operator does, and to confirm that I could use the answer to those questions. Sorry if they sound a bit textbook-ish, but if things are like I think they are, then an explanation of this operator would clear them up quite a bit.
"I don't know why the guys here are such nitpickers"
If you consider this "nitpicking" to be a problem, then you going to struggle with any sort of computer programming.
Computer programming is all about accuracy & precision: computers are stupid machines, and will follow your instructions to the letter and without question. Therefore, if your instructions are anything but a completely accurate and precise representation of your requirement, you will not get what you expected!
I thought Germans should understand about accuracy and precision...
but in german we say:
No. We don't. You do. That, of course, is precisely the root of the problem. You confused yourself enormously by using such incoherent terminology
Ein Zeiger, der auf eine uint-Variable zeigt, ist vom Typ uint.
Nein, ganz sicher nicht. Ein solcher Zeiger ist vom Typ "Zeiger auf uint", oder auch "uint-Zeiger", wenn es gerade sehr eilig ist.
Wie sollte man diese Adresse denn sonst nennen???
Den Wert des Zeigers.