peer-review
You are missing a few nops which makes the code not work. The major issue however is between lines 225 and 228 where you overwrite your curpcb.
If you change this part lw k1, 0(k0) --> lw k0, 0(k1) it should work. As long as the nops are added aswell. Otherwise it looks good with comments and structure.