0% found this document useful (3 votes)
2K views4 pages

cs609 Assignment Solution

This document provides links to subscribe to a YouTube channel and view playlists. It also contains solutions to two assignment questions, with the first using intdos to check for a student ID number and the second using intdos to return the value 10116 from AH and AL registers. The document ends by thanking the viewer for watching.

Uploaded by

Rana Ali
Copyright
© © All Rights Reserved
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
Download as docx, pdf, or txt
0% found this document useful (3 votes)
2K views4 pages

cs609 Assignment Solution

This document provides links to subscribe to a YouTube channel and view playlists. It also contains solutions to two assignment questions, with the first using intdos to check for a student ID number and the second using intdos to return the value 10116 from AH and AL registers. The document ends by thanking the viewer for watching.

Uploaded by

Rana Ali
Copyright
© © All Rights Reserved
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
Download as docx, pdf, or txt
Download as docx, pdf, or txt
You are on page 1/ 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