Data segment

Solo disponible en BuenasTareas
  • Páginas : 2 (258 palabras )
  • Descarga(s) : 0
  • Publicado : 22 de noviembre de 2011
Leer documento completo
Vista previa del texto
data segment ; add your data here! menu db "Dame caracteres $" letras db 13,10,"Letras: $" numeros db13,10,"Numeros: $" simbolos db 13,10,"simbolos: $" let db 11 dup("$") num db 11 dup("$") sim db 11 dup("$") cont db 0 cont1 db0 cont2 db 0 aux dw 0 aux1 dw 0 aux2 dw 0 ends stack segment dw 128 dup(0) ends code segment start: mov ax, datamov ds, ax mov es, ax lea dx, menu mov ah, 9h int 21h mov si,0 mov cont,0 mov cont1,0 mov cont2,0 repetir: mov ah, 1hint 21h cmp al,0dh je imprimir cmp al,30h jb simbolo cmp al,39h jna numero cmp al,'A' jb simbolo cmp al,'Z' jbeletra cmp al,'a' jb simbolo cmp al, 'z' ja simbolo letra: cmp cont,10 je repetir

mov si,aux mov let[si],al inc simov aux,si inc cont jmp repetir numero: cmp cont1,10 je repetir mov si,aux1 mov num[si],al inc si mov aux1,si inccont1 jmp repetir simbolo: cmp cont2,10 je repetir mov si,aux2 mov sim[si],al inc si mov aux2,si inc cont2 jmprepetir imprimir: lea dx,letras mov ah,9h int 21h lea dx,let mov ah,9h int 21h lea dx, numeros mov ah,9h int 21h leadx,num mov ah,9h int 21h lea dx,simbolos mov ah,09 int 21h lea dx,sim mov ah,09 int 21h mov ax, 4c00h int 21h ends

tracking img