AREA MAX_VAL, CODE, READONLY ENTRY MOV R0, #10 MOV R1, #8 MOV R2, #9 start CMP R0, R1 ; 如果R0>R1,用R0去与R2比较,否则R1去与R2比较 BGT cmp_loop2 cmp_loop1 CMP R1, R2 MOVGT R3, R1 MOVLE R3, R2 B stop cmp_loop2 CMP R0, R2 MOVGT R3, R0 MOVLE R3, R2 stop B stop END