Murugan.com
Murugan Andezuthu Dharmaratnam

  |  HOME   |  BLOG   |  TWITTER   |  ARTICLES   |  8086  |  C++   |  VC++   |  ASP .NET   |  VB .NET   |  JAVA SCRIPT   |  MS SQL   |  MY   |  VIDEOS   |  DOWNLOADS   |  CONTACT ME   |  



8086 Assembly Language Sound Blaster Programming Play wav File

Home   8086   8086 Assembly Language Sound Blaster Programming Play wav File         


Here's thec code to play uncompressed 8 bit wav file using sound blaster. I guess the code is too old but you do get the concept on how it used to be done in the olden days

.model tiny
.code
org 100h
main proc near
mov di,offset filename
call sbplay
mov ah,4ch
mov al,00
int 21h
endp
filename db "c:\1.wav"
include sound.inc
include procedur.inc
end main

sbplaymac macro filnam
;    mov bufferlen,bufferlenm
    mov di,offset filnam
    call sbplay
endm

resetsb macro 
    mov dx,226       ; The reset port
    mov al,1
    out dx,al
    mov cx,200
    loop $
    mov al,0
    out dx,al
endm

reads macro 
    mov dx,22ch
    mov al,20h
    out dx,al
    mov dx,22ah
    in al,dx
endm





  |  HOME   |  BLOG   |  TWITTER   |  ARTICLES   |  8086  |  C++   |  VC++   |  ASP .NET   |  VB .NET   |  JAVA SCRIPT   |  MS SQL   |  MY   |  VIDEOS   |  DOWNLOADS   |  CONTACT ME   |  

Copyright 2009 @ Murugan Andezuthu Dharmaratnam