io/intcode: add variable-length code writing