ARM

Carry Flag


參考資訊:
1. carry-flag

For non-additions/subtractions that incorporate a shift operation, C is set to the last bit shifted out of the value by the shifter.

範例:

指令Carry Flag
ldr r0, =0x00000000
movs r1, r0, lsr#1
C=0
ldr r0, =0x00000001
movs r1, r0, lsr#1
C=1
ldr r0, =0x40000000
movs r1, r0, lsl#2
C=1
ldr r0, =0x00000000
orrs r1, r0, lsr#1
C=0
ldr r0, =0x00000001
orrs r1, r0, lsr#1
C=1
ldr r0, =0x40000000
orrs r1, r0, lsl#2
C=1


返回上一頁