primo: added bitwise operations and some subroutines to rom