;Copyright 2000 - Mark McDonald All rights reserved ; DECLARE: FUNCTION isodd(BYVAL integer) AS INTEGER ; DESC: Returns true if the specified integer is odd. ; EXAMP: IF isodd(MyVar%) THEN GOTO ... MCODE Segment Byte Assume CS: MCODE Public isodd isodd Proc Far ARG Value: WORD = Retbytes push BP ; mov BP,SP ; push DS ; mov BX, Value ; get value xor AX, AX ; assume it's even test BX, 1 ; is bit one on? jz Exit ; no, exit inc AX ; yes, return true (1) Exit: pop DS ; pop BP ; retf Retbytes ; isodd EndP MCODE EndS End