Mixer Volume Ctrler V1.0

Source: Internet
Author: User

Dos the sound card volume control program, with memory-resident keyboard activated way of controlling Cd-audio,midi,voice and master volume (not as a keyboard solution blocking processing, interested to add)

CTRL-F1--TURN MASTER vol. up

CTRL-F2--TURN MASTER vol. down

CTRL-F3--TURN CD vol. up

CTRL-F4--TURN CD vol. down

Ctrl-f5--TURN FM vol. up

Ctrl-f6--TURN FM vol. down

Ctrl-f7--TURN VOICE vol. up

Ctrl-f8--TURN VOICE vol. down

Source:

Code segment
Assume Cs:code,ds:code
Org 100h
BEGIN:JMP Init
R1 equ 224h
R2 equ 225h
INT9 DD?
Mark DB ' Zd '
New_int proc Far
STi
Push AX
Push ES
XOR Ax,ax
MOV Es,ax
In al,60h
Test al,80h
JNZ exit1
Test byte ptr es:[0417h],100b
JZ exit1
CMP al,59; F1
JZ OK
CMP al,60; F2
JZ OK
CMP al,61; F3
JZ OK
CMP al,62; F4
JZ OK
CMP al,63; F5
JZ OK
CMP al,64; F6
JZ OK
CMP al,65; F7
JZ OK
CMP al,66; F8
JZ OK
JMP exit1
Ok:
Push AX
Push BX
Push CX
Push DX
Push BP
Push di
Push SI
Push DS
MOV Bl,al
Push CS
Pop ds
In al,61h
Push AX
or al,80h
Out 61h,al
Pop ax
Out 61h,al
MOV al,20h
Out 20h,al
Call my
Pop ds
Pop si
Pop di
Pop bp
Pop DX
Pop CX
Pop bx
Pop ax
EXIT1:
Pop es
Pop ax
JMP Cs:int9
New_int ENDP
my proc near;;;;;;;;;;;;; my app;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
O:CMP bl,59
JNZ O1
MOV cl,32h
Call up
JMP quit
O1:CMP bl,61
JNZ O2
MOV cl,38h
Call up
JMP quit
O2:CMP bl,63
JNZ O3
MOV cl,36h
Call up
JMP quit
O3:CMP bl,65
Jnz O4
MOV cl,14h
Call up
JMP quit
;d own
O4:CMP bl,60
JNZ O5
MOV cl,32h
Call down
JMP quit
O5:CMP bl,62
JNZ O6
MOV cl,38h
Call down
JMP quit
O6:CMP bl,64
JNZ O7
MOV cl,36h
Call down
JMP quit
O7:CMP bl,66
JNZ O8
MOV cl,14h
Call down
JMP quit
O8:
Quit:ret
My ENDP
up proc near;;;;;;;;;;;;;;; up;;;;;;;;;;;;;
XOR Ax,ax
MOV al,cl
MOV dx,r1
Out Dx,al
MOV dx,r2
In AL,DX
Add ax,11h
CMP AX,0FFH
Jle Goon
MOV AX,0FFH
Goon
Push AX
MOV al,cl
MOV dx,r1
Out Dx,al
Pop ax
MOV dx,r2
Out Dx,al
Ret
Up ENDP
down proc near;;;;;;;;D OWN;;;;;;;;;;;;
XOR Ax,ax
MOV al,cl
MOV dx,r1
Out Dx,al
MOV dx,r2
In AL,DX
Sub ax,11h
CMP ax,0h
Jge Go
MOV ax,0h
Go
Push AX
MOV al,cl
MOV dx,r1
Out Dx,al
Pop ax
MOV dx,r2
Out Dx,al
Ret
Down ENDP
Init:
Cli
Push CS
Pop ds
MOV dx,offset ZD
MOV ah,9
int 21h
MOV ax,3509h
int 21h
CMP word ptr es:[bx-2], ' DZ '
JNZ Install
MOV Dx,offset mes1
MOV ah,9
int 21h
MOV ah,4ch
int 21h
Install
MOV Di,offset int9
mov [DI],BX
mov [di+2],es
Push CS
Pop ds
MOV Dx,offset new_int
MOV ax,2509h
int 21h
STi
mov dx,offset mes
MOV ah,9
int 21h
MOV dx,offset init
int 27h
ZD db ' MIXER VOLUME CTRL V1.0 zdsoft 1995 ', 0dh,0ah, ' $ '
Mes db ' Ctrl-f1-TURN MASTER vol. up ', 0dh,0ah
Mes2 db ' Ctrl-f2-TURN MASTER vol. down ', 0dh,0ah
Mes3 db ' ctrl-f3--TURN CD VOL up ', 0dh,0ah
MES4 db ' Ctrl-f4--TURN CD vol. down ', 0dh,0ah
MES5 db ' Ctrl-f5--TURN FM VOL up ', 0dh,0ah
MES6 db ' Ctrl-f6--TURN FM VOL down ', 0dh,0ah
MES7 db ' Ctrl-f7--TURN VOICE VOL up ', 0dh,0ah
MES8 db ' Ctrl-f8--TURN VOICE vol. down ', 0dh,0ah, ' $ '
Mes1 db ' already install!$ '
Code ends
End begin

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.