Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- .model small
- .stack
- .data
- intro db 'Versiunea raportata de sistemul de operare este:$'
- tab db '0','1','2','3','4','5','6','7','8','9','10','11','12','13','14','15'
- .code
- start:
- mov ax,@data;15.00 - ax 00 15
- mov ds,ax
- mov dx,offset intro
- mov ah,09h
- int 21h
- mov ah,30h
- int 21h
- push ax; protejam ah
- mov ah,0
- mov dx,0
- mov cx,0
- mov bx,10 ; dx:ax/bx
- descompunere:
- div bx
- push dx ; restul impartitri la 10h
- inc cx
- mov dx,0
- cmp ax,0
- jne descompunere
- afisare:
- pop bx
- mov dl,byte ptr tab[bx]
- mov ah,02h
- int 21h
- loop afisare
- mov dl,'.'
- mov ah,02h
- int 21h
- pop ax
- shr ax,8
- mov ah,0
- mov dx,0
- mov cx,0
- mov bx,10 ; dx:ax/bx
- descompunere2:
- div bx
- push dx ; restul impartitri la 10h
- inc cx
- mov dx,0
- cmp ax,0
- jne descompunere2
- afisare2:
- pop bx
- mov dl,byte ptr tab[bx]
- mov ah,02h
- int 21h
- loop afisare2
- mov ah,4ch
- int 21h
- end start
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement