ORG 400H ;********* Dichiarazione Costanti ********* DIM EQU 15 INDBASE EQU 250h ;********* Dichiarazione Variabili ********* CONT DL 0 MIN DB 0 MAX DB 0 CODE XORL R0,R0 XORL R1,R1 MOVB INDBASE,MIN MOVB INDBASE,MAX MOVL #DIM,CONT repeat: MOVB INDBASE(R0),R1 CMPB MAX,R1 JC swapMax CMPB MIN,R1 JNC swapMin JMP agg swapMax: MOVB R1,MAX JMP agg swapMin: MOVB R1,MIN agg: ADDL #1,R0 MOVL CONT,R2 SUBL #1,R2 MOVL R2,CONT JZ fine JMP repeat fine: halt end