Search This Blog

Monday, April 4, 2011

Program to find mINImum number in an array




LXI H, 2000H ; INITIALIZE STARTING ADDRESS
MVI C, 10H ; SIZE OF ARRAY IS 10
XRA A ;
BACK CMP M ; COMPARE WITH MEMORY
JC SKIP ;
MOV A, M ; IF NUMBER< MAX INTERCHANGE
SKIP INX H ;
DCR C ;
JNZ BACK ;
STA 1FFFH ;
HLT ;

No comments:

Post a Comment