The feature of shared variables in C is a wonderful saver of DATA space. Can the same be implemented in assembler ? Erik
One comment that Sven made about using registers as variables. In Keil, you can equate variable names with registers so that you can, within a local program segment, have meaningful names for variables stored in registers.
testvar equ R5 testvar2 equ R6 tp1: mov A,testvar mov B,testvar2 add A,B ret
Hi Tom! That's an excellent idea. Have never seen that before and actually never thought about it, since when I write the programm, I know the purpose I use the registers for anyway and I usually comment my programms a lot. Your method is much better. Take care Sven