Is there a way to convert the c51 compiler so I can write programs on my mobile phone (a galaxy s2) and then download them onto the atmel at89s51 mcu?
No.
YES I'm into it with iPhone and iPad work in progress ...
Would you care to give details, then?
Programming environment for iOS is using Objective-C and Cocoa application frameworks.
You don't need to convert the C51 compiler at all.
Simply write a PC emulator for your mobile phone, install Windows on that and you can then run uVision.
Good luck.
Of course, it is easier to use MS-DOS tools, since there are several good MS-DOS emulators available for Android. Then it's just a question of installing Turbo Pascal, classical games or whatever and enjoy.
An interesting problem - how to connect peripherial equipment to the emulated PC running inside the Android phone.
View all questions in Keil forum