add HWI to Assembler and fix some bugs