Question: Using NASM, using jz, cmp, flags, loops also use the register 32 bit Task: Design and write an assembly code that will determine if a

Using NASM, using jz, cmp, flags, loops also use the register 32 bit Task:

Design and write an assembly code that will determine if a given year is a Leap Year. Things to consider

How to change a string of numbers into its numerical counterpart o Helpful Hit:

Take a 4-digit string

Get the thousands digit

Multiply by 10

Add the hundreds digit

Multiply by 10 etc..

What defines a leap year A year is a leap year if it is divisible by 4 and not divisible by 100, unless it is also divisible by 400

. Would any loops (jmp to self), or if else statements (je or jne) that would be useful Loop: ~~~~ Code ~~~~ jmp Loop Compares: cmp ~x~, ~y~ je ~~something~~ jne ~~something else sample output : Type Year: 2000 This year is a leap year type Year: 2005 This year is not a leapy year

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!