the runtime environment is the key here, you need to make a runtime environment for each processor architecture which is compatible with all OS's which that Architecture can run.
and aslong as all your runtime environments accept the same software input for operation then I see no problems in this, but good luck, and keep me informed if you go ahead with this as I would be interested in seeing your progress as this could become a very impressive feat.
any corrections to my posts neccessary...please pm me