Advertisement Remove all ads

Write a Subroutine in Assembly Language to Fill the Memory Locations 7301h to 73ffh with the Hexadecimal Numbers 01h to Ffh Respectively - Computer Science 2

Write a subroutine in assembly language to fill the memory locations 7301H to 73FFH with the hexadecimal numbers 01H to FFH respectively

Advertisement Remove all ads

Solution

Label Mnemonic Comment

START:

 

 

LOOP:

 

 

 

 

 

LXI D, 7301H

MVI A, 01 H

MVI B, FFH

STAX D

INR A

INR E

DCR B

JNZ LOOP

RET

; Set memory start address

; Set accumulator to immediate data 01 H

; Load counter

; Store data in memory

; Increment data

; Increment memory address

; count = count – 1

; go back if not over

; return to the main program if over

 

Concept: Instruction Set and Programming of 8085
  Is there an error in this question or solution?
Advertisement Remove all ads

APPEARS IN

Advertisement Remove all ads
Advertisement Remove all ads
Share
Notifications

View all notifications


      Forgot password?
View in app×