An innovative method of code size reduction, in applications which use a small microcontroller with dash memory, is presented in this paper. Code size reduction is of major importance in this type of microcomputer systems, because of the limited available resources. By the proposed method, certain decision structures, which are relevant to the current state of the system, are replaced with a lookup table and a simple calculation algorithm. A detailed description of this approach is presented in this work.