Sponsored Links


Results 1 to 7 of 7

Thread: CS401 Assignment # 3

  1. #1

    CS401 Assignment # 3

    Sponsored Links


    Assignment


    Write a program named “count letters” that counts the occurrences of all small and capital letters in given below string and then prints the result in the format (Caps, count:: Small, count).Strings is “bcAdBDeCEad” and it should print this result (Caps, 5:: Small, 5).The program should take address of the source string as a parameter via stack and also provide proper comments against each instruction.

    Sponsored Links


    Due Date: 24-05-2010

  2. #2
    Senior Member viki's Avatar
    Join Date
    May 2010
    Posts
    2,132
    Quote Originally Posted by Anya View Post
    Assignment


    Write a program named “count letters” that counts the occurrences of all small and capital letters in given below string and then prints the result in the format (Caps, count:: Small, count).Strings is “bcAdBDeCEad” and it should print this result (Caps, 5:: Small, 5).The program should take address of the source string as a parameter via stack and also provide proper comments against each instruction.

    Due Date: 24-05-2010
    INSHALLAH i will try to make it but it is having much time
    :o:o--------------------------------------------------------------------------------------:o:o
    [B]The more knowledge you have, the greater will be your fear of Allah.[/B]

    Please Join My [B]Group Vuhelp[/B][B], Birthday Wishing, Daily Hadees[/B] [CODE][B]http://vuhelp.net/groups/vuhelp.html[/B]
    [B]http://vuhelp.net/groups/birthday-wishing.html[/B]
    [B]http://vuhelp.net/groups/daily-hadees.html[/B][/CODE]
    [CENTER][B][COLOR="Red"][SIZE="4"]Email: [email]viki@vuhelp.net[/email][/SIZE][/COLOR][/B][/CENTER]

  3. #3

    32 cs401assignment 3

    Write a program named “count letters” that counts the occurrences of all small and capital letters in given below string and then prints the result in the format (Caps, count:: Small, count).Strings is “bcAdBDeCEad” and it should print this result (Caps, 5:: Small, 5).The program should take address of the source string as a parameter via stack and also provide proper comments against each instruction.

  4. #4

  5. #5
    Senior Member viki's Avatar
    Join Date
    May 2010
    Posts
    2,132
    Quote Originally Posted by sajid_hussain584@yahoo.co View Post
    Write a program named “count letters” that counts the occurrences of all small and capital letters in given below string and then prints the result in the format (Caps, count:: Small, count).Strings is “bcAdBDeCEad” and it should print this result (Caps, 5:: Small, 5).The program should take address of the source string as a parameter via stack and also provide proper comments against each instruction.
    there are certain rules as regulation in this forum who ever make a post regarding assignments and solution plz do mention the due date as well
    :o:o--------------------------------------------------------------------------------------:o:o
    [B]The more knowledge you have, the greater will be your fear of Allah.[/B]

    Please Join My [B]Group Vuhelp[/B][B], Birthday Wishing, Daily Hadees[/B] [CODE][B]http://vuhelp.net/groups/vuhelp.html[/B]
    [B]http://vuhelp.net/groups/birthday-wishing.html[/B]
    [B]http://vuhelp.net/groups/daily-hadees.html[/B][/CODE]
    [CENTER][B][COLOR="Red"][SIZE="4"]Email: [email]viki@vuhelp.net[/email][/SIZE][/COLOR][/B][/CENTER]

  6. #6
    Junior Member
    Join Date
    May 2010
    Posts
    2
    Aoa Sir, It will be appreicated if u kindly give us some hints or information about this assignment,

    Write a program named “count letters” that counts the occurrences of all small and capital letters in given below string and then prints the result in the format (Caps, count:: Small, count).Strings is “bcAdBDeCEad” and it should print this result (Caps, 5:: Small, 5).The program should take address of the source string as a parameter via stack and also provide proper comments against each instruction.

    and the due date is 24-05-2010

  7. #7
    Senior Member viki's Avatar
    Join Date
    May 2010
    Posts
    2,132
    CS401 Solution Assignment 3


    Code:
    ;----
    ; ---- start of loop reading the keyboard
    ; ---- one character at a time
    ;----
    mov bX,0 -- initialize capital character counter
    loop_top:
    MOV AH,1 ;READ A CHARACTDR
    INT 21h
    cmp al,0dh ; end of line?
    je Display1 ; yes, then stop
    ; test for capital letters
    cmp al,'A'
    JL loop_end ; if char < 'A' then go
    CMP al,'Z'
    JG loop_end ; if char > 'Z' then go
    
    INC bx ; increment capital letter counter
    cmp bx,9
    JG Display2 ; too many capital letters
    
    loop_end:
    jmp loop_top
    
    
    
    Display1:
    LEA DX,MSG2 ;GET MSG1
    MOV AH,9 ;DISPLAY STRING
    INT 21H ;DISPLAY MSG1
    
    mov dl,bl ; print the number of characters
    add dl,'0' ; make it readable
    MOV AH,2 ;display the character that is in dl
    INT 21H
    jmp exit_program ; all done
    
    Display2:
    LEA DX,MSG3 ;GET MSG1
    MOV AH,9 ;DISPLAY STRING
    INT 21H ;DISPLAY MSG1
    
    exit_program:
    MOV AH,4CH ; return control to DOS
    INT 21H
    
    MAIN ENDP
    END MAIN
    END
    :o:o--------------------------------------------------------------------------------------:o:o
    [B]The more knowledge you have, the greater will be your fear of Allah.[/B]

    Please Join My [B]Group Vuhelp[/B][B], Birthday Wishing, Daily Hadees[/B] [CODE][B]http://vuhelp.net/groups/vuhelp.html[/B]
    [B]http://vuhelp.net/groups/birthday-wishing.html[/B]
    [B]http://vuhelp.net/groups/daily-hadees.html[/B][/CODE]
    [CENTER][B][COLOR="Red"][SIZE="4"]Email: [email]viki@vuhelp.net[/email][/SIZE][/COLOR][/B][/CENTER]

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. CS401 assignment no 4
    By moon13 in forum Mcs
    Replies: 11
    Last Post: 06-24-2011, 10:39 PM
  2. cs401 assignment 03 required
    By harib raza in forum Mcs
    Replies: 13
    Last Post: 06-11-2011, 03:08 AM
  3. cs401 assignment no 3 solution required
    By mc100200446 in forum Get Solution In 24 Hour
    Replies: 2
    Last Post: 06-09-2011, 11:22 PM
  4. CS401 Assignment # 2- Help needed
    By Anya in forum Get Solution In 24 Hour
    Replies: 6
    Last Post: 06-05-2011, 07:22 PM
  5. Cs401-assignment no: 05
    By Anya in forum Get Solution In 24 Hour
    Replies: 3
    Last Post: 02-01-2011, 04:17 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
-: Vuhelp Disclaimer :-
None of the files shown here are hosted or transmitted by this server. The links are provided solely by this site's users. The administrator's or staff of Vuhelp.net cannot be held responsible for what its users post, or any other actions of its users. You may not use this site to distribute or download any material when you do not have the legal rights to do so. It is your own responsibility to adhere to these terms. If you have any doubts about legality of content or you have any suspicions, feel free to contact us.
Online Education | JhelumSoft