chg: rewrite assprimeszerodim.lib based on modular.lib