View Single Post
Old Feb 1st, 2005, 6:24 PM   #9
Mjordan2nd
The Supreme Ruler
 
Join Date: May 2004
Location: Houston
Posts: 1,476
Rep Power: 6 Mjordan2nd is on a distinguished road
Probably not the best way, but this is how I'd do it:

findVowels:
    cmp [di], BYTE 'a'
    je increment
    cmp [di], BYTE 'e'
    je increment
    cmp [di], BYTE 'i'
    je increment
    cmp [di], BYTE 'o'
    je increment
    cmp [di], BYTE 'u'
    je increment
    cmp [di], BYTE 0
    je end
    inc di
    jmp findVowels
increment:
    inc di
    mov bx, counter
    inc WORD [bx]
    jmp findVowels

Oh, and remember, no problem with asking questions.
__________________
"Every gun that is made, every warship launched, every rocket signifies, in the final sense, a theft from those who hunger and are not fed, from those who are cold and are not clothed. The world in arms is not spending money alone. It is spending the sweat of its laborers, the genius of its scientists, the hopes of its children." - Dwight D. Eisenhower
Mjordan2nd is offline   Reply With Quote