Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

Write all programs in 32-bit assembly language. 1. Using GetDec and PutDec, writ

ID: 3833110 • Letter: W

Question

Write all programs in 32-bit assembly language.

1. Using GetDec and PutDec, write a program that inputs two numbers and then prints their product and quotient.

2. Write a program Today using PutDec which displays today’s date in the form

Today is mm/dd/yyyy

With the month, day, and year filled in. The date is returned by the DOS Get Date call

Input: ah=2ah

Output: al = day of week (0..6)

cx= year (e.g., 1980)

dh= month (1..12)

dl= day (1..31)

3. Create a procedure called PutBin which takes as input a number in ax and displays the number in binary on the CRT screen as 16 ASCII 0’s and 1’s. (Hint: Let PutHex be your guide.)

Explanation / Answer

#include<stdio.h>
#include<conio.h>
#include<stdlib.h>
#include<string.h>
struct date
{
int date;
int month;
int year;
};
int main ()
{
int i,f=0; struct date d[2]; for(i=0;i<2;i++)
{
printf(" Enter day for the %dth date ",i+1);
scanf("%d",&d[i].date);

printf(" Enter the month for the %dth date ",i+1);
scanf("%d",&d[i].month);

printf(" Enter the year for the %dth date ",i+1);
scanf("%d",&d[i].year);
}
if(d[0].date==d[1].date)
{
if(d[0].month==d[1].month)
{
if(d[0].year==d[1].year)
{
f=1;
}
}
}
if(f==1)
printf(" The dates are equal");
else
printf(" The dates are not equal");

printf (" press any key to close.");
getch();
}

Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
Chat Now And Get Quote