Ok, so you're interfacing it directly.....that really doesn't look easy
Found the datasheet for the control board they use:
**broken link removed**
Its always good to see how someone else has done it, and frankly, that looks like a pretty complicated board. Obviously you've done really well to get the printer running off a basic 8-bit micro
I checked the datasheet, and the pinout for the printer head has MANY control signals and detection signals, surprised you're not running out of pins.
As for your code, it didn't show the low level routines for actually sending bytes to the printer. I'm not saying we need to see your whole code...just the bits where you actually switch pins high/low. As your micro doesn't have any peripherals with sending serial data, its all bit banged, which I'm sure slows things down significantly. Have you considered switching to an Atmega? Or perhaps using off-chip hardware logic to speed up the communication.
I'm sorry if I'm not really much help, I have never dealt with these printers, nor the 89S52 for that matter... but its certainly interesting, and seeing as you have already got the whole thing working, I'm sure speeding things up is doable.
Also, just searched the forum and found this delightful spec sheet for your printer:
It gives basic schematics of the strobing inputs and timing for the head, as it looks serial based, you may be able to optimize your code. For example, page 21 shows the DC and timing characteristics. It shows 'CLK' with a typical value of 5MHz. Does your micro output this? It seems you will either have to just use a blazing fast clock to do it all in software, or use a micro, equivalent to the one you have, but with on-board SPI or synchronous USART so spit the serial data to the printer as fast as possible.
If that is not an option, then, I guess code optimization is the only way. Whilst C is awesome for complicated tasks, for basic 'pin toggling' and sending serial data, I'm sure the generated assembly will probably run quite slow. You may be able to add some inline assembly for this, purely for toggling pins.
Sorry for the disorganized answer, its 6am and I haven't had my coffee..
Buriedcode