I am looking for a detailed manual explaining the headers inside of assembly so I can build a function in assembly and call it from C. I saw following link (http://www.keil.com/support/docs/50.htm) but I want to understand what the headers are and choose them on purpose. Any help would be appreciated.
In addition to the Interfacing C to Assembler section http://www.keil.com/support/man/docs/c51/c51_ap_ctoasm.htm
You will also need to read:
Segment Naming Conventions http://www.keil.com/support/man/docs/c51/c51_ap_segname.htm
Data Storage Formats http://www.keil.com/support/man/docs/c51/c51_ap_datastorage.htm
You might also take a look at the Optimiser: http://www.keil.com/support/man/docs/c51/c51_ap_optimizer.htm