📄 simpleio.java
字号:
import parport.ParallelPort;
import javax.swing.*;
class SimpleIO {
public static void main ( String [] Yasi ) throws InterruptedException
{
// 0x378 is normally the base address for the LPT1 port
ParallelPort lpt1 = new ParallelPort(0x378);
int aByte;
String input;
do{
input = JOptionPane.showInputDialog("Please, enter data to transmit");
aByte = Integer.parseInt(input);
lpt1.write(128);
Thread.sleep(50);
lpt1.write(aByte);
System.out.println("Output to port: "+ aByte);
} while (aByte != 0);
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -