working
change some structure and detail
fix and add some comments
working
fix, working
add bak_mem and bak_reg
remove old code
add mir and miw