⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 68.c

📁 C语言实战105例/王为青, 陈圣亮编著 北京-人民邮电出版社 2007 光盘源码及可运行程序 附注项:共汇集了105个实例
💻 C
字号:
#include<stdio.h>
#include<fcntl.h>
#include<stat.h>
#include<io.h>
#include<string.h>
#include<stdlib.h>
#include<alloc.h>
#include<dos.h>
#include<conio.h>
#include<graphics.h>

unsigned char *buffer;
int main()
{
	int handle;
	int i;
	int gdriver=VGA,gmode=VGAHI;
	initgraph(&gdriver,&gmode,"e:\\tc");
	cleardevice();
	for(i=10;i<=140;i++)
	arc(320,240,0,150,i);
	outtextxy(160,300,"press any key to save the picture");
	getch();
	handle=_creat("save.pic",FA_ARCH);
	/*设定读模式*/
	outportb(0x3ce,5);
	outportb(0x3cf,0);
	/*选择影射寄存器*/
	outportb(0x3ce,4);
	/*0x3cf的D0、D1位共同决定了选择的页面*/
	outportb(0x3cf,3);
	_write(handle,(void *)buffer,28000);
	outportb(0x3cf,2);
	_write(handle,(void *)buffer,28000);
	outportb(0x3cf,1);
	_write(handle,(void *)buffer,28000);
	outportb(0x3cf,0);
	_write(handle,(void *)buffer,28000);
	_close(handle);
	closegraph();
	getch();
	return 0;
}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -