0

i am a beginner of assembly language programming particularly on that with TASM.. We are asked to code a program wherein the user will asked to input a character or a word and then it will print the number of characters inputted by the user.. counting number of characters includes the space(s). here's my code. Kindly help me with this matter.. i really dont know how to fix it..

.MODEL SMALL
.STACK 100h
.DATA

CharPrompt DB 'Enter a word or character: $'
DisplayNumChar DB 13,10,'Number of character is.',13,10, '$'


.CODE
start:
mov ax,@data
mov ds,ax
mov dx,OFFSET CharPrompt
mov ah,9
int 21h
mov ah,10
int 21h


mov ax,@data
mov ds,ax
mov dx,OFFSET DisplayNumChar
mov ah,9
int 21h





mov ah,4ch
mov al,0
int 21h

END start

thank you for the big help.. i need it now badly.. thanks..

2
Contributors
1
Reply
2
Views
9 Years
Discussion Span
Last Post by abhisdm
0

Hi first of all to read the character or word from keyboard u should have a buffer declared at the beginning itself .... then try to get the count of characters from the buffer...

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.