How to use ASM into C code compiled by µVision ?
Read the descriptions of ASM, ENDASM, and SRC in the C51 Manual - they include examples. But before this, ask yourself why you want to do such a thing. It is very often an ill-conceived notion. If you need to write assembly, then write an assembly source file and use the assembler to translate it - don't mess about bastardising your 'C'. There has been loads of discussion on this very recently - do a 'Search'
"If you need to write assembly, then write an assembly source file and use the assembler to translate it - don't mess about bastardising your 'C'." For a prime example, see my comments of 4/23/04 7:01:18 in this thread: http://www.keil.com/forum/docs/thread4371.asp The use of inline-assembler in the example caused some useless assembler to be generated, and required adding four lines of useless 'C' whose sole function was to suppress compiler warnings!
View all questions in Keil forum