;THis program accepts a byte from position 200h, and for output
;  leaves a zero in 201h if it is even, and a one in 201h if it is odd
;
        mov     dh,     byte ptr 200h   ;get the input
        add     dh, dh                  ;double number, shifting left
        add     dh, dh
        add     dh, dh
        add     dh, dh
        add     dh, dh
        add     dh, dh
        add     dh, dh
        add     dh, dh                  ;now the right bit is in carry flag
        jc      odd
        mov     byte ptr 201h, 0        ; it is even!!
        int     20h                     ;return to DOS
odd:    mov     byte ptr 201h, 1        ; it is odd!!!
        int     20h
        end