From: frederico s. <fre...@gm...> - 2008-07-21 16:24:18
|
please see this: #include <stdio.h> #include <stdlib.h> #include <conio.h> #include <asm/io.h> #include <unistd.h> #define LPT1 0x378 int libera_porta(){ if(ioperm(LPT1,3,1)==1)//libera acesso para os endereços 0x378,0x379,0x37A return(1); else return(0); } fecha_porta(){ ioperm(LPT1,3,0); } main(){ if(libera_porta() == 1) printf("\nPorta liberada com sucesso\n"); else printf("\nPorta nao liberada\n"); //outb(255,LPT1); fecha_porta(); } I was execute on root, but never get permission to use the lpt, and when outb is not reviewed I recive this error: (.text+0x101): undefined reference to '__outb'. tanks |