I am studying hardware programming on this time, some of the codes which may difficult for me to understand. I found this code in the internet. Hope you can explain to me better.
The following program will set the border color to blue.
Code:
#include <conio.h> /* needed for outp() */
#include <stdio.h> /* needed for getchar() */
#include <dos.h> /* for REGS definition */
#define CSReg 0x3d9
#define BLUE 1
void cls()
{
union REGS regs;
regs.h.ah = 15; int86( 0x10, ®s, ®s );
regs.h.ah = 0; int86( 0x10, ®s, ®s );
}
main()
{
cls();
printf("Press any key to set border color to blue.\n");
getchar();
outp( CSReg, BLUE );
}
This part of code which i do not understand, I think this involves assembly language. Can anyone here explain me better about this.
Code:
regs.h.ah = 15; int86( 0x10, ®s, ®s );
regs.h.ah = 0; int86( 0x10, ®s, ®s );
Thanks in advance...