Moved common subroutines to a separate ASM file