We present a piston-type SLM (spatial light modulator) as a programmable pattern generator for maskless lithography. Large arrays of up to ~40,000 mirrors with 20 mum pixels have been fabricated. The mirrors have high resonance frequencies (f=564 kHz), and achieve deflections of lambda/2 for actuation voltages <100 V. Using the SLM in a simple imaging system, we demonstrate the generation of aerial images of dark line patterns