I am learning ASM and have to implement a 7 segement display control in ASM language using a sillicon labs C8051F330D and I have to do it as a RTOS Real time operating system using timer 2, does anypne have an example of using timer 2 or setting up a RTOS system with the 8051???
I think you have mentioned timer 2 seven times in your posts. That is not a very important fact. An RTOS should have a time base, but can use almost any time base that is available.
Focus instead on what an RTOS does.
Have you googled for RTOS - and for example read the wikipedia information?
If you already know how to write assembler programs, then it shouldn't be too hard to write a timer-based scheduler to switch round-robing between pending jobs each tick.
After that, it shouldn't be so much harder to give the different tasks a priority, and allow them to wait for events - for example available serial data. While waiting, lower-prioritized tasks will be processed round-robin, and as soon as you get an ADC conversion interrupt, UART rx interrupt or similar, the interrupt handler unblocks any pending "consumer" task, that takes care of the ADC value or received character.