This is for 8051 Assembly programming ONLY Write a program u

This is for 8051 Assembly programming 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

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

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

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

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

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

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

Get Help Now

Submit a Take Down Notice

Tutor
Tutor: Dr Jack
Most rated tutor on our site