Computer Science, asked by bharat98866, 2 months ago

b) Write an Assembly Language Program to count total number
of occurrences
of data 9C H in a memory block of length 16 bytes, starting
from 1000H. Store count in Register E.​

Answers

Answered by navjotkaur20259
1

SOLUTION

Conc

Mnemonic +

Operand

Label

Comments

; Store count 05H

Initialize occurre

Initialize H-L pai

; Get the number

; Check whether t accumulator is A

; If no? jump to la

; Yes, increment c

1

START:

MVI C, 05H

MVI B, 00H

LXI H, 7401H

MOV A, M

CPI ACH

JNZ NEXT

INR B

NEXT: INX H

DCR C

JNZ LOOP

MOV A, B

STA 7406H

RST 1.0

LOOP:

Increment H-L p

; Decrement cour

; Is count zero? N

; Get count in acc

; Store count of o

; Restart

END:

Similar questions