Quantcast
Channel: x86 Assembly - Programmers Heaven
Viewing all articles
Browse latest Browse all 152

Need help.. ASAP.. (tasm)

$
0
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



Viewing all articles
Browse latest Browse all 152

Trending Articles