;This program goes thru memory from 400h thru 40fh and counts
; the number of capital letters
        mov     cl, 0   ;set counter of caps to zero
        mov     si, 0   ;number of bytes past location 400h
top:    cmp     byte ptr 400h [si], 'A'
        jb      nxt
        cmp     byte ptr 400h [si], 'Z'
        ja      nxt
        inc     cl      ; i.e., add 1 to cl
nxt:    inc     si    
        cmp     si, 0fh    ; at the end of the array?
        jbe     top
        int     20h