home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Audio 4.94 - Over 11,000 Files
/
audio-11000.iso
/
msdos
/
sndbords
/
proaudio
/
pcmtlsrc
/
pcm.arj
/
PCM.ASM
< prev
next >
Wrap
Assembly Source File
|
1992-09-01
|
4KB
|
193 lines
;$Author: BCRANE $
;$Date: 01 Sep 1992 13:34:10 $
;$Header: X:/sccs/sdkapp/pcm.asv 1.2 01 Sep 1992 13:34:10 BCRANE $
;$Log: X:/sccs/sdkapp/pcm.asv $
;
; Rev 1.2 01 Sep 1992 13:34:10 BCRANE
; changed VERBOSE to TELLABIT (?) to indicate progress (or not)
;
; Rev 1.1 31 Aug 1992 09:34:00 BCRANE
; added support for 16-bit
;
; Rev 1.0 29 Jul 1992 16:57:52 BCRANE
; Initial revision.
;$Logfile: X:/sccs/sdkapp/pcm.asv $
;$Modtimes$
;$Revision: 1.2 $
;$Workfile: pcm.asm $
page 120,132
title PCM - substitute interrupt vectors
subttl Bart Crane - copyright 1-90 - all rights reserved
TALKABIT equ 1
BUILDALL equ 1
MODELSIZE equ 0
BUILD_PAS3 equ 1
include model.inc
; .model compact, c
.xlist
include macro.inc
.list
program_size equ pcmw - start + 100h
program_para equ program_size shr 4
_text segment
assume cs:_text, ds:_text
org 100h
start: jmp pcmw
f_sig db 'PCM-SHARK (v1.1)' ; Check for residency
f_copy db 'Copyright (c) 1992. Media Vision, Inc. All Rights Reserved.'
;;;;; pcm.inc - data structures, vector tables, resident stuff
include mvsound.asm ; Media Vision Library Code
include pcm.inc ; Interrupt handlers and tables
align 32
i_didone db 0
align 32
pcmw proc
assume cs:_text, ds:_text
mov ax, cs ; Set up data segment
mov ds, ax
mov savedcs, ax ; save for later use
mov ah, 34h ; get "indos" flag address
int 21h
mov word ptr indos[0], bx ; save
mov word ptr indos[2], es
mov cx, MAXINTR ; Count of interrupts to replace
mov si, offset iddata ; Get first intrdata structure
i_do:
mov ax, cs
mov ds, ax ; ds points to data in code segment
if TALKABIT
mov dx, si ; i_name coming up
add dx, nam ; dx gets address of nam in st_intr
dstring ; Display name from list in dx
endif
mov al, byte ptr [si].vnum ; Vector number
mov ah, GETDOSVECTOR
int 21h
nop
nop
nop
nop
call chkforsig ; check signature in isr's segment
jne i_ok
if TALKABIT
dstring s_nuuh ; Display message of already done
endif
jmp short i_done ; Skip to next vector in list
i_ok:
mov ax, cs
mov ds, ax ; just to be sure
mov al, byte ptr [si].vnum ; vector number to replace
mov ah, GETDOSVECTOR
int 21h
mov word ptr [si].vold[0], bx ; save isr address from dos
mov word ptr [si].vold[2], es
nop
nop
nop
nop
nop
nop
mov dx, [si].vnew ; i_intr taken care of
mov al, byte ptr [si].vnum
mov ah, SETDOSVECTOR
int 21h
nop
nop
nop
nop
nop
mov ax, [si].vini ; initialization routine
or ax, ax ; is there one?
jz @F ; no, skip
call ax ; yes, call it
@@: inc i_didone ; Installed a new vector
if TALKABIT
dstring s_done
endif
i_done:
add si, type st_intr
loop i_do
test i_didone, 0FFFFh ; Did we do one?
jz i_quit ; No, don't go resident
if TALKABIT
dstring s_okay ; Display message that its okay
endif
resident (program_para+1)*1 ; ((pcmw-start)>>4)+1
i_quit:
terminate 1 ; Error 1 - already resident
pcmw endp
chkforsig proc near
cmp es:f_sig[0], 'P' ; Check for string in segment
jne @F ; Not, okay to install
cmp es:f_sig[1], 'C'
jne @F
cmp es:f_sig[2], 'M'
jne @F
cmp es:f_sig[3], '-'
jne @F
cmp es:f_sig[4], 'S'
jne @F
cmp es:f_sig[5], 'H'
jne @F
cmp es:f_sig[6], 'A'
jne @F
cmp es:f_sig[7], 'R'
jne @F
cmp es:f_sig[8], 'K'
jne @F
ret ; zr flag set
@@:
ret ; zr flag cleared
chkforsig endp
include gethw.asm
include mvstate.asm
_text ends
end start