mms00786@uxa.cso.uiuc.edu (06/07/89)
Hi. I am very new to Windows programming, and I am working on a project that involves talking to an AtoD/DtoA card that I designed. The card is mapped to IO (NOT memory) addresses 210h to 213h. My question: Can I write a simple assembly language routine that uses the In and Out instructions without screwing up windows? I would really like to write the software under Windows. If this is possible, could you tell me what the easiest way to to this is? Many thanks in advance. Milan mms00786@uxa.cso.uiuc.edu
mcdonald@uxe.cso.uiuc.edu (06/07/89)
>Hi. >I am very new to Windows programming, and I am working on a project that >involves talking to an AtoD/DtoA card that I designed. The card is mapped to >IO (NOT memory) addresses 210h to 213h. My question: > Can I write a simple assembly language routine that uses the In and Out >instructions without screwing up windows? I would really like to write the >software under Windows. If this is possible, could you tell me what the >easiest way to to this is? >Many thanks in advance. IF your card does not generate interrrupts, it is trivial. Just use the MSC 5.1 inp and outp calls with -Oi and it will work. (Be careful. There are bugs in the inlining. In general, don't put more than one inp or oup in one expression.) If it does generate interrupts, it can still be done. Use the INTERRUPT attribute of MSC (documented in the readme file), use only global variables, and lock the data and code segments that connect to the interrupt. MAke them small. It is very tricky, but can be done. Or, if interrupts are necessary, use a device driver loaded before Windows is and communicate with interrupts. Again, in this case lock everything before communication with the interrupt handler, and unlock later. And, I got everything I needed done in C with NO assembler, even with interrupts. Doug McDonald .