Logo 
Search:

C Programming Articles

Submit Article
Home » Articles » C Programming » Interrupt ProgrammingRSS Feeds

Program to show the System Configuration using interrupt 11h

Posted By: Easy Tutor     Category: C Programming     Views: 3616

Write a program to show the System Configuration using interrupt 11h.

Code for Program to show the System Configuration using interrupt 11h in C Programming

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

 int main( )
 {
    int iCount=15;
    unsigned int uiMaxValue=32768;
    unsigned int uiAX;

    geninterrupt(0x11);
    uiAX=_AX;

    clrscr( );
    textmode(BW80);

    printf(" * * * * * * * * * *  System Configuration  * * * * * * * * * *\n\n");
    printf(" Configuration Word Value = ");

    for(iCount=15;iCount>=0;iCount--)
    {
       if((iCount%4)==3)
      printf(" ");

       if((uiAX&uiMaxValue)==uiMaxValue)
      printf("1");

       else
      printf("0");

       uiMaxValue/=2;
    }

    printf("\n\n\r Boot From Disk = ");

    switch((uiAX&0x0001))
    {
       case 0 : printf("No");
        break;

       case 1 : printf("Yes");
        break;
    }

    uiAX>>=1;

    printf("\n Floating-point Coprocessor = ");

    switch((uiAX&0x0001))
    {
       case 0 : printf("No");
        break;

       case 1 : printf("Yes");
        break;
    }

    uiAX>>=1;

    printf("\n Motherboard RAM Size = ");

    switch((uiAX&0x0003))
    {
       case 0 : printf("16k");
        break;

       case 1 : printf("32k");
        break;

       case 2 : printf("48k");
        break;

       case 3 : printf("64k");
        break;
    }

    uiAX>>=2;

    printf("\n Initial Video Mode = ");

    switch((uiAX&0x0003))
    {
       case 0 : printf("unused");
        break;

       case 1 : printf("40x25 BW with color card");
        break;

       case 2 : printf("80x25 BW with color card");
        break;

       case 3 : printf("80x25 BW with mono card");
        break;
    }

    uiAX>>=2;

    printf("\n Number of Disk Drives = %d",((uiAX&0x0003)+1));

    uiAX>>=2;

    printf("\n Direct Memory Access (DMA) = ");

    switch((uiAX&0x0001))
    {
       case 0 : printf("Available");
        break;

       case 1 : printf("Not Available");
        break;
    }

    uiAX>>=1;

    printf("\n Number of COM (Serial) Ports = %d",(uiAX&0x0007));

    uiAX>>=3;

    printf("\n Game I/O Port = ");

    switch((uiAX&0x0001))
    {
       case 0 : printf("Not Available");
        break;

       case 1 : printf("Available");
        break;
    }

    uiAX>>=1;

    printf("\n Serial Printer Attached = ");

    switch((uiAX&0x0001))
    {
       case 0 : printf("No");
        break;

       case 1 : printf("Yes");
        break;
    }

    uiAX>>=1;

    printf("\n Number of Parallel Printers Installed = %d",(uiAX&0x0003));
    printf("\n\n * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *");

    getch( );
    return 0;
 }
  
Share: 



Easy Tutor
Easy Tutor author of Program to show the System Configuration using interrupt 11h is from United States. Easy Tutor says

Hello Friends,

I am Free Lance Tutor, who helped student in completing their homework.

I have 4 Years of hands on experience on helping student in completing their homework. I also guide them in doing their final year projects.

I have share many programs on this website for everyone to use freely, if you need further assistance, than please contact me on easytutor.2ya [at the rate] gmail [dot] com

I have special discount scheme for providing tutor services. I am providing tutor service to students from various contries, currently most of my students are from United States, India, Australia, Pakistan, Germany, UK and Canada.

I am also here to expand my technical network to receive more opportunity in my career, make friends to help them in resolving their technical problem, learn and share my knowledge, If you like to be my friend, Please send me friend request.

Thanks,
Happy Programming :)

 
View All Articles

 
Please enter your Comment

  • Comment should be atleast 30 Characters.
  • Please put code inside [Code] your code [/Code].

 
No Comment Found, Be the First to post comment!