This is for 8051 Assembly language ONLY Write a program usin

This is for 8051 Assembly language ONLY.

Write a program using \'DB\' directive to reserve 10_D bytes of memory space with variable name \'num1\'. Then initializes these memory locations with the hex number: B_H. Finally, the program should equate variable \'num2\' to data: 23H.

Solution

Program using DB directive:

MOV DPTR, #0FF00H ; takes the address in the dtpr

MOVX num1,@DPTR ; get the data of 0050H in num1

MOVX num1, #BH ; initialize memory location num1 with the value BH

MOVX num2, #23H ; initialize memory location num2 with the value 23H

MOVX @DPTR,num1 ; move the value into 0050H

This is for 8051 Assembly language ONLY. Write a program using \'DB\' directive to reserve 10_D bytes of memory space with variable name \'num1\'. Then initiali

Get Help Now

Submit a Take Down Notice

Tutor
Tutor: Dr Jack
Most rated tutor on our site