We have integrated a commercially available microprogrammable state machine (Tecmag PULSkit) for use as a magnetic resonance pulse programmer. Providing the capability for active research environment imaging protocols, it features timing resolution of 100 nsec, ten 16-bit loop counters, and individually addressable look-up tables. This integration involved hardware and software integration with a VAX 11 750 at several levels. Hardware: Each of the three gradient channels employs three digital-to-analog converters (DACs). An 8-bit, 4-quadrant, multiplying DAC generates the gradient waveform shape. A 12-bit DAC generates the multiplying DAC scaling voltage, controlling gradient amplitude and sign. A third 12-bit DAC produces a gradient offset (shim) voltage. An eddy current compensation network is present for each gradient channel. Software: The software design philosophy was to create a flexible interface (interactive window environment), while not constraining complex manipulation of the hardware (direct use of the pulse-sequence compiler primitives and microprogramming). The software levels include (a) pulse-sequence microprogramming, (b) pulse-sequence compiler, (c) interactive parameter specification, and (d) canned pulse-sequence microcode library.