I've read stories about old games on constrained systems, where the solution to limited space was to design a special byte code which would be much more compact than native code. I think one of the examples was Another World, maybe ScummVM.
The idea sounds like it could be still relevant for microcontrollers, AVRs can have <2KiB program space.
Are there any good resources that discuss the design of the "mini-languages" composed of byte codes and interpreters?