Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- .model small
- .stack 10h
- .data
- STR1 DB "45","$"
- COUNTSYM DW (?)
- NUMBER DB (?)
- he db (?)
- temp DB 2 dup(" "),"$"
- .code
- assume ss:@stack ,cs:@code ,ds:@data
- push ds
- push 0
- push @data
- pop ds
- push ds
- pop es
- begin:
- .386
- mov ax,53
- call IntToStr
- mov ah,0
- mov ah , 09h
- lea dx,temp
- int 21h
- IntToStr proc
- push cx
- push dx
- push di
- push ax
- mov cx,3
- lea SI,temp
- FILL_BUF_:
- mov byte ptr [si],' '
- inc si
- LOOP FILL_BUF_
- mov [si+1],'$'
- mov di,10
- or ax,ax
- jns CLR_DVD_
- neg ax
- CLR_DVD_:
- xor dx,dx
- div di
- add dx,'0'
- dec si
- mov byte ptr [si],dl
- dec cx
- or ax,ax
- jnz CLR_DVD_
- pop ax
- or ax,ax
- jns NOMORE_
- dec si
- mov byte ptr [si],'-'
- inc cx
- NOMORE_:
- pop di
- pop dx
- pop cx
- ret
- IntToStr endp
- MOV AH, 4Ch ;завершаем программу с помощью
- INT 21h ;функции 4c прерывания 21h
- end begin
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement