• 当前位置:首页>>汇编语言>>汇编语言实例分析>>Mixer Volume Ctrler V1.0
  • Mixer Volume Ctrler V1.0
  •    Dos 下的声卡音量控制程序,以内存驻留键盘激活的方式控制CD-Audio,MIDI,Voice以及Master的音量(未作键盘的解封锁处理,有兴趣可加上)
    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

    源码:
    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

    ;down

    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:

    [1] [2] 下一页  

  • 上一篇:Game Faster V1.0
    下一篇:WIN98SE硬盘主引导记录代码数据注释