"Ed Mulroy [TeamB]" <
XXXX@XXXXX.COM >wrote in message
Quote
From the command line
tlib /C libname.lib -+file1.obj -+file2.obj +-file3.obj {etc}
where -+ means replace so when you first create the library it will give
you a warning that the files did not already exist in the library.
From a response file
tlib /C libname.lib @respfile.txt
where respfile.txt contains
-+file1.obj &
-+file2.obj &
-+file3.obj
Note that the & line continuation character must be preceeded by a space.
From the IDE I do not remember the location of the library selection, but
could not tell you even if I did because it varies among versions and you
have not mentioned what version you are using. Look at the target types
that you can create. Use the help.
. Ed
>D Kat wrote in message
>news:4162f33b$ XXXX@XXXXX.COM ...
>
>Nope. I don't want to do this in builder. This is for a DOS program. I
>meant Borland not Builder. Sorry.
OK, this all looks familiar.... Thank you.
Now on to a question about ..... what can and cannot go in the lib file..
Where to begin.
The programs written by the students opens a binary file that is then output
to a D/A.
I would like the Library to have in it the function that initializes the
board, resets the computer vectors after the board is done with, etc.
Ideally I would like to have the interrupt function in the library itself
but this is going to be using the file being opened by the program which the
student writes that uses the library... In addition I'm using double
buffering so using a pointer in a simple sense won't work... Should I
declare the double array FileBuffer that is used to be an external in the
Library? I'm currently using a pointer that is assigned the active buffer
each time an end of buffer is reached..... Then of course there are the
counters (ticks for each call to the interrupt) and other variables that are
needed by the main program. I seem to be going around in circles on this.
I think I have just convinced myself that this routine cannot go into the
library. Thoughts or advice would be appreciated.
//==========================================================================
//interrupt routine with play and button catch
//=======================================================================
void __interrupt i_service(...)// Daq801 interrupt service routine
{
disable(); // disable the interrupts
int button,i; // button iterator
unsigned char PA_buttons,PC_buttons; // temp holding register for current
buttons
inp(I_STATUS); // read the interrupt status register and clear interrupt
for (i=0;i<TIMERS;i++)
{
counter[i]++; // increment all up-counters
if (timer[i] !=0)
{ timer[i]--;} // decrement ?32 timer array elements if not zero!
}
if (counter[0] == file_length)PLAYFLAG=0;
if (PLAYFLAG==1)
{
if (counter[1] == (readlength[playndx]-1))
{//if at end of buffer point to next buffer
playndx++;
if(playndx==NUMBUF)playndx=0;//next buffer at 0 if beyond last buffer
if(readlength[playndx]<2) PLAYFLAG=0;//if buffer empty - stop play
else{ //else setup to play next buffer and read next buffer
da_point = &wavebuffer[playndx][0]; //point to next buffer to play
counter[1]=0;//counter for this buffer set to beginning
READ = 1;
}// read flag: buffer is empty ->fill buffer
}
outpw(DA_0,*da_point);
outpw(DA_1,*da_point++);
}
if (BUTTONFLAG)
{
PA_buttons=(inp(PA)); // freeze data
if (PA_buttons != MASK)// process following path only if one or more
{ // buttons were pressed!
for (button=0;button<NBUTTONS-4;button++)
{
if ((PA_buttons &(1<<button))==0 && counter_time[button]==0)
{
press_count++; // increment press counter
counter_time[button]=counter[0]; // record response time
}
}
}
PC_buttons=(inp(PC)&UPPER_MASK); // freeze data & mask off upper buttons
if ((PC_buttons) != UPPER_MASK)// process following path only if one or
more
{ // buttons were pressed!
for (button=4;button<NBUTTONS-4;button++)
{
if ((PC_buttons &(1<<button))==0 && counter_time[button+4]==0)
{
press_count++; // increment press counter
counter_time[button+4]=counter[0]; // record response time
}
}
}
}
outp(0x20,EOI_IRQ3); // clear the 8259 interrupt
enable(); // re-enable the interrupts
} // end of interrupt service routine