首页 / 软件开发 / C语言 / C语言函数大全(n,o开头)
C语言函数大全(n,o开头)2010-01-29void normvideo(void );选择正常亮度字符。将文本属性(前景和背景)置为启动程序时它所具有的值,来选择标准字符。void nosound(void );关闭由调用 sound而发声的扬声器。函数名: open功能: 打开一个文件用于读或写用法: int open(char *pathname, int access[, int permiss]);程序例:#include
#include
#include
#include
int main(void)
{
int handle;
char msg[] = "Hello world";
if ((handle = open("TEST.$$$", O_CREAT | O_TEXT)) == -1)
{
perror("Error:");
return 1;
}
write(handle, msg, strlen(msg));
close(handle);
return 0;
}
函数名: outport功能: 输出整数到硬件端口中用法: void outport(int port, int value);程序例:#include
#include
int main(void)
{
int value = 64;
int port = 0;
outportb(port, value);
printf("Value %d sent to port number %d
", value, port);
return 0;
}