add factorial to imem and assembler code+sim