CS609 ASSIGNMENT 1 SOLUTION 2021

CS609 ASSIGNMENT 1 SOLUTION

Question No1

Solution Code

#include <dos.h>       // for intdos() and union REGS

#include <stdio.h>       // for printf ()

union REGS inregs, outregs;

void mian()

{

inregs.h.ah = 0x6;

inregs.h.al = 0x0;

intdos(&inregs, &outregs);

if(regs.x.cflag==1)

printf(“your Student here”);

else

printf(“your Name”);

getch();

}

Question No 2

Solution

#include <dos.h> // for intdos() and union REGS

#include <stdio.h> // for printf ()

union REGS regs;

void mian(void)

{

regs.h.al = 0x116;

regs.h.ah = 0x10;

printf(“%x”, regss.x.ax);

}

Output: 1011

CS609 ASSIGNMENT 1 SOLUTION 2021

Scholarships 2021-2022

Leave a Comment