Update of /cvsroot/pure-data/externals/zexy/src In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv14403
Modified Files: winNT_portio.c Log Message: ifdef'ed the assembler to be used only with M$-VC (doesn't work with mingw)
Index: winNT_portio.c =================================================================== RCS file: /cvsroot/pure-data/externals/zexy/src/winNT_portio.c,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** winNT_portio.c 19 May 2005 09:42:55 -0000 1.2 --- winNT_portio.c 9 Jun 2005 11:46:16 -0000 1.3 *************** *** 7,11 **** * if the interface changes, only this file has to be adopted for the target system */ ! #ifdef NT
#include <stdio.h> --- 7,11 ---- * if the interface changes, only this file has to be adopted for the target system */ ! #ifdef __WIN32__
#include <stdio.h> *************** *** 22,29 **** // byte = _inp((unsigned short)port); unsigned char value; ! __asm mov edx,port __asm in al,dx __asm mov value,al return (int)value; } --- 22,34 ---- // byte = _inp((unsigned short)port); unsigned char value; ! #ifdef _MSC_VER __asm mov edx,port __asm in al,dx __asm mov value,al + #else + // hmm, i should read some documentation about inline assembler + post("lpt: cannot read from parport (recompile!)"); + return 0; + #endif return (int)value; } *************** *** 31,39 **** void write_parport(int port, int invalue) { ! // _outp((unsigned short)port, value); ! BYTE value = (BYTE)invalue; ! __asm mov edx,port ! __asm mov al,value ! __asm out dx,al }
--- 36,59 ---- void write_parport(int port, int invalue) { ! // _outp((unsigned short)port, value); ! BYTE value = (BYTE)invalue; ! #ifdef _MSC_VER ! __asm mov edx,port ! __asm mov al,value ! __asm out dx,al ! #else ! // hmm, i should read some documentation about inline assembler ! // and probably about assembler in general... ! post("lpt: cannot write to parport (recompile!)"); ! /* ! asm( ! "mov %%edx,%0\n" ! "mov %%al,%1\n" ! "out %%dx,%%al\n" ! : ! : "a"(port),"b"(value) ! ); ! */ ! #endif }
*************** *** 105,109 **** } } ! #endif /* NT */
void z_winNT_portio_setup(void) --- 125,129 ---- } } ! #endif /* __WIN32__ */
void z_winNT_portio_setup(void)