You are on page 1of 4

Subscribe My Channel

https://www.youtube.com/channel/UCrzG
IUncG2msXSx7iFcZW7g?
sub_confirmation=1

Playlist:
https://www.youtube.com/watch?
v=liZvHjg-
Srw&list=PLclnjitLbdI5Bjf2V2UA8JUG-
OEz6Jvl-

CS609 Assignment 1 Solution Spring 2021

Question No 1
Solution

#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(“My Student ID is BC000000000”);
else
printf(“My Name is STACK CODE
FLOW”); 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: 10116
Thanks for Watching

You might also like