|
1. |
Write a program in C language using
INT86 for
changing the cursor size. |
|
|
| |
|
|
|
|
|
#include<dos.h> |
|
|
|
void main( ) |
|
|
|
{ |
|
|
|
union REGS in,out; |
|
|
|
int i; |
|
|
|
in.h.ah = 0x01; |
|
|
|
in.h.ch = 0x00; |
|
|
|
in.h.cl = 0x07; |
|
|
|
i = 0x10; |
|
|
|
int86(i,&in,&out) |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2. |
Write a program in C language using
INT86 for
changing display mode (from text to graphics). |
|
|
| |
|
|
|
|
|
#include<dos.h> |
|
|
|
void main( ) |
|
|
|
{ |
|
|
|
union REGS r; |
|
|
|
int i; |
|
|
|
r.h.ah = 0x00; |
|
|
|
r.h.al = 0x00; |
|
|
|
i = 0x10; |
|
|
|
int86(i,&r,&r); |
|
|
|
r.h.ah = 0x4c; |
|
|
|
i = 0x21; |
|
|
|
int86(i,&r,&r); |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2. |
Write a program in C language using
INT86 for
changing display mode (from graphics to text). |
|
|
|
|
|
|
|
|
#include<dos.h> |
|
|
|
void main( ) |
|
|
|
{ |
|
|
|
union REGS r; |
|
|
|
int i; |
|
|
|
r.h.ah = 0x00; |
|
|
|
r.h.al = 0x02; |
|
|
|
i = 0x10; |
|
|
|
int86(i,&r,&r); |
|
|
|
r.h.ah = 0x21; |
|
|
|
int86(i,&r,&r); |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|