Is there anyone but me that would benifit from a utility to combine C and assembly? I have found that LPP almost never works. According to this tread there are others that have also encountered problems http://www.keil.com/forum/docs/thread729.asp I know it can be done because we use another compiler for the HC16 and it works flawlessly. Here is an example. Note that absolute addresses have even been inserted. My guess is that they are using their equivalent to an OMF file to generate this.
19330 _TPA_allowed: 19331 19333 47692 T 340C pshm y,x 19334 47694 T 274F tsx 19335 47696 T .set OFST=2 19336 19338 ; 2131 BOOLEAN allowed = FALSE; 19339 47696 T 0501 clr OFST-1,x 19340 47698 T ; 2132 19341 ; 2133 if ( TPA_faults == TPA_NO_FAULTS ) 19342 19344 47698 T F50C ldk #.__data__ 19345 4769A T 27FA tbek 19346 4769C T 17F536B2 ldab L34_TPA_faults 19347 476A0 T B600 bne L17101 19348 476A2 T ; 2134 { allowed = TRUE; 19349 19351 476A2 T F501 ldab #1 19352 476A4 T CA01 stab OFST-1,x 19353 476A6 T L17101: ; line 2136, offset 19 19354 ; 2135 } 19355 ; 2136 return(allowed); 19356 19358 476A6 T C501 ldab OFST-1,x 19359 476A8 T 3705 clra 19360 476AA T 19362 476AA T 3518 pulm y,x 19363 476AC T 27F7 rts 19364 476AE T ; 2137 }
"It's pretty easy to test the optimization vs SRC directive issue." It's one thing to demonstrate one (or even many) particular case (or even many) in which SRC makes no difference; it's quite another to have that behaviour properly defined and documented by the the supplier!
It's one thing to demonstrate one (or even many) particular case (or even many) in which SRC makes no difference; it's quite another to have that behaviour properly defined and documented by the the supplier! Yep. I agree. I was just pointing out that a user can easily test his/her own code to be satisfied that SRC doesn't unoptimize anything. Jon