Go4Expert

Go4Expert (http://www.go4expert.com/)
-   Assembly Language Programming (ALP) Forum (http://www.go4expert.com/forums/assembly-language-programming-forum/)
-   -   help in code (http://www.go4expert.com/forums/help-in-code-t27515/)

super man 2Jan2012 16:18

help in code
 
hi all>>> H.N.Y
plz help in an assimbly code that count the number of a's in string
'i am playing football in univercity'
and save the count in register AX.
and another code that searching for AB in memory from ABCD:1000 to ABCD:2000 if it found ab print ' AB found' if not print ' AB not found


thx for help :nonod::cuss::freak:

:disappoin

shabbir 2Jan2012 18:52

Re: help in code
 
Do you think posting with such big fonts will make big impact?

xpi0t0s 3Jan2012 04:02

Re: help in code
 
For the first, set a variable V to zero, loop over the string, and check each character to see if it's an 'a'. If it is, then increase V by 1.

The second one is even easier; you don't have to wait until the loop ends and can bail out at the first occurrence. Therefore you don't even need V.


All times are GMT +5.5. The time now is 15:20.