Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- format MZ
- stack stk:256
- entry codseg:main
- macro delay time
- {
- LOCAL ext,iter
- push cx
- mov cx, time
- ext:
- push cx
- mov cx,5000
- iter:
- loop iter
- pop cx
- loop ext
- pop cx
- }
- segment stk use16
- db 256 dup (?)
- segment sdat use16
- tone dw 500
- segment codseg use16
- main:
- ;;;;;;;;;;;;;;;;;;;;;;;;;;
- mov ax,sdat
- mov ds,ax;
- xor ax,ax
- mov al,036h ;ustawienie danych
- out 43h,al
- in al,61h
- or al,3h
- out 61h,al
- mov ax,[tone]
- out 42h,al
- mov al,ah
- out 42h,al
- delay 10
- in al,61h
- and al,0fch
- out 61h,al
- ;;;;;;;;;;;;;;;;;;;; oczekiwanie na naciśnięcie klawisza
- pop es
- mov ah,1h
- int 21h
- ;;;;;;;;;;;;;;;;;
- ;;;;;;;;;;;;; wyjscie z prog
- mov ax,4c00h
- int 21h
- ret
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement