首页 > 代码库 > 比较大小 汇编

比较大小 汇编

AREA EXAMPLE2,CODE,READONLY
ENTRY
CODE 32
CMPA LDR R0,=0X30007000
LDR R1,[R0]
LDR R2,[R0+4]
CMP R1,R2
BH1 NEXT2
STR R2,[R0]
STR R1,[R0+4]

NEXT1 LDR R1,[R0+4]
LDR R2,[R0+8]
CMP R1,R2
BH1 NEXT2
STR R2,[R0+4]
STR R1,[R0+8]
NEXT2 LDR R1,[R0]
LDR R1,R2
CMP R1,R2
BH1 NEXT3
STR R2,[R0]
STR R1,[R0+4]
NEXT3 MOV R1,0X0D
STRB R1,[R0+0X0C]
END