onoff.cpp
来自「Parallel port interfacing」· C++ 代码 · 共 19 行
CPP
19 行
//switch led on /off in Visual C++
#include <conio.h>
#include <windows.h>
int main()
{
int counter;
//10 loops
for(counter = 0;counter<=9;counter++)
{
_outp(0x378,1); //output is high
_sleep(250); //250 mS delay
_outp(0x378,0); //output is low
_sleep(250);
}
return 0;
}
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?