move code from asm.cpp into instruction.cpp

additional simplification of asm.cpp to make it easier to work with