Write a complete assembly program that puts in r0 the value

Write a complete assembly program that puts in r_0 the value 23 and in rl the value 72, then it adds them and puts the result in r5. Use the register bank 3. Repeat the above by using the memory addresses of the registers.

Solution

Global_Start

_start:

SETB PSW.3 ;will change the value to 1

SETB PSW.4 ; will change the value to thereby 11 setting bank3

MOV r0, 23 ; moving 23 to r0

MOV r1, 72 ; moving 72 to r1

ADD r0,r1 ;Adding values of r1 and r2

MOV r5,r0 ; moving value of r0 to r5

int 80h ; exiting

 Write a complete assembly program that puts in r_0 the value 23 and in rl the value 72, then it adds them and puts the result in r5. Use the register bank 3. R

Get Help Now

Submit a Take Down Notice

Tutor
Tutor: Dr Jack
Most rated tutor on our site