rewrite copyinstr, copyoutstr, and copystr to avoid use of movs3