can any one help me with the code for the gsm modem interfacing with 8051
You do realise, don't you, that there are dozens - possibly even hundreds - of projects already published on the internet which do exactly this?
Did you spend any time researching prior art?
www.lmgtfy.com
i tried it but am not able to get any code
Oh dear - so you might actually have to get down and write some of your own, then...?!