Hello, 1) I want to place assembly code in my C code. The problem with using SRC is that I would have to rename the file MyAsm.SRC to MyAsm.A51 and then (remove C code from project) include A51 code in the project... before finally recompiling the whole project. Is there any way to just add assembly code without using SRC? What about the '__asm' keyword? Where do I get more info on this? 2) The Cx51 User Manual (Pg124) states that the Interrupt function will save SFR, ACC, B, DPL, DPH etc 'when required' to stack (and later pop it). How do I disable this feature so I can manually do the PUSHing and POPing? If this is not possible then is it possible to instruct Keil to 'save all' registers regardless of need? Regards, KC
"The problem is that I need to do some manual saving of registers to stack." But why??? C51 guarantees that it will preserve registers through an interrupt function. As I said before, if you really do need so do this, then you should do it entirely in assembler - as Erik said, that guarantees that you are totally in control of everything that goes on (and, therefore, to blame for anything that goes wrong!!)