Q. A table having starting address 2060h contains ten numbers of 8-bit data. Write a program in 8085 microprocessor that transfers the data to next table having starting address 2070h if the data is greater than 50h else store it to next table at 2080h.
Program:
LXI B,2060h
LXI H,2070h
LXI H,2070h
LXI D,2080h
START: LDAX B
CPI 50H
JC NEXT
MOV M,A
INX B
INX H
MOV A,C
CPI 0Ah
INX H
MOV A,C
CPI 0Ah
JNZ START
JMP LAST
NEXT: STAX D
INX B
INX D
MOV A,C
CPI 0Ah
INX B
INX D
MOV A,C
CPI 0Ah
JNZ START
LAST: HLT
I think I've gone wrong in it!!
ReplyDeleteI corrected!!!
Delete