I remember when I first tried to understand a microprocessor. I had a book in french that explored the 6809 and I was yound and impressed. But I could't wrap my head around the concept of the MOV opcode. Does it displace data ? And what happens to the original data ?
I have since acquired the habit of using MOV, mostly from my heavy use of x86 asm. But looking back at that early confusion, and despite the almost universal use of his mnemonic, I believe it's time to do the "right thing" : rename it to CP.
PS : somewhat related to 1. Honey, I forgot the MOV
20180716
OK I think I got it now ! CP is not great in the case of immediate values but SET is much better :-)
Discussions
Become a Hackaday.io Member
Create an account to leave a comment. Already have an account? Log In.
Note : I should also mention this in the #PDP - Processor Design Principles :-)
Are you sure? yes | no
Did you cover algebraic assembly somewhere in this series?
REG0 = REG1
seems pretty unambiguous
Unless you think that it's a declarative statement that sets an equality constraint :-)
Are you sure? yes | no
Hahahahaha you nailed it :-)
I used some algebraic asm with the Analog Devices series. And yes, you nail the equality constraint.
Pascal/Ada solve this with the distinction ":=" / "<=" / "="...
Are you sure? yes | no
Hi Yann, the cure is worse than the problem, I think. People might think CP is ComPare (Z80).
And if you should choose CPY, many will think it is Compare Y (6502). Perhaps only writing COPY will do... or COP if you want three characters....
Are you sure? yes | no
This shows my weak knowledge of these processors ! but honestly I don't care about confusing Z80/6502 people :-P If they are so happy with them, they stick with them and their staggering 64K addressing space ;-)
"My" Compare is CMP and I don't put a register name in the opcode.
"CP" is also a reference to the UNIX idiom so it should be eady to catch.
Are you sure? yes | no