D4n1l0d Posted December 20, 2006 Report Share Posted December 20, 2006 Como eu faço para "obter" as funções inPortB e OutPortB no delphi:???Em C seria assim ( apesar delas já virem no stdio.h )unsigned char inportb (unsigned short _port){ unsigned char rv; __asm__ __volatile__ ("inb %1, %0" : "=a" (rv) : "dN" (_port)); return rv;}void outportb (unsigned short _port, unsigned char _data){ __asm__ __volatile__ ("outb %1, %0" : : "dN" (_port), "a" (_data));} Quote Link to comment Share on other sites More sharing options...
0 Churc Posted December 20, 2006 Report Share Posted December 20, 2006 opafaz o download da biblioteca inpout32 aqui é opensource...copie a dll inpout32.dll que vem dentro da pasta binaries\DLL para a pasta dosistema normalmenteWin9x,ME: c:\Windows\systemNT, 2000, XP, Vista: c:\Windows\System32declare no seu códigofunction inportb(_Port: Integer): BYTE; StdCall; external 'inpout32.dll';procedure outportb(_Port: Integer; _Data: BYTE); StdCall; external 'inpout32.dll';abraço Quote Link to comment Share on other sites More sharing options...
Question
D4n1l0d
Como eu faço para "obter" as funções inPortB e OutPortB no delphi:???
Em C seria assim ( apesar delas já virem no stdio.h )
unsigned char inportb (unsigned short _port)
{
unsigned char rv;
__asm__ __volatile__ ("inb %1, %0" : "=a" (rv) : "dN" (_port));
return rv;
}
void outportb (unsigned short _port, unsigned char _data)
{
__asm__ __volatile__ ("outb %1, %0" : : "dN" (_port), "a" (_data));
}
Link to comment
Share on other sites
1 answer to this question
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.