The Abstract State Machines (ASM, for short) are a formalism created to model algorithms at its natural abstraction level. The semantics of a programming language can be
described in ASM by defining an interpreter for the language. A partial evaluator, when given a subject program and part of its input, produces a new residual
or specialized program. The residual program, when given the remaining input data, will yield the same result that the original program would have produced given both inputs.
In this work we show the techniques used to develop a partial evaluator for the ASM language. Compiling from any language to ASM can be achieved by the partial evaluation
of an interpreter. Compilers can also be automatically generated by self-application of the partial evaluator.