title ALP to count negative (-ve) numbers from a given list
of 10 numbers
.model small
.stack 100
main proc
mov ax, @data
mov ds, ax
mov cx, 0ah ;counter of 10
mov si, offset list ;array accessing
mov bl, 00h ;counts -ve numbers
mov al, 07Fh ;largest possible +ve number
BACK: cmp al, si ;compares al and si contents
jnc ahead ;if nc=0, jump ahead
inc bl
AHEAD: inc si ;pointer increment
loop back
mov result, bl
mov ax, 4c00h
INT 21h
main endp
list db 0AFH, 03H, 087H……
result db ?
end main