i've no experienceand not familiar using 89c51 as i use different type of microcontroller. but if you want to interface your microcontroller with your gsm modem, use the uart interface of the gsm modem and microcontroller. then from there you can control gsm modem from microcontroller by sending at commands...