1
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
2
;; __ __ _______ __ _ _______ __ __ _______ __ _ ;;
3
;; | | | || _ || | | || || |_| || _ || | | | ;;
4
;; | |_| || |_| || |_| || ___|| || |_| || |_| | ;;
5
;; | || || || | __ | || || | ;;
6
;; | || || _ || || || || || _ | ;;
7
;; | _ || _ || | | || |_| || ||_|| || _ || | | | ;;
8
;; |__| |__||__| |__||_| |__||_______||_| |_||__| |__||_| |__| ;;
11
;; HANGMAN - An implementation of the Hang Man game in assembly (Emu8086) ;;
13
;; Copyright (C) 2011 Fabien LOISON ;;
14
;; Copyright (C) 2011 Mathilde BOUTIGNY ;;
15
;; Copyright (C) 2011 Vincent PEYROUSE ;;
16
;; Copyright (C) 2011 Germain CARR� ;;
17
;; Copyright (C) 2011 Matthis FRENAY ;;
19
;; HangMan is free software: you can redistribute it and/or modify ;;
20
;; it under the terms of the GNU General Public License as published by ;;
21
;; the Free Software Foundation, either version 3 of the License, or ;;
22
;; (at your option) any later version. ;;
24
;; This program is distributed in the hope that it will be useful, ;;
25
;; but WITHOUT ANY WARRANTY; without even the implied warranty of ;;
26
;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ;;
27
;; GNU General Public License for more details. ;;
29
;; You should have received a copy of the GNU General Public License ;;
30
;; along with this program. If not, see <http://www.gnu.org/licenses/>. ;;
32
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
36
;; Contains the function for playing sounds.
39
;; _play_sound() -- Play a sound.
44
;========================================================== _play_sound() ====
48
;; mov SOUND, offset <mysound>
52
SOUND dw 0 ;The adress of the sound to play.
77
out 0x42, al ;output low
79
out 0x42, al ;output high
81
;Point to the next field (duration)
85
;Sleep during the given duration
92
;Point to the next field (sound)
96
;Check if it is finished or not