Convert MARKHACK.ASM to C