Tamas Rudnai wrote: >> Not CBLOCK (more or less as "bad" as EQU). >> Use the RES directive only. > > It's less as bad as you cannot put two variables into the same > location :-) Yes it is, precisely because you CAN create multiple symbols with the same value. If your code assumes these symbols each stand for separate RAM locations, you've got a bug. Again, CBLOCK is for creating enumerated assembly time constants. For example: cblock 0 ;define the color IDs color_red color_grn color_blu endc cblock 0 ;define command IDs cmd_nop ;no operation cmd_setname ;set the unit's name string cmd_hcf ;halt and catch fire endc COLOR_GRN and CMD_SETNAME have the same value of 1. This is a perfectly legal and reasonable use of CBLOCK. However note that this has absolutely nothing to do with RAM allocation. Only the RES (reserve) directive does that. If a attempt is made to define multiple variables at the same address, it will get caught. For example, if in one module you write: ram1 udata h'40' counter res 1 myval res 2 and then in another module: ram2 udata h'42' newval res 1 morestuff res 1 the assembler won't have a problem, but the linker will detect the overlap and fail. In this case you are attempting to put the second byte of MYVAL at the same address as the first byte of NEWVAL. Actually the linker sees that the absolute sections .RAM1 and .RAM2 overlap, but the point is that the system won't let you accidentally allocate two variables at the same memory location. ******************************************************************** Embed Inc, Littleton Massachusetts, http://www.embedinc.com/products (978) 742-9014. Gold level PIC consultants since 2000. -- http://www.piclist.com PIC/SX FAQ & list archive View/change your membership options at http://mailman.mit.edu/mailman/listinfo/piclist