Using directives for creating symbolics write a single state

Using directives for creating symbolics, write a single statement that computes the number of seconds in a day.

Specifications:

a) Place the result in the EDX register.

b) The statement that is placed in the program and expanded should be SECONDS_IN_DAY.

c) The EDX register should be zeroed out before it is used.

d) Make sure the statement uses the symbolics to the fullest extent; that is, SECONDS_IN_DAY should be the only expression on the instruction line.

This is Assembly problem, can someone help me on this?

Solution

SECONDS_IN_DAY __asm__ (mov EDX DWORD 0, 24*60*60);

This will initialize edx to 0 and compute seconds in day i.e 24*60*60 and the value will stored in EDX.

Using directives for creating symbolics, write a single statement that computes the number of seconds in a day. Specifications: a) Place the result in the EDX r

Get Help Now

Submit a Take Down Notice

Tutor
Tutor: Dr Jack
Most rated tutor on our site