I don't need any bank selection yet, so I have not looked into it. With IAR C you have to declare the variables with banks and then you can forget about them when using, bank changing is done automatically. I assumed it would be the same case with C18, isn't that so? =D6mer YALHI oyalhi@teksan.com.tr http://www.teksan.com.tr Tel : +90 212 613 22 00 Fax: +90 212 544 70 35 -----Original Message----- From: pic microcontroller discussion list [mailto:PICLIST@MITVMA.MIT.EDU] On Behalf Of Hu, Luhui Sent: Wednesday, August 14, 2002 3:59 PM To: PICLIST@MITVMA.MIT.EDU Subject: Re: [PIC]: MPLAB C18 I am also using C18 compiler. I found another issue: it seems that the C18 stores "const" variables both at the program memory and data memory. Do you know how to select banks using "pragma varlocate"? thanks in advance! Luke -----Original Message----- From: cdb [mailto:bodgy1@OPTUSNET.COM.AU] Sent: Wednesday, August 14, 2002 6:51 PM To: PICLIST@MITVMA.MIT.EDU Subject: Re: [PIC]: MPLAB C18 Although I have downloaded the demo, I have yet to use MPLAB C18, but my current 'C' compiler requires a double underscore for config info as in #__config or #pragma __config with either #__config 0x3F72 or #__config _XT_OSC | _WDT_NORMAL etc To persuade data into EEPROM at compile time requires for my compiler #asm _savePC=3D$ org 0x2100 DATA 'Y','E','S' ;or '0x59','0x45','0x53'=3D YES org _savePC #asmend -- _savePC=3D is needed by my compiler otherwise it becomes confused and sulks. I await angry shouting from others. colin cdb, bodgy1@optusnet.com.au on 14/08/2002 -- http://www.piclist.com hint: To leave the PICList mailto:piclist-unsubscribe-request@mitvma.mit.edu -- http://www.piclist.com hint: To leave the PICList mailto:piclist-unsubscribe-request@mitvma.mit.edu -- http://www.piclist.com hint: To leave the PICList mailto:piclist-unsubscribe-request@mitvma.mit.edu