To understand the architecture and basic operation of ARM pr
To understand the architecture and basic operation of ARM processor To access (read/write) ARM\'s registers using assembly language instruction To understand the usage and operation of ARM\'s basic arithmetic instructions Transform the following English sentences to ARM assembly program.
Solution
ANSWER:
start
MOV R0, #200
MOV R1,#0x4F
CPY R2,R0
CPY R3,R1
ADD R4,R0,R1
SUB R5,R3,R1
ADD R2,R2,R5
SUB R0,R0,R1
LOOP B LOOP
END
VALUES IN REGISTERS:
R0=0XC8
R1=0X4F
R2=0XC8
R3=0X4F
R4=0XC8+0X4F =>0X117
R5=0X4F-0X4F=0
R2=0XC8+0 =>0XC8
R0=0XC8-0X4F =0X79
