Discussion specific to the DIP and TQFP packaged ZX devices like the ZX-40, ZX-44, ZX-32 and ZX-328 series. The differences between these devices is primarily the packaging and pinout so most issues will apply to all devices.
Unfortunately not. The I/O addresses, starting RAM address and other details are different between the underlying mega32 and mega644 processors. Consequently, code must be compiled for the specific ZX model on which it will be run.