io.cpp
来自「光学仪器的控制系统 用于教学和科研的仪器」· C++ 代码 · 共 34 行
CPP
34 行
//---------------------------------------------------------------------------
#pragma hdrstop
#include <vcl.h>
#include "IO.h"
//---------------------------------------------------------------------------
#pragma package(smart_init)
//bool g_bDebug = true;
//---------------------------------------------------------------------------
unsigned char inportb(unsigned short portid)
{unsigned short inpvalue;
/*
asm{ mov dx,portid
in ax,dx
mov inpvalue,ax
}
*/
return 1;//(unsigned char)inpvalue;
}
//---------------------------------------------------------------------------
void outportb(unsigned short portid,char value)
{
/*
asm{ mov al,value
mov dx,portid
out dx,al
}
*/
return;
}
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?