SX Embedded Controller Register

W (Working Register)

The W register is the main working register used by many instructions as the source or destination of the operation. It is often used as a temporary storage area for intermediate operations. For example, to add the contents of two file registers, you must first move the contents of one file register to W and then execute an “add” instruction to perform an addition between W and the other file register.

For SX18/20/28AC and SX18/20/28AC75 devices, in the default device configuration, W is not memory-mapped and can only be accessed by instructions that work specifically with W as the source or destination. However, you can optionally make the W available as a memory-mapped register at address 01h. To do this, first program the OPTIONX bit to 0 in the FUSEX word in the program memory. Then have your program clear the RTW bit in the OPTION register. If you do this, the RTCC register normally at address 01h becomes unavailable.

Interested: