برنامه گرافیکی زیر برای تست رنگ مانیتور بکار می رود.این برنامه با زبان C نوشته شده است. برای مشاهده کد برنامه به ادامه مطلب مراجعه کنید.
#include <stdio.h> #include <conio.h> #include <dos.h> #define VIDEO 0x10 #include<graphics.h> void main() { union REGS regs; clrscr(); regs.h.ah = 0x00; /* set cursor position */ regs.h.al = 0x12; regs.h.bh = 0; /* video page 0 */ int86(VIDEO, ®s, ®s); int i; for(i=0;i<15;i++) { regs.h.ah = 0x0b; /* set cursor position */ regs.h.al = 0x13; regs.h.bh = 0; regs.h.bl = i; delay(1000); regs.h.bh = 0; /* video page 0 */ int86(VIDEO, ®s, ®s);} regs.h.ah = 0x0c; /* set cursor position */ regs.h.al = 0x3; regs.x.cx = 100; regs.x.dx = 100; regs.h.bh = 0; /* video page 0 */ int86(VIDEO, ®s, ®s); printf("Hassan AbasAbadi"); getch(); } |