Hi Pallav,
This subject has been hot lately! Please check old posts for info you require before posting.
Presumably you need this for the QG as in your last post?
Take a look here:
http://forums.freescale.com/freescale/board/message?board.id=8BITCOMM&message.id=1066
Its assembler, but its pretty easy in these newer chips so I am sure you can covert it to C if you have too.
Regards David