I looked at 6502 schematic. It is the basic diagram, but not complex diagram like full of transistors. It can be found at website:
http://www.pagetable.com/?p=39.
The Arithmetic Logic Unit has two input registers and one output register (adder hold registor).
The label in ALU shows “Arithmetic Logic with decimal carry”. I am so confused. Is it truly hexidecimal adder or decimal adder or both?
After either decimal mode is turned on or off, two hexidecimal values in both input registers are added together inside ALU register. The output hexidecimal value is transferred to the two decimal adjust adder registers.
If decimal mode is turned on, then output hexidecimal value is converted to decimal value before it is transferred to the accumulator register.
If decimal mode is turned off, then output hexidecimal value is passed through decimal adjust adder register while decimal conversion is ignored before it is transferred to the accumulator register.
Correct? DAA stands for decimal adjust adder. What do DSA stands for? Please tell me how decimal adjust adder register can do calculation, but I wonder that it will calculate invalid decimal value by showing A-F instead of 0-9.
ALU register has half carry output. What is this for? I could not find where it goes to any registers, but I do know that it goes to high program counter register’s half carry input. Both low / high program counters should be able to increment inside PC register without the help from ALU register.
Take care,
Bryan