.model small
.data
A dw 2
B dw 3
C dw 4
chet db 0 ; количество чётных
nechet db 0 ; количество нечётных
.code
start:
mov ax, @data
mov ds, ax
; --- A ---
mov ax, A
and ax, 1
jz A_chet
inc nechet
jmp next1
A_chet:
inc chet
next1:
; --- B ---
mov ax, B
and ax, 1
jz B_chet
inc nechet
jmp next2
B_chet:
inc chet
next2:
; --- C ---
mov ax, C
and ax, 1
jz C_chet
inc nechet
jmp finish
C_chet:
inc chet
finish:
mov ax, 4C00h
int 21h
end start