Question: Hello, this should be done using Assembly Language Programming. Thank you! Write a program to given a year, print how many years have passed. Example
Hello, this should be done using Assembly Language Programming. Thank you!

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: ; Input year call ReadDec mov year, EAX Solve the problem with pseudocode first. Output: number of years passed Input: year Processing: years Passed = current Year - year i Therefore, pseudocode would be: ; Start currentYear = 2019 ; Print "Enter a year: ; Input year ; years Passed = current Year - year ; Print years Passed, years have passed" i Stop 11 Use this solution to solve the problem. Use the following definitions .data current Year DWORD ? yearMsg BYTE "Enter a year: ,0 year DWORD? years Passed DWORD? yearCountMsg BYTE years have passed", CR, LF, 0 11 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: ; Input year call ReadDec mov year, EAX Solve the problem with pseudocode first. Output: number of years passed Input: year Processing: years Passed = current Year - year i Therefore, pseudocode would be: ; Start currentYear = 2019 ; Print "Enter a year: ; Input year ; years Passed = current Year - year ; Print years Passed, years have passed" i Stop 11 Use this solution to solve the problem. Use the following definitions .data current Year DWORD ? yearMsg BYTE "Enter a year: ,0 year DWORD? years Passed DWORD? yearCountMsg BYTE years have passed", CR, LF, 0 11
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
