;  this program determines if byte ptr 300h is even or odd
;    the output is in byte ptr 301h = 0 if even
;                                   = 1 if odd
;
;
        mov al, byte ptr 300h           ;get input
        sub al, 0
        jz  even
agin:   sub al, 2                       ;get next number in sequence
        jc  odd                         ; found an odd number, it went -1
        jz  even                        ; found even number
        jmp agin                        ; sub another number for check
odd:    mov byte ptr 301h, 1            ; output of odd
        hlt
even:   mov byte ptr 301h, 0            ; output of even
        hlt
        end