Assemble program that moves immediate valuesconstants to eac

Assemble program that moves immediate values(constants) to each of the registers. Find out which registers cannot and reasons why not. EVALUATION OF FLAGS- Use DEBUG to assemble and trace the following program. Write down the contents of the Zero, Carry, and Sign Flags after tracing each instruction. Write a short note next to each line explaining why any of the flags changed. mov al, ff inc al sub al, 2 mov dl, al add dx, 2 int 20

Solution

The MOV and MVN instructions can write a range of immediate values to a register.

In both ARM and Thumb, you do not have to decide whether to use MOV or MVN. The assembler uses whichever is appropriate. This is useful if the value is an assembly-time variable.

If you write an instruction with an immediate value that is not available, the assembler reports the error: Immediate n out of range for this operation.

In assembly programming of 8086, we can only load a data into a segment reg by, first loading it into a general purpose register and then we have move from this gen reg to the segment register

MOV al,ff : move contents to ff to al registers

INC al : Increment register register al

sub: subtracts the register al from 2

mov :moves the register al with dl

add dx,2 : adds 2 to dx

 Assemble program that moves immediate values(constants) to each of the registers. Find out which registers cannot and reasons why not. EVALUATION OF FLAGS- Use

Get Help Now

Submit a Take Down Notice

Tutor
Tutor: Dr Jack
Most rated tutor on our site