rendered paste body#include <stdio.h>
#include <conio.h>
#include <dos.h>
typedef union{
struct{
int d0:1;
int d1:1;
unsigned int d2_3:2;
unsigned int d5_4:2;
unsigned int d7_6:2;
int d8:1;
unsigned int d11_10_9:3;
int d12:1;
int d13:1;
unsigned int d15_14:2;
}el;
unsigned int word;
}eq_list;
int main(void)
{
eq_list config;
clrscr();
config.word=(unsigned int)peek(0,0X0410);
if(config.el.d0)
printf("\n exista FD\n");
else
printf("nu exista FD\n");
if(config.el.d1)
printf("\n exista coprocesor matematic\n");
else
printf("\n Nu exista coprocesor matematic\n");
switch(config.el.d2_3)
{
case 0: printf("\n Dimensiune RAM 16KO\n");break;
case 1: printf("\n Dimensiune RAM 32KO\n");break;
case 2: printf("\n Dimensiune RAm 64KO\n");break;
}
switch(config.el.d5_4)
{
case 0: printf("\n Rezervat\n");break;
case 1: printf("\n 40 coloane color\n");break;
case 3: printf("\n TTL mono\n");break;
case 2: printf("\n 80 coloane color\n"); break;
}
switch(config.el.d7_6)
{
case 0: printf("\n 1 unitate FD \n");break;
case 1: printf("\n 2 unitati FD \n");break;
case 2: printf("\n 3 unitati FD \n");break;
case 3: printf("\n 4 unitati FD \n");break;
}
if(config.el.d8)
printf("\n DMA prezent");
else
printf("\n DMA nu este\n");
switch(config.el.d11_10_9)
{
case 0: printf("\n O porturi RS 232 \n");break;
case 1: printf("\n 1 porturi RS 232 \n");break;
case 2: printf("\n 2 porturi RS 232 \n");break;
case 3: printf("\n 3 porturi RS 232 \n");break;
case 4: printf("\n 4 porturi RS 232 \n");break;
case 5: printf("\n 5 porturi RS 232 \n");break;
case 6: printf("\n 6 porturi RS 232 \n");break;
case 7: printf("\n 7 porturi RS 232 \n");break;
}
return 0;
}