first version of inverting assembler function.
must organize loop, fix jump, handle size of image...