Go4Expert (http://www.go4expert.com/)
-   C++ (http://www.go4expert.com/forums/cpp/)
-   -   assembl language c++ help (http://www.go4expert.com/forums/assembl-language-cpp-help-t23744/)

Jedson3614 3Nov2010 04:28

assembl language c++ help
I need help with writing a program, im really frustrated. i am trying to write a program that check a large string for vowels aeiou and AEIOU also i have another part of the assingment that asks me to write a program that searches for 0123456789, have no idea how to search for numbers, and the first part of the assignment i understood and it is working right, i was asked to scan an entire string for periods ".". Can anyone help me here is an example of my code.
your properly formatted assembly language data here

    char refstr[] = "In 1987 I received my first teddy bear.I took him everywhere with me.There wasn’t a thing me and teddy wouldn’t tell each other.Teddy had 10 buttons, 02 eyes"
                    ", and money wise was priceless to me. It's 2010, what shall I do with this old friend of mine? He now has 03 buttons 01 eye, and no nose!I’ve got it!"
                    "I will give it a new home. Perhaps you could use a teddy bear?";
    unsigned short int ans = 0;
    __asm {
//  your syntatically correct assembly language code here
//  column alignment markers below (to guide you)
//      |      |                          |
        cld                                ;
        lea    edi,refstr                ;
        mov    cx,379                    ;
        mov    al,'a'                    ;
        repne scasb
        cmp    cx,0                      ;
        je      skip1                      ;
        inc    ans                        ;
        cmp    cx,0                      ;
        ja      more1                      ;

    cout << "The number of vowels = " << ans;


All times are GMT +5.5. The time now is 12:30.