(1) Is there a coding standard for 8051 assembler regarding use of:
foo equ 80h ; some idata
foo: ds 1
Sorry. I did not mean to imply one over the other in all cases. My intent was that for variables DS be used instead of EQU. I also agree that our sub has more important things to do with his time. Doug
ds a ds b ds c will automatically allocate separate spaces a equ 8 b equ 9 c equ 10 works as well BUT if these get mixed up it EXTREMELY likely that some day some 'small program change' will result in two variables in same slot a equ 8 b equ (a+1) c equ (b+1) does in some way remove the danger of the above. The one important thing here is to have ALL variables in the same place or you may end up with the stack in a place where you do not want it to be. Erik