Statement: Write an ALP to find out maximum number in a block of data. The block starts at E000H. The first data show length of block. Store the result at the end of block.
LXI H,E000
MOV B,M
INX H
MOV A,M
NEXT:
INX H
CMP M
JNC END
MOV A,M
END:
DCR B
JNZ NEXT
INX H
MOV M,A
HLT
No comments:
Post a Comment