home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Sound Sensations!
/
sound_sensations.iso
/
soundb
/
voicekit
/
ctv-asm.asm
< prev
next >
Wrap
Assembly Source File
|
1990-02-03
|
5KB
|
280 lines
PAGE 60,132
TITLE Assembly routine for C.
;-----------------------------------------------
; :
; usage: :
; name() :
;-----------------------------------------------
EXTRN _voice_drv : DWORD
PUBLIC _ctv_version, _ctv_io_addx,
PUBLIC _ctv_intr_num, _ctv_initial
PUBLIC _ctv_speaker, _ctv_status_addx
PUBLIC _ctv_output, _ctv_input
PUBLIC _ctv_terminate, _ctv_uninstall
PUBLIC _ctv_pause, _ctv_continue
PUBLIC _ctv_break_loop
GET_VERSION_NUM EQU 0
SET_BASE_IO_ADDX EQU 1
SET_INTERRUPT_NUM EQU 2
INITIAL_DRIVER EQU 3
ON_OFF_SPEAKER EQU 4
SET_STATUS_ADDX EQU 5
OUTPUT_VOICE EQU 6
INPUT_VOICE EQU 7
TERMINATE_PROCESS EQU 8
UNINSTALL_DRIVER EQU 9
PAUSE_VOICE EQU 10
CONTINUE_VOICE EQU 11
BREAK_LOOP EQU 12
SET_USER_FUNCTION EQU 13
_TEXT SEGMENT WORD PUBLIC 'CODE'
_TEXT ENDS
_DATA SEGMENT WORD PUBLIC 'DATA'
_DATA ENDS
CONST SEGMENT WORD PUBLIC 'CONST'
CONST ENDS
_BSS SEGMENT WORD PUBLIC 'BSS'
_BSS ENDS
DGROUP GROUP CONST, _BSS, _DATA
ASSUME CS: _TEXT, DS: DGROUP, SS: DGROUP
_DATA SEGMENT WORD PUBLIC 'DATA'
ASSUME CS: _TEXT, DS: DGROUP, SS: DGROUP
_DATA ENDS
_TEXT SEGMENT WORD PUBLIC 'CODE'
_ctv_version PROC
MOV BX,GET_VERSION_NUM
CALL _voice_drv
RET
_ctv_version ENDP
_ctv_io_addx PROC
PUSH BP
MOV BP,SP
MOV BX,SET_BASE_IO_ADDX
MOV AX,[BP+4]
CALL _voice_drv
POP BP
RET
_ctv_io_addx ENDP
_ctv_intr_num PROC
PUSH BP
MOV BP,SP
MOV BX,SET_INTERRUPT_NUM
MOV AX,[BP+4]
CALL _voice_drv
POP BP
RET
_ctv_intr_num ENDP
_ctv_initial PROC
MOV BX,INITIAL_DRIVER
CALL _voice_drv
RET
_ctv_initial ENDP
_ctv_speaker PROC
PUSH BP
MOV BP,SP
MOV BX,ON_OFF_SPEAKER
MOV AX,[BP+4]
CALL _voice_drv
POP BP
RET
_ctv_speaker ENDP
STATUS_STK STRUC
DW ?
DW ?
STATUS_ADDX DD ?
STATUS_STK ENDS
_ctv_status_addx PROC
PUSH BP
MOV BP,SP
PUSH ES
PUSH DI
LES DI,DWORD PTR [BP + STATUS_ADDX]
MOV BX,SET_STATUS_ADDX
CALL _voice_drv
POP DI
POP ES
POP BP
RET
_ctv_status_addx ENDP
OUTPUT_STK STRUC
DW ?
DW ?
OUTPUT_BUF DD ?
OUTPUT_STK ENDS
_ctv_output PROC
PUSH BP
MOV BP,SP
PUSH ES
PUSH DI
MOV BX,OUTPUT_VOICE
LES DI,[BP+OUTPUT_BUF]
CALL _voice_drv
POP DI
POP ES
POP BP
RET
_ctv_output ENDP
INPUT_STK STRUC
DW ?
DW ?
INPUT_BUF DD ?
BUFSIZE_L DW ?
BUFSIZE_H DW ?
SR DW ?
INPUT_STK ENDS
_ctv_input PROC
PUSH BP
MOV BP,SP
PUSH ES
PUSH DI
MOV BX,INPUT_VOICE
MOV AX,[BP+SR]
MOV DX,[BP+BUFSIZE_H]
MOV CX,[BP+BUFSIZE_L]
LES DI,[BP+INPUT_BUF]
CALL _voice_drv
POP DI
POP ES
POP BP
RET
_ctv_input ENDP
_ctv_terminate PROC
PUSH BP
MOV BX,TERMINATE_PROCESS
CALL _voice_drv
POP BP
RET
_ctv_terminate ENDP
_ctv_uninstall PROC
PUSH BP
MOV BX,UNINSTALL_DRIVER
CALL _voice_drv
POP BP
RET
_ctv_uninstall ENDP
_ctv_pause PROC
MOV BX,PAUSE_VOICE
CALL _voice_drv
RET
_ctv_pause ENDP
_ctv_continue PROC
MOV BX,CONTINUE_VOICE
CALL _voice_drv
RET
_ctv_continue ENDP
_ctv_break_loop PROC
PUSH BP
MOV BP,SP
MOV AX,[BP+4]
MOV BX,BREAK_LOOP
CALL _voice_drv
POP BP
RET
_ctv_break_loop ENDP
_TEXT ENDS
END