;This program counts the number of capital letters in locations
; 1000H - 1FFFH
        mov     cx, 0   ;make count a word in case you increase range
; Array starts at location 1000H, and it is 1000H bytes long
;  Note that the OFFSET is 0 - FFFH
        mov     si, 0   ; first OFFSET is zero bytes from beginning
around: mov     al, byte ptr 1000H [si]  ; grab next byte in array
        cmp     al, 'A' 
        jb      endloop
        cmp     al, 'Z'
        ja      endloop
        inc     cx              ;yes!  it is a capital letter!!
endloop: add    si, 1
        cmp     si, 0FFFH
        jbe     around
        int     20h