Defined div and mod for generic machine.