Overall Configuration of the CPU: PSW (Flag)

PSW that stores the state of the calculation result
PSW (*) that stores the state of the calculation result

After executing the instruction, a flag indicates the contents of the memory and the status of the result of a calculation.
PSW (*) collects these flags.

* PSW:Program Status Word

Contents of the calculation result written to PSW
Contents of the calculation result written to PSW

The figure on the right is an example of executing the addition of the A register (00111110) and the B register (11100000).
The calculation result (100011110) is stored in the A register.
However, since the A register can store only 8 bits, the carry flag is set to "1" and the carry flag is left as information that a carry has occurred.
In the A register, (00011110) excluding the most significant digit 1 is stored as the calculation result.
For example, if the calculation result is (100000000), 1 is set in the carry flag, and (00000000) is stored in the A register, so 1 is set in the zero flag.

Chapter 4 Toshiba Microcontrollers, Example of Core (TLCS-870/C1)

Overall Configuration of the CPU
Overall Configuration of the CPU: CPU Core (1)
Overall Configuration of the CPU: CPU Core (2)
Overall Configuration of the CPU: Program Counter
Overall Configuration of the CPU: General-purpose Register
Overall Configuration of the CPU: Stack and Stack Pointer
Interrupt Processing
Interrupt Processing: Interrupt Type
Interrupt Processing: Maskable Interrupt
Interrupt Processing: Non Maskable Interrupt
開啟新視窗