Contoh 3 & 4

Contoh cpp 3 & 4

#include <conio.h>
#include <dos.h>
#include <stdio.h>
#include <stdlib.h>

#define VIDEO_INT 0x10
#define UCHAR unsigned char

void setMode(UCHAR mode);

int main(void)
{
printf("Tekan ENTER untuk mengubah mode.....\n");
   getch();

   setMode(0x20);

   printf("Mode 02 heksadesimal. \n");
   printf("Tekan ENTER kembali ke mode normal...");
   getch();

   setMode(0x05);
   printf("Mode normal\n");
   getch();

   return EXIT_SUCCESS;
}

void setMode(UCHAR mode)
{
union REGS in, out;

in.h.ah = 0x09;
in.h.al = mode;

int86(VIDEO_INT, &in, &out);
return;
}

Output




Komentar