?? read_lpt.c
字號:
/* * Written by Der Herr Hofrat, der.herr@hofr.at * (C) 2002 FSMLabs * License: GPL Version 2 */#include <stdio.h>#include <unistd.h>#include <stdlib.h> /* exit */#include <sys/io.h>#define LPT 0x378int main(void){ int in; if (ioperm(LPT, 3 , 1) < 0) { fprintf(stderr,"ioperm: error accessing to IO-ports. Root Privileges required"); exit(-1); } while(1) { in=inb(LPT+1); in = in >> 3; in = in & 0x0f; printf("%x\n",in); usleep(100000); } exit(0);}
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -