MPLAB-C works the same way. For example if you want to store a long and work with the high and low bytes individually you would do this (because MPLAB-C has math trouble with longs): unsigned long a; unsigned char al @ a; // low byte unsigned char ah @ a+1; // high byte These RAM locations are *NOT* reserved. To reserve memory find the line in the PICName.h file (or similar): #pragma memory RAM [MAXB0 - 0x26] @ 0x26; // first 0x25 locations reserved and change it to: #pragma memory RAM [MAXB0 - 0x28] @ 0x28; // reserve two additional bytes Then unsigned long a @ 0x26; unsigned char al @ a; // low byte unsigned char ah @ a+1; // high byte a, al, ah will not be used by the compiler to assign any other variables. rich At 05:00 PM 4/14/98 -0700, you wrote: >On Tue, 14 Apr 1998, John Bellini wrote: > >> How do you redefine the following from Byte Craft C compiler to HITECH? >> The HITECH C compiler keeps giving me a "constant expression required" >> error. >> >> char val[10] @ string[32]; // note this resides within string[] >> char val2[7] @ string[42]; // saved string for 2 variable displays > >I would imagine you could do this using proper C with the Hi-Tech >compiler by using a union. The Hi-Tech compiler uses "@" to locate >variables at specific hardware addresses; that's why you're getting the >"constant expected" error -- it's looking for a physical memory address. > >> It also does not like this sort of definition. >> bits special; // special handling, bank max. >> bits system_flags1; // system flags >> bits system_flags2; // system flags > >Look at Hi-Tech's "bit" type. > >> I looked at the help section but there is not much about what you can >> and cannot do in regards to C syntax. > >All of the above is documented in the manual that's on the CD in the >"Features and Runtime Environment" section. > >-- >John W. Temples, III || Providing the first public access Internet >Gulfnet Kuwait || site in the Arabian Gulf region >