A. Smila Stanley,
This doesn't look like an SDCC problem.  Perhaps it's a problem that will get you some help from 8052.COM.  It looks, to me at least, as though you're looking for an MCU-based approach to solving the problem, and not to solving a 'C'-or SDCC-specific problem. 
If you simply go to 8052.COM with your problem, having done no work in advance, and not yet knowing the details of the MCU that you intend to use, you're asking for a virtual "beating" however.  You must be very detailed and precise in your problem description, and be prepared to state your problem in a very clear and detailed way, unlike the way you've done it here, including a more detailed description of what a "counter" is, how fast it is supposed to operate, at what rate you'll be communicating, how you'll interface with it, etc.  There are many knowledgable engineers and programmers who regularly visit that site, who will help you if you clearly and concisely state your problem, accurately and completely, and adhering to the site's rules.  If you take the position that you simply want someone else to do your job for you, you'll not get much help.
It's not clear what your hardware environment is.  There are hundreds of MCU's, all claiming to be 805x's.  It's important you specify which one you're using, whether it uses internal or external code and data memory (they're separate, doncha know!)
It's not clear what you mean by "Send a command as 'c'."
It's not clear what, exactly, you intend by " ON/OFF the counter through Microcontroller."
Keep in mind that, if you want to place code into the 805x' code space, that requires you reprogram the MCU's code ROM, whether internal or external and that process is not trivial.
Keep in mind, too, that NO MCU executes 'C' code.  It must be compiled linked, and subsequently loaded into the MCU's code space. 
I would advise you to learn as much as you can about the MCU you're using, the controller board on which it resides, how to operate those features that board provides, what, EXACTLY, you have to do in order to make your counter function as you desire, thoroughly familiarize yourself with the instruction set (in assembly language) of the 805x, and only then concern yourself with using 'C' language.
Richard Erlacher
----- Original Message -----
From: Smila
To: sdcc-devel@lists.sourceforge.net ; sdcc-user@lists.sourceforge.net
Cc: seatyc@cesstech.com ; p_devi@cesstech.com
Sent: Tuesday, August 28, 2007 1:29 AM
Subject: [Sdcc-user] Regarding 8051 Microcontroller and SDCC

Dear All,
We came to know about the SDCC from PJRC. We bought a Microcontroller from PJRC.
I am bit familier with the 8051 Instruction set and I am very new to this SDCC.
We want to develop a project and my requirments are as follows.
1. We have a counter and I can able to ON/OFF through hyperterminal.(eg. Send a command as 'c')
2. Now my aim is to ON/OFF the counter through Microcontroller.
3. For that I need to store the command inside the 8051 memory and whenever I interrupt a button, it should activate the memory location to send the command to the counter.
4. How do I write a command in such away to send a command as 'c' from microcontroller.
Is anyone having sample codes related to this project? If so please send to me to proceed my project.
Thanks & Best Regards,
A. Smila Stanley

This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems?  Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >>  http://get.splunk.com/

Sdcc-user mailing list