Question: code in 32-bit Assembly language x86 please. Write a program to given a year, print how many years have passed. Example run: Enter a year:

Write a program to given a year, print how many years have passed. Example run: Enter a year: 2000 19 years have passed Discussion: You will store the current year in a DWORD memory location. Use the ReadDec and writeDec routines which will use the whole register: call ReadDec mov year, EAX ; Input year Solve the problem with pseudocode first. Output: number of years passed Input: year Processing: years Passed current Year Year Therefore, pseudocode would be: Therefore, pseudocode would be ; Start ; current Year - 2019 ; Print "Enter a year: " ; Input year ; years Passed = current Year - year ; print years passed, " years have passed" ; Stop Use this solution to solve the problem Use the following definitions currentYear yearMag year years passed yearCountMsg DWORD? BYTE "Enter a year: ".0 DWORD? DWORD? BYTE years have passed", CR, LF,0
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
