Hello ALL, I'm new in c166 programming and sorry for my questions.. I have a next question about L166 locating... 1. for ex. one defines NDATA (04000h-07FFFh) NDATA0 (04000h-07FFFh) and i have for ex. global variable int a; will be this variable cleared to zero or not and how it is defined to which class it belongs? 2.one have the next user classes.. NDATA(0xC000-0xE7FF) SDATA (0XE000-0XE7FF, 0XF600-0XFDFF), IDATA (0XF600-0XFDFF) these declaration use the same memory area, how can one use it , would you give me some simple sample code to see the difference.(when one should use sdata and how in this case this variable is declared in the code). 3.Difference between ICODE and NCODE? 4.is there some good manuals about configuration of start167.a66 and L166 Locator? Thank you for any reply, With best regards, A
1. DPP0 stands for Data Page Pointer 0 which addresses normally the first page inside a segment. If you read more about you will find that a segment is 64kB of memory size. Such a segment can be divided in pages of 16kB each. For addressing such a page you can use the DPP's. Normaly the DPP0 points to the system segment 0. How you can calculate I described in another thread, if you are interested in. What the standart access size is, that depends from the memory model, so that is related to your requirement of memory. It is quite sure not a fine hint, but that you have to read in the documentation of C166.pdf. 2. Where you make the assignments of the DPP's is equal, but I prefer, if I not change them inside the program to do this in Linker/Locator settings. 3. The #pragma renameclass is very good described with example in C166.pdf. You can use it, if you want to move your code inside the memory. With this pragma you can generate pieces of code you can control inside/with the Linker/Locator where you want to place it. The alarm.c - examples is quite good. I played with this and than it easy to understand. 4. Under µVision3 you can use the configuration wizard. Or if you are new with this stuff try DAvE (Infineons Code Generator) where you can produce a startup code and c-file templates in a graphical way. It is free of charge and you can download from Infineon WEB site. Hope this will help you. Stefan