§
Program :
MVI C,0AH ;act as a counter for 10 inputs
LXI H,2000H ;store the address of initial memory location into HL
register pair
MOV A,M
LOOP: CMP M
JNC SKIP
MOV A,M
SKIP: INX H
DCR
C
JNZ LOOP
STA 1FFFH ;store the
longest number in memory location 1FFF h
HLT
§ Output :
No comments:
Post a Comment