Please check @tomerg's presentation
(Insert binaries here)
We can read and write data
A == #1h
What is the initial value of A and B?
We don't know! That is why we need to add zero to them, or loading a value before adding their content.
When I perform the ADDA instruction, where does the result go?
To A. The results of almost all of the operations usually go to A.
So... Is A mutable?
So do I loose the initial value of A after ADDA?
How does the program know which is the next instruction?
There is (for almost all of the CPUs) a special register that points to the next instruction. We call it Program Counter (PC). At the beginning of the program, it points to zero or any other value established by the manufacturer. The first instruction starts there.
So, are the instructions in memory?
For the 6800, yes.
Am I free to manipulate the content of all of the registers?
Not all of them. There are some that only accept memory addresses as parameters. Other do not support any kind of operation, except for transferring memory addresses.
So Am I allowed to load A with a memory Address?
WTH is #?
# is about what we call Address mode. # makes explicit that we are loading the number 0h (0 hex) in A.
What does it happen if I remove #? Fail?
Not in terms of syntax. Removing #, the CPU will load the content of the position 0h of the memory.
Still about #
So removing # gives us a different address mode, right?
Yep! We call it direct addressing. With #, we have the immediate addressing.
Can I manipulate hex numbers only?
No. You can manipulate binaries, decimals. But hex is more common.
Are the numbers signed or unsigned?
We have both representations. Usually, for signed numbers, the left bit represents the signal. For example:
10000001 can be 129 or -1
Who does determine if it is signed or unsigned?
The program's context. And it is tricky. Do not mix them up!
What happens if the result is larger than 8 bits?
(each CPU has its own)
Data bus - 16 bits
Segmented memory model
Simplified set of instructions, similar to several processors in the market.