I'd like to see a syntax something like this: portb = ...whatever the address is... bitmap portb B0 B1 ... B6 B7 endb fire_torpedoes = B7 bsf B3 bsf fire_torpedoes bsf shadow.b3 bsf shadow.fire_torpedoes The bitmap symbols would be stored in the symbol table as both a file address and a bit number, along with an indication that it was a bitmap symbol. The syntax shadow.b3 would replace the file address with that of 'shadow'. The only places these symbols could be used is: 1: with or without 'shadow.' as the only argument to BSF/BCF/BTFSS/BTFSC 2: without 'shadow.' as arguments to builtin functions: bitnum(b7) fileaddr(b6) bitmask(b3) 3: with or without 'shadow.' as a value to be assigned to another symbol, which will then also be marked as a bitmap symbol. shadow_fire = shadow.fire_torpedoes Bob Ammerman RAm Systems ----- Original Message ----- From: "Alan B. Pearce" To: Sent: Wednesday, April 02, 2003 5:34 AM Subject: Re: [PIC]: Configuration bits > >Also, while it would be nice to have some sort of type checking > >on bit number symbols, let's no loose sight of the fact that > >these kinds of errors are quite rare. I've written tens of > >thousands of lines of PIC assembler of dozens of projects, and I > >have no recollection of ever using a named bit with the wrong > >special function register. > > I have not managed to make that mistake yet either, but in the process of > debugging a portion, some reasonable time after writing it, and having been > sidetracked into other hardware issues, have been through the loop of being > certain I have the correct bit name, but not sure if the register is really > the correct one, and had to double check to make sure. > > -- > http://www.piclist.com hint: PICList Posts must start with ONE topic: > [PIC]:,[SX]:,[AVR]: ->uP ONLY! [EE]:,[OT]: ->Other [BUY]:,[AD]: ->Ads > -- http://www.piclist.com hint: PICList Posts must start with ONE topic: [PIC]:,[SX]:,[AVR]: ->uP ONLY! [EE]:,[OT]: ->Other [BUY]:,[AD]: ->Ads