/*[ or.c LOCAL CHAR SccsID[]="@(#)or.c 1.5 02/09/94"; OR CPU functions. ----------------- ]*/ #include #include #include #include #include #include #include #include #include #include #include #include /* ===================================================================== EXTERNAL FUNCTIONS START HERE. ===================================================================== */ /*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/ /* Generic - one size fits all 'or'. */ /*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/ GLOBAL VOID OR IFN3( IU32 *, pop1, /* pntr to dst/lsrc operand */ IU32, op2, /* rsrc operand */ IUM8, op_sz /* 8, 16 or 32-bit */ ) { IU32 result; result = *pop1 | op2; /* Do operation */ SET_CF(0); /* Determine flags */ SET_OF(0); SET_AF(0); SET_PF(pf_table[result & BYTE_MASK]); SET_ZF(result == 0); SET_SF((result & SZ2MSB(op_sz)) != 0); /* SF = MSB */ *pop1 = result; /* Return answer */ }