http://www.microchip.com/forums/tm.aspx?high=3D&m=3D439213&mpage=3D2#442012 " Microchip have changed how RES works in the MASM assembler, but not how=20 it has long been defined in the manual. The problem for those who=20 misused it is that Microchip have refined how RES works in the new=20 version of the assembler. .... In the old assembler RES just allocated values to the labels, which is=20 all the Gunther and Herv=E9 were trying to do, and so could be used to=20 allocate values to RAM labels or CODE labels (absolute mode). In the=20 new assembler it only reserves space in CODE memory to be compatible=20 with the new chips that can place "initialised" data in CODE space,=20 which is why the "Overwritten" messages occur. " {Tony Yates] solution which works very well is to replace all the RES=20 directives with a MACRO. [TY] have used two macros, RMB needs more=20 changes to the source but looks better in listings, RMM just needs=20 substituting for RES. Both work with the latest assembler and provide=20 correctly numbered labels for the following ram assignment shown below RMB MACRO LABEL,BYTES LABEL EQU $ ORG $+BYTES ENDM RMM MACRO BYTES ORG $+BYTES ENDM ORG 0x20 RMB fred,4 RMB jim,1 ram1 RMM 1 ram2 RMM 2 ram4 RMM 1 ..... Tony's workaround is tricky but doesn't work for PIC18 series where ORG=20 has to be word-aligned. " So it looks like I may have a solution. Thanks Tony! Of course MPLAB has to come up with YET ANOTHER glitch. "A language-plugin exception occurred and was logged." Logged where? Seems to be a common problem but none of the suggested=20 solutions (reset project to all defaults. Create new project and add=20 code back, etc.) work. "Build all" fails with the noted error message but "make" DOES work. WTH? Tony again finds the solution. DON'T have the .lst file on the 'other=20 files' list in the project. Again, WTH? I had on the list for the same reason Tony did. Easy access to view the=20 file. "Why are not ALL READABLE project files not easily opened within the=20 project??? " So, 10's of hours later, I can FINALLY get down to the fixing the=20 'undocumented feature' in my old code. Hopefully this helps someone else in the same predicament. Old code + new IDE =3D lots of wasted time fixing stuff. Just use Tony's macro's and you save tons of time and don't have to=20 resort to CBLOCKs and such for simple linear code. Robert Robert Rolf wrote: > WHY is MPLAB V8/7 treating label assignments as if they generated code? >=20 > I have an old project that assembled and ran just fine in MPLAB V5.x, > but V5 doesn't support the Pickit3 or ICD3 I now have to work with. > (And now in Win7 so V5 won't install either). >=20 > MPLAB V8. and V7 barf up copious errors if I attempt to use the code as=20 > is, in absolute mode. >=20 > I moved the code to MPLAB V8.7x (as new project) and I cannot seem to=20 > get the assembler to properly handle my numerous 'equ' and 'res'=20 > assignments correctly. > I have to have absolute assignments because of existing boot loader=20 > linkages to specific RAM locations (and it's all one blob of code). >=20 > I get " Overwriting previous address contents 0x20 ... " for any=20 > subsequent CODE that is generated for 0x20 to 0x1ff (the RAM/REGISTER=20 > range). > I use the ORG directive to put labels where I need them to be. >=20 > It is as if MPASM sees the label assignment I have for the RAM=20 > registers, and ASSUMES that code was generated at that address, even=20 > though none actually IS generated. >=20 > How do I get MPLAB V8 to behave 'properly'. eg. NOT see a label=20 > assignment as having created code at that same address? >=20 > I have searched for many hours now, and have turned up nothing relevant. >=20 > Help?? > Thanks in advance. I has to be something incredibly simple I am missing. >=20 > Robert >=20 > This bit of code listing >=20 > 0020 3FFF 00472 Sysstat: res 1 ;System status byte. > 00000000 00473 LOWBAT equ 0 ;01 low battery flag > 00000001 00474 NFSR equ 1 ;02 FSR NOT plugged in > 00000002 00475 DOBEEP equ 2 ;04 beep on stim (exr > 00000003 00476 POTFLT equ 3 ;08 Pot not zero on power > 00477 > 00000004 00478 ADXLERR equ 4 ;10 no ADXL pulses > 00000005 00479 SUMB equ 5 ;20 bootloader checksum > 00000006 00480 SUMP equ 6 ;40 program checksum > 00000007 00481 SUME equ 7 ;80 EEPROM checksum >=20 > 0021 3FFF 00483 Sysstat2: res 1 ;01 System status byte 2. > 00000000 00484 RESTART equ 0 ;02 Restart requested > 00000001 00485 BADCMD equ 1 ;04 Bad command flag > 00000002 00486 FULLCMD equ 2 ;08 Full commands enabled > 00487 > 00000004 00488 A213S equ 4 ;10 ADXL213 scaling > 00000005 00489 INVBEEP equ 5 ;20 need to invert beep > 00000006 00490 STIMERR equ 6 ;40 Stim Error happened > 00000007 00491 DOESUM equ 7 ;80 Need to update EE >=20 > results in >=20 > Error[118] G:\CODEN\WA3HE.ASM 1468 : Overwriting previous address=20 > contents (0020) > Error[118] G:\CODEN\WA3HE.ASM 1468 : Overwriting previous address=20 > contents (0020) > Error[118] G:\CODEN\WA3HE.ASM 1468 : Overwriting previous address=20 > contents (0021) > Error[118] G:\CODEN\WA3HE.ASM 1468 : Overwriting previous address=20 > contents (0021) > Error[118] G:\CODEN\WA3HE.ASM 1468 : Overwriting previous address=20 > contents (0022) > Error[118] G:\CODEN\WA3HE.ASM 1468 : Overwriting previous address=20 > contents (0022) > etc. > for this filler macro. >=20 > 000C 29 01468 fill (goto Rstjmp),0xFE-$ ;trap errant=20 > code in page 0 >=20 > which writes a jump vector into all unused code space in page 0 in order= =20 > to trap and reset any errant operation. >=20 > The same errors happen for code any generated at 0x100 0x1ff ONLY where=20 > I have defines for RAM using the same addresses. e.g. buffer start=20 > addresses or arrays. >=20 >=20 --=20 http://www.piclist.com PIC/SX FAQ & list archive View/change your membership options at http://mailman.mit.edu/mailman/listinfo/piclist .