top button
Flag Notify
    Connect to us
      Facebook Login
      Site Registration Why to Join

Facebook Login
Site Registration

Write a C program to draw a line using graphics video memory and far pointer?

0 votes
79 views
Write a C program to draw a line using graphics video memory and far pointer?
posted May 3, 2017 by Raju Raj

Share this question
Facebook Share Button Twitter Share Button Google+ Share Button LinkedIn Share Button Multiple Social Share Button

1 Answer

0 votes

Segment number 0XA is known as graphics video memory. This segment has 720 columns and 400 rows. Intersection of rows and columns is known as pixel. Size of each pixel is one byte which stores color information.

#include <dos.h>
#include<stdio.h>
 int main() 
{
 int j;
 union REGS i,o;
 char far *ptr=(char *)0XA0000000;
 i.h.ah=0;
 i.h.al=0x13;
 int86(0x10,&i,&o);
 for(j=1;j<=100;j++)
 {
 *(ptr+j)=4;
 }
    return 0; 
}
answer May 4, 2017 by Rahul Prashad
Contact Us
+91 9880187415
sales@queryhome.net
support@queryhome.net
#280, 3rd floor, 5th Main
6th Sector, HSR Layout
Bangalore-560102
Karnataka INDIA.
QUERY HOME
...