Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
CS401 Assignment # 3
#1
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
Reply
#2
Anya Wrote: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
Reply
#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.
Reply
#4
sajid_hussain584@yahoo.com
Reply
#5
sajid_hussain584@yahoo.co Wrote: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
Reply
#6
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
Reply
#7
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
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  Need ACC501 - Business Finance Assignment No 2 Solution. Umar Abbas 2 4,251 02-07-2014, 08:23 PM
Last Post: Umar Abbas
  sta301 assignment 4 27 jun bc110200090 6 3,580 01-26-2013, 02:05 AM
Last Post: Vuhelper
  cs506 2nd assignment millee 0 2,661 12-04-2012, 11:30 PM
Last Post: millee
  cs506 2nd Assignment Neelam Ahmad 5 3,130 12-04-2012, 11:24 PM
Last Post: Vuhelper
  CS 504 Assignment 2 need help ommmi 24 11,422 11-27-2012, 04:59 AM
Last Post: Xpert
  Mcs cs402 1st assignment chahat4all 2 3,767 11-01-2012, 11:11 PM
Last Post: chahat4all
  eng201 assignment 4 due date 4/7/2012 bc110200090 6 2,615 07-03-2012, 03:51 PM
Last Post: bc110200090
  need CS304 4th assignment shazma 0 2,056 06-26-2012, 12:48 PM
Last Post: shazma
  sta301 assignment 4 solution vudecent 0 2,399 06-25-2012, 01:51 AM
Last Post: vudecent
  Required Soluction for 3rd Assignment of CS101 bc120200426 1 2,138 06-14-2012, 04:13 PM
Last Post: Vuhelper

Forum Jump:


Users browsing this thread: 1 Guest(s)