Date: Fri, 6 Jan 95 13:16:09 MST From: craig AT sunspot DOT noao DOT edu (Craig Gullixson) To: djgpp AT sun DOT soe DOT clarkson DOT edu Subject: Re: Data acquisition with djgpp?? >Hi all, > >Has anybody tried using djgpp to control one of the popular data >acquisition cards (Nat. Inst.; Scientific Solutions/Tecmar; Metrabyte >...)? How hard would it be to convert C libraries written for bcc that >control the cards? Obviously one would need to handle different-sized >data types, but I'm wondering whether there's some particularly nasty >sticking point. > >Thanks in advance, >D > >-- >David J. Perkel perkel AT slice DOT etho DOT caltech DOT edu >Division of Biology, 216-76 >California Institute of Technology >Pasadena, CA 91125 >Tel: (818) 395-6816 FAX: (818) 449-0679 > I've just finished with converting two of the libraries from a Symmetric Research DSP board. The libraries were set up to be compiled using bcc and msc. Besides the should an int become a short question, I found most of the conversion to be pretty straight forward. On semi-nasty thing was converting inline assembly. In the end, I ended with one line of inline assembly replacing the rest with libc and libpc library calls. The libc stuff replaced file I/O calls that were in assembly for using the library with fortran. The libpc calls were mostly inport and outport calls. Most of the other problems I had were where there were sloppy code problems containing assumptions about incrementing pointers properly and assumptions about initialization of memory chunks and string pointers that didn't fly in a strict ansi enviroment. I think that any board that communicates to the PC using the PIO ports should be pretty straight forward to convert using the libpc library routines. It is important to exercise the system pretty completely using whatever examples that came with it. Note: I haven't had the need to use the graphics library yet --- when I do get around to converting it, I expect to rip out most/all of the low level graphics routines (mostly assembly) and replace them with libgrx calls. ________________________________________________________________________ Craig A. Gullixson Senior Research Associate INTERNET: craig AT sunspot DOT noao DOT edu National Solar Observatory/Sac. Peak PHONE: (505) 434-7065 Sunspot, NM 88349 USA