home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Sound Sensations!
/
sound_sensations.iso
/
demos
/
promidi7
/
sda_user.arc
/
SDA_USER.DOC
< prev
Wrap
Text File
|
1986-12-16
|
6KB
|
177 lines
Software Interface to the Promidi Studio System, SDA--200.
Systems Design Associates, Inc.
928 W. University Suite 660
Denton, Texas 76201
Revision: 1.0
Release Date: 12-15-86
Software: C11 and above.
This document is intended to describe the Promidi Software Userì
Interface as it pertains to memory resident software. Both thisì
document and the accompanying source file of IBM assembly languageì
subroutines, SDA_USER.ASM, are in the public domain. This growingì
collection of subroutines is intended to provide designers of memoryì
resident software access into a running Promidi system. Through theseì
subroutines Promidi can be used to provide services much like anì
operating system, ranging in complexity from simple Midi Get and Putì
Byte routines, to complete Record and Playback functions.
This document is intended to provide specific information to designersì
already familiar with what is known as 'IBM-PC Terminate-and-Stay-Resident'
software design.
Memory Resident Software Requirements.
PC-DOS (MS-DOS) 2.0 or later is required.
384 K. Bytes plus the memory necessary for the resident software is
required.
The software should be installed before Promidi is run.
The software should get control by intercepting INT 16 (The keyboard
I/O call) and looking for an ALT key (Promidi does not use ALT keys),
but only if AH is 0, that is, Promidi is actually reading (not
testing for) a keystroke.
Promidi does not use graphics modes in any of its screens, therefore,
saving the screens is relatively straightforward. In the future, SDA
intends to provide a general-purpose 'screen redraw' subroutine to be
used at the end of the user interrupt.
The software should return the ALT key to Promidi at the end of the
interrupt. If this is not done, upon returning to Promidi, the user
will have to hit an "extra" keystroke.
Calls into Promidi require only 40 bytes of user stack space
(maximum). Promidi's stacks are used for all operations.
Using The Subroutines in 'SDA_USER.ASM'.
These subroutines, while provided in IBM MASM assembler format, areì
callable as C Functions when linked Microsoft C (versions 3.0 andì
greater) modules. Whether called from C or assembler language, they areì
FAR routines. If NEAR calls are desired, or if for instance theì
designer wishes to pass and return parameters differently, the source inì
SDA_USER.ASM may be modified accordingly.
Saving Promidi's Data Segment (DS register).
Upon each entrance to the memory resident software (through INT 16),ì
when saving Promidi's context, the contents of Promidi's DS registerì
must be saved in '_SDA_DSEG' (public in SDA_USER.ASM).
Checking for The Midicard Interface.
Upon each entrance to the memory resident software (through INT 16), theì
subroutine '_CHECK4_SDA' must be called SUCCESSFULLY. This routineì
performs two functions:
1. It test for and locates a running SDA Midicard Interface.
2. It run-time binds the memory resident software to Promidi.
If this routine does not complete successfully (see subroutine header inì
'SDA_USER.ASM'), no other Promidi subroutines should be called.
CURRENT LIST OF USER SUBROUTINES.
Output.
_SDA_PUTB - Send a byte (of a complete Midi message) out Midi Out.
Input.
_SDA_RECON - Go into record mode.
This routine must be called before any input can be received via
the Midicard Interface. It has three functions:
1. It check to see if Promidi is currently recording. If so no
user recording can be done.
2. It allocates a record buffer within Promidi (the number of
bytes are returned from the call). This buffer will usually
be about 40K bytes.
3. It tells the Midicard to start sending data to Promidi.
_SDA_RECOFF - Leave record mode.
This routine must be called (if _SDA_RECON was called) before the
memory resident sotware terminates (returns from INT16).
** Failure to do so will result in the loss of the record buffer. **
_SDA_GETB - Get a byte of a complete Midi message from the record
buffer.
General.
_SDA_EXEC - Runs other Promidi Tasks.
If the memory resident software needs to run while Promidi is
recording and/or playing, frequent calls to _SDA_EXEC are necessary
to keep the record playback process 'alive'. A call every 15 or 20
milliseconds is usually sufficient to keep the Midicard supplied
with data (playback).
Notes on The Environment.
Promidi only reads keyboard characters (INT 16, AH=0) from one of itsì
tasks. The memory resident software, even though it accessed as anì
interrupt, becomes an extension of that task when it uses Promidiì
services via the SDA_USER subroutines. That task does not do disk I/O. ì
To keep disk I/O active during Promidi's record or playback, calls toì
_SDA_EXEC are required.
The source file 'SDA_USER.ASM' is provided free of charge by Systems
Design Associates, Inc. SDA does not in any way warranty this software
nor is it liable for any damages resulting from its use.
Revision: 1.0
Date: 12-01-86
12-15-86
Software: C11 and above.
This document is intended to describe the Promidi Software Userì
Interface as