Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- .model small
- .stack
- .data
- n dw 3
- f dw ?
- .code
- main:
- mov ax,@data
- mov ds,ax
- mov ax,2
- mov cx,n
- dec cx
- shl ax,cl
- mov n,ax
- mov ax,2
- mov cx,n
- dec cx
- shl ax,cl
- dalje:
- inc ax
- mov f,ax
- mov bx,10
- mov cx,0
- cif:
- cmp ax,0
- je stamp
- mov dx,0
- div bx
- push dx
- inc cx
- jmp cif
- stamp:
- cmp cx,0
- je kraj2
- pop dx
- add dx,'0'
- mov ah,2
- int 21h
- dec cx
- jmp stamp
- kraj2:
- mov ah,4ch
- int 21h
- end main
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement