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 ;

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s