Académique Documents
Professionnel Documents
Culture Documents
Chisinu 2013
ciclu: inc si dec cx jcxz iesire lodsb cmp bl,'0' je urmator inc cont urmator: loop ciclu iesire: add cont,30h mov dl,cont mov ah,02h int 21h mov ax,4c00h int 21h end
Problema 2
Codul ASCI
.model small .stack 100h .data tab_conv db '0123456789ABCDEF' mesaj db ' are codul ASCII ' tasta db 2 dup(?),0ah,0dh,'$' .code mov ax,@data mov ds,ax mov ah,01h int 21h mov ah,al and al,0fh lea bx,tab_conv xlat tab_conv mov tasta+1,al mov al,ah mov cl,4 shr al,cl xlat tab_conv mov tasta,al lea dx,mesaj mov ah,09h int 21h mov ax,4c00h int 21h end
mov ds,ax mov ah,09h lea dx,mes int 21h mov cx,lung lea si,mas cld mov bl,[si] ciclu: inc si dec cx jcxz iesire lodsb cmp bl,al jge urmator mov bl,al urmator: loop ciclu iesire: add bx,30h mov max,bl mov dl,max mov ah,02h int 21h mov ax,4c00h int 21h end