⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 compiler.h

📁 远程桌面连接工具
💻 H
📖 第 1 页 / 共 3 页
字号:
}static __inline__ void#if NeedFunctionPrototypes_outw(unsigned short int port,unsigned short int val)#else_outw(port, val)unsigned short int port;unsigned short int val;#endif /* NeedFunctionPrototypes */{     __asm__ __volatile__("outw %0,%1" ::"a" (val), "d" (port));} static __inline__ void#if NeedFunctionPrototypes_outl(unsigned short int port,unsigned int val)#else_outl(port, val)unsigned short int port;unsigned int val;#endif /* NeedFunctionPrototypes */{   __asm__ __volatile__("outl %0,%1" : :"a" (val), "d" (port));}static __inline__ unsigned int#if NeedFunctionPrototypes_inb(unsigned short int port)#else_inb(port)unsigned short int port;#endif /* NeedFunctionPrototypes */{     unsigned char ret;     __asm__ __volatile__("inb %1,%0" :                          "=a" (ret) :                          "d" (port));     return ret;}static __inline__ unsigned int#if NeedFunctionPrototypes_inw(unsigned short int port)#else_inw(port)unsigned short int port;#endif /* NeedFunctionPrototypes */{     unsigned short ret;     __asm__ __volatile__("inw %1,%0" :                          "=a" (ret) :                          "d" (port));     return ret;}static __inline__ unsigned int#if NeedFunctionPrototypes_inl(unsigned short int port)#else_inl(port)unsigned short int port;#endif /* NeedFunctionPrototypes */{   unsigned int ret;   __asm__ __volatile__("inl %1,%0" :       "=a" (ret) :       "d" (port));   return ret;}#if defined(PC98_PW) || defined(PC98_XKB) || defined(PC98_NEC) || defined(PC98_PWLB) || defined(PC98_GA968)#define PW_PORT 0x600extern short chipID;#if NeedFunctionPrototypesextern void *mmioBase;#elseextern unsigned char *mmioBase;#endifextern unsigned short _port_tbl[];#define	port_convert(x)	_port_tbl[(unsigned short)x]#endif #if defined(PC98_WAB) ||  defined(PC98_GANB_WAP)static __inline__ unsigned shortport_convert(unsigned short port){     port <<= 8;     port &= 0x7f00; /* Mask 0111 1111 0000 0000 */     port |= 0xE0;     return port;}#endif /* PC98_WAB || PC98_GANB_WAP */ #if defined(PC98_WABEP)static __inline__ unsigned shortport_convert(unsigned short port){     port &= 0x7f; /* Mask 0000 0000 0111 1111 */     port |= 0x0f00;     return port;}#endif /* PC98_WABEP */#ifdef PC98_WSNAstatic __inline__ unsigned shortport_convert(unsigned short port){     port <<= 8;     port &= 0x7f00; /* Mask 0111 1111 0000 0000 */     port |= 0xE2;     return port;}#endif /* PC98_WSNA */#ifdef PC98_NKVNEC#ifdef	PC98_NEC_CIRRUS2static __inline__ unsigned shortport_convert(unsigned short port){     port = (port & 0xf) + ((port & 0xf0) << 4) + 0x0050;     return port;}#elsestatic __inline__ unsigned shortport_convert(unsigned short port){     port = (port & 0xf) + ((port & 0xf0) << 4) + 0x00a0;     return port;}#endif /* PC98_NEC_CIRRUS2 */#endif /* PC98_NKVNEC */#if defined(PC98_TGUI) || defined(PC98_MGA)#if NeedFunctionPrototypesextern void *mmioBase;#elseextern unsigned char *mmioBase;#endif#endifstatic __inline__ void#if NeedFunctionPrototypesoutb(unsigned short port,unsigned char val)#elseoutb(port, val)unsigned short port;unsigned char val;#endif /* NeedFunctionPrototypes */{#if defined(PC98_GANB_WAP) || defined(PC98_NKVNEC) || defined(PC98_WAB) || \    defined(PC98_WABEP) || defined(PC98_WSNA) || defined(PC98_PW) || \    defined(PC98_XKB) || defined(PC98_NEC)   unsigned short tmp;   tmp=port_convert(port);   port=tmp;#endif#if defined(PC98_NEC)||defined(PC98_PWLB)||defined(PC98_TGUI)||defined(PC98_MGA)   *(volatile unsigned char *)((char *)mmioBase+(port)) = (unsigned char)(val);#else   __asm__ __volatile__("outb %0,%1" : :"a" (val), "d" (port));#endif}static __inline__ void#if NeedFunctionPrototypesoutw(unsigned short port,unsigned short val)#elseoutw(port, val)unsigned short port;unsigned short val;#endif /* NeedFunctionPrototypes */{#if defined(PC98_GANB_WAP) || defined(PC98_NKVNEC) || defined(PC98_WAB) || \    defined(PC98_WABEP) || defined(PC98_WSNA) || defined(PC98_PW) || \    defined(PC98_XKB) || defined(PC98_NEC)   unsigned short tmp;   tmp=port_convert(port);   port=tmp;#endif#if defined(PC98_NEC)||defined(PC98_PWLB)||defined(PC98_TGUI)||defined(PC98_MGA)   *(volatile unsigned short *)((char *)mmioBase+(port)) = (unsigned short)(val);#else   __asm__ __volatile__("outw %0,%1" : :"a" (val), "d" (port));#endif}static __inline__ void#if NeedFunctionPrototypesoutl(unsigned short port,unsigned int val)#elseoutl(port, val)unsigned short port;unsigned int val;#endif /* NeedFunctionPrototypes */{#if defined(PC98_GANB_WAP) || defined(PC98_NKVNEC) || defined(PC98_WAB) || \    defined(PC98_WABEP) || defined(PC98_WSNA) || defined(PC98_PW) || \    defined(PC98_XKB) || defined(PC98_NEC)   unsigned short tmp;   tmp=port_convert(port);   port=tmp;#endif#if defined(PC98_NEC)||defined(PC98_PWLB)||defined(PC98_TGUI)||defined(PC98_MGA)   *(volatile unsigned int *)((char *)mmioBase+(port)) = (unsigned int)(val);#else   __asm__ __volatile__("outl %0,%1" : :"a" (val), "d" (port));#endif}static __inline__ unsigned int#if NeedFunctionPrototypesinb(unsigned short port)#elseinb(port)unsigned short port;#endif /* NeedFunctionPrototypes */{   unsigned char ret;#if defined(PC98_GANB_WAP) || defined(PC98_NKVNEC) || defined(PC98_WAB) || \    defined(PC98_WABEP) || defined(PC98_WSNA) || defined(PC98_PW) || \    defined(PC98_XKB) || defined(PC98_NEC)   unsigned short tmp;   tmp=port_convert(port);   port=tmp;#endif#if defined(PC98_NEC)||defined(PC98_PWLB)||defined(PC98_TGUI)||defined(PC98_MGA)   ret =*(volatile unsigned char *)((char *)mmioBase+(port));#else   __asm__ __volatile__("inb %1,%0" :       "=a" (ret) :       "d" (port));#endif   return ret;}static __inline__ unsigned int#if NeedFunctionPrototypesinw(unsigned short port)#elseinw(port)unsigned short port;#endif /* NeedFunctionPrototypes */{   unsigned short ret;#if defined(PC98_GANB_WAP) || defined(PC98_NKVNEC) || defined(PC98_WAB) || \    defined(PC98_WABEP) || defined(PC98_WSNA) || defined(PC98_PW) || \    defined(PC98_XKB) || defined(PC98_NEC)   unsigned short tmp;   tmp=port_convert(port);   port=tmp;#endif#if defined(PC98_NEC)||defined(PC98_PWLB)||defined(PC98_TGUI)||defined(PC98_MGA)   ret =*(volatile unsigned short *)((char *)mmioBase+(port));#else   __asm__ __volatile__("inw %1,%0" :       "=a" (ret) :       "d" (port));#endif   return ret;}static __inline__ unsigned int#if NeedFunctionPrototypesinl(unsigned short port)#elseinl(port)unsigned short port;#endif /* NeedFunctionPrototypes */{   unsigned int ret;#if defined(PC98_GANB_WAP) || defined(PC98_NKVNEC) || defined(PC98_WAB) || \    defined(PC98_WABEP) || defined(PC98_WSNA) || defined(PC98_PW) || \    defined(PC98_XKB) || defined(PC98_NEC)   unsigned short tmp;   tmp=port_convert(port);   port=tmp;#endif#if defined(PC98_NEC)||defined(PC98_PWLB)||defined(PC98_TGUI)||defined(PC98_MGA)   ret =*(volatile unsigned int *)((char *)mmioBase+(port));#else   __asm__ __volatile__("inl %1,%0" :       "=a" (ret) :       "d" (port));#endif   return ret;}#endif /* PC98 */#else	/* GCCUSESGAS */static __inline__ void#if NeedFunctionPrototypesoutb(unsigned short int port,unsigned char val)#elseoutb(port, val)unsigned short int port;unsigned char val;#endif /* NeedFunctionPrototypes */{  __asm__ __volatile__("out%B0 (%1)" : :"a" (val), "d" (port));}static __inline__ void#if NeedFunctionPrototypesoutw(unsigned short int port,unsigned short int val)#elseoutw(port, val)unsigned short int port;unsigned short int val;#endif /* NeedFunctionPrototypes */{  __asm__ __volatile__("out%W0 (%1)" : :"a" (val), "d" (port));}static __inline__ void#if NeedFunctionPrototypesoutl(unsigned short int port,unsigned int val)#elseoutl(port, val)unsigned short int port;unsigned int val;#endif /* NeedFunctionPrototypes */{  __asm__ __volatile__("out%L0 (%1)" : :"a" (val), "d" (port));}static __inline__ unsigned int#if NeedFunctionPrototypesinb(unsigned short int port)#elseinb(port)unsigned short int port;#endif /* NeedFunctionPrototypes */{  unsigned char ret;  __asm__ __volatile__("in%B0 (%1)" :		   "=a" (ret) :		   "d" (port));  return ret;}static __inline__ unsigned int#if NeedFunctionPrototypesinw(unsigned short int port)#elseinw(port)unsigned short int port;#endif /* NeedFunctionPrototypes */{  unsigned short int ret;  __asm__ __volatile__("in%W0 (%1)" :		   "=a" (ret) :		   "d" (port));  return ret;}static __inline__ unsigned int#if NeedFunctionPrototypesinl(unsigned short int port)#elseinl(port)unsigned short int port;#endif /* NeedFunctionPrototypes */{  unsigned int ret;  __asm__ __volatile__("in%L0 (%1)" :                   "=a" (ret) :                   "d" (port));  return ret;}#endif /* GCCUSESGAS */#else /* !defined(FAKEIT) && !defined(__mc68000__) */static __inline__ void#if NeedFunctionPrototypesoutb(unsigned short int port,unsigned char val)#elseoutb(port, val)unsigned short int port;unsigned char val;#endif /* NeedFunctionPrototypes */{}static __inline__ void#if NeedFunctionPrototypesoutw(unsigned short int port,unsigned short int val)#elseoutw(port, val)unsigned short int port;unsigned short int val;#endif /* NeedFunctionPrototypes */{}static __inline__ void#if NeedFunctionPrototypesoutl(unsigned short int port,unsigned int val)#elseoutl(port, val)unsigned short int port;unsigned int val;#endif /* NeedFunctionPrototypes */{}static __inline__ unsigned int#if NeedFunctionPrototypesinb(unsigned short int port)#elseinb(port)unsigned short int port;#endif /* NeedFunctionPrototypes */{  return 0;}static __inline__ unsigned int#if NeedFunctionPrototypesinw(unsigned short int port)#elseinw(port)unsigned short int port;#endif /* NeedFunctionPrototypes */{  return 0;}static __inline__ unsigned int#if NeedFunctionPrototypesinl(unsigned short int port)#elseinl(port)unsigned short int port;#endif /* NeedFunctionPrototypes */{  return 0;}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -