Vmer Yalh} wrote: > I am trying to learn using the mplab ide with multiple source files in > assembler. I could not find a linker definition for 16F628. I had > downloaded Olin's development environment a while ago. Although, the > environment seems to be priceless, it takes a while to grasp it. So I > decided to start simple. However, I did use the linker file from Olin's > environment, in the mplab. You're going to have problems using my environment half way. There are various interlocking assumptions throughout. At this point the preprocessor is probably inseperable from the rest, at least if you don't want to do a lot of work and be a test pilot in the process. This means you can't build from within the MPLAB IDE. You'd typically build with BAT files or NMAKE or whatever. I supply a basic set of BAT files that make even more assumptions, but also make it easy to create build files for new projects. > I used to declare variables between cblock 0x20 and endc. Now; > however, I will need to declare them using UDATA_xxx. When I declare > with UDATA_SHR, the definitions are placed in address starting 0x70 > (what the linker defines). However, I know that all my variables will > fit in bank0 (I am trying to convert a finished program). So, I tried > declaring variables under UDATA. Looking at the watch window, it shows > a variable being in 0x120 (as in the linker definition). However, when > l look at the list file I see all the variables addresses are starting > from 0x20. The list file can't show you the addresses because it is written by the assembler before the linker decides the addresses. Note that specific section names are pre-defined in the linker file. Variables in the .BANK0 section will go somewhere in bank 0. To define a bunch of variables in bank 0: .bank0 udata tkled res 1 ;clock ticks until turn on LED tkboom res 1 ;clock ticks until detonate nuclear device This is probably the simplest way for you to do it for now. When you get a little more comfortable with things check out the DEFRAM macro in STD.INS.ASPIC. ***************************************************************** Embed Inc, embedded system specialists in Littleton Massachusetts (978) 742-9014, http://www.embedinc.com -- http://www.piclist.com hint: The PICList is archived three different ways. See http://www.piclist.com/#archives for details.