data segment
value db 10h, 20h, 30h, 40h, 50h
data ends
code segment
assume cs:code, ds:data
begin:
mov ax, data
mov ds, ax
lea si, value
mov cx, 05h
mov bl, 30h
counter:
mov al, [si]
mov ah, 0000h
cmp al, bl
jg add_10
jng add_20
add_10:
mov ax, 10h
add [si], ax
inc si
dec cx
jnz counter
jmp exit
add_20:
mov ax, 20h
add [si], ax
inc si
dec cx
jnz counter
jmp exit
exit:
mov ax, 4c00h
int 21h
code ends
end begin