Sem 6‎ > ‎MPRC LAB‎ > ‎

P9 Largest of a series.

posted Apr 7, 2013, 3:52 AM by Neil Mathew   [ updated Apr 7, 2013, 3:52 AM by Neil Mathew ]


Program:

LXI H, 2500
MOV C,M Count
INX H
MOV A,M First Number
DCR C
LOOP INX H
CMP M
JNC AHEAD A < M => Carry
MOV A,M << if M greater.
AHEAD DCR C
JNZ LOOP
STA 2600 (largest of series)
  HLT 



JNC : LARGER
JC   : SMALLER
Comments