_outp(int address,int data); int data=_inp(int address); 不就够了吗?
楼上的真受不了,那有windows上面那么简单,你的方法只适合DOS
25 PIN D-SUB FEMALE at the PC.Pin Name Dir Description 1 /STROBE Strobe 2 D0 Data Bit 0 3 D1 Data Bit 1 4 D2 Data Bit 2 5 D3 Data Bit 3 6 D4 Data Bit 4 7 D5 Data Bit 5 8 D6 Data Bit 6 9 D7 Data Bit 7 10 /ACK Acknowledge 11 BUSY Busy 12 PE Paper End 13 SEL Select 14 /AUTOFD Autofeed 15 /ERROR Error 16 /INIT Initialize 17 /SELIN Select In 18 GND Signal Ground 19 GND Signal Ground 20 GND Signal Ground 21 GND Signal Ground 22 GND Signal Ground 23 GND Signal Ground 24 GND Signal Ground 25 GND Signal GroundInformation from The Hardware Book在Normal 0x378只写,0x379只读,0x37a只写 在EPP模式下,通过0x37a,bit5控制0x378为输入(bit5=1)或输出(bit5=0) 另外0x37a有几个脚好像是状态相反的(即1为低电平,0为高电平) 0x379只有最高位为相反状态.
Legacy Ports
int data=_inp(int address);
不就够了吗?
1 /STROBE Strobe
2 D0 Data Bit 0
3 D1 Data Bit 1
4 D2 Data Bit 2
5 D3 Data Bit 3
6 D4 Data Bit 4
7 D5 Data Bit 5
8 D6 Data Bit 6
9 D7 Data Bit 7
10 /ACK Acknowledge
11 BUSY Busy
12 PE Paper End
13 SEL Select
14 /AUTOFD Autofeed
15 /ERROR Error
16 /INIT Initialize
17 /SELIN Select In
18 GND Signal Ground
19 GND Signal Ground
20 GND Signal Ground
21 GND Signal Ground
22 GND Signal Ground
23 GND Signal Ground
24 GND Signal Ground
25 GND Signal GroundInformation from The Hardware Book在Normal 0x378只写,0x379只读,0x37a只写
在EPP模式下,通过0x37a,bit5控制0x378为输入(bit5=1)或输出(bit5=0)
另外0x37a有几个脚好像是状态相反的(即1为低电平,0为高电平)
0x379只有最高位为相反状态.
win98也好用的
呵呵