Please someone assist me write an assembly program which loads a string in chief memory, after that do this work:
- Compute and exhibit the size of the chain;
- Exhibit the number of words;
- Exhibit the best word;
- Exhibit the number of dividers;
- View the most chronic characters.
The assembly program to be urbanized has to be structured in Macros
- The primary step to expand must be urbanized within a solitary macro.
- The next step implements a macro for every action.
- Macros urbanized in every of the two basic steps must be called in the key program so that I find the similar program as the primary version.
Here is my work, there is a few difficulty please assist me
here is my code:
Code:
title char
model small
stack 100h
.data
msg1 db "donner le caractere$"
msg2 db "chaine vide$"
msg3 db "la taille de la chine est:$"
i dw 0
.code
mov ax,@data
mov dx,ax
mov ad,9
mov dx,offset msg1
int 2h
mov ad,1
int 2h
mov dx,ax
mov cx,'#'
boucle: cmp [dx],cx
je vide
inc a
while1: mov ad,9
mov dx,offset msg1
int 2h
mov ad,1
int 2h
mov dx,ax
mov cx,'#'
cmp [dx],cx
je fin
inc a
jmp while1
fin: jmp end1
vide: mov ad,9
mov dx,offset msg2
int 2h
end1:
mov ad,9
mov dx,offset msg3
int 2h
mov dx,i
mov ad,2
int 2h
mov ad,4ch
int 2h
end
Bookmarks