multipexing seven segment display

want to display 1,2,3,4 on four seven segemnt display connected to 8051 in such way that the display reads as "1234", but I am not able to write delay routine which refreshes the displays fast enough that our eyes is not able to catch it, kindly guide.
using 12Mhz crystal.

More questions in this forum