;This counts words in a sentence that is terminated by a period
;
        jmp     thestart
msg     db      'This is a great and fabulous quote.'
count   db      0
thestart: mov   si, 0
loopy:  cmp  msg [si], '.'      ;end of string??
        je   theend   
        cmp  msg [si], ' '      ;is it a blank?
        jne  nxtbyte
        inc  count
nxtbyte: add  si, 1
        jmp     loopy
theend: inc     count
        int    20h
        end