EasyManua.ls Logo

ST ST10F276E - The Constant Ones Register ONES

ST ST10F276E
564 pages
Print Icon
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Loading...
DocID13284 Rev 2 81/564
UM0404 The central processing unit (CPU)
3.4.17 The constant ones register ONES
All bits of this bit-addressable register are fixed to '1' by hardware. This register is read only.
Register ONES can be used as a register-addressable constant of all ones, for bit
manipulation or mask generation. It can be accessed via any instruction which is capable of
addressing an SFR.
ONES (FF1Eh / 8Fh) SFR Reset Value:FFFFh
Example
Mask for FFFFh values used to increment or decrement memory:
1514131211109876543210
1111111111111111
RRRRRRRRRRRRRRRR
sub mem, ones ;mem=mem+1
;increments the memory location in one instruction
;instead of three, as described below
mov R13, mem ;mem -> R13
add R13, #1 ;R13 + 1
mov mem, R13 ;R13 -> mem

Table of Contents

Related product manuals