Rename that opcode !

A project log for YGREC8

A byte-wide stripped-down version of the YGREC16 architecture

yann-guidon-ygdesYann Guidon / YGDES 03/11/2018 at 10:235 Comments

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


OK I think I got it now ! CP is not great in the case of immediate values but SET is much better :-)


Yann Guidon / YGDES wrote 03/13/2018 at 08:29 point

Note : I should also mention this in the #PDP - Processor Design Principles  :-)

  Are you sure? yes | no

Ted Yapo wrote 03/12/2018 at 23:49 point

Did you cover algebraic assembly somewhere in this series?


seems pretty unambiguous

Unless you think that it's a declarative statement that sets an equality constraint :-)

  Are you sure? yes | no

Yann Guidon / YGDES wrote 03/13/2018 at 08:22 point

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

roelh wrote 03/12/2018 at 21:45 point

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

Yann Guidon / YGDES wrote 03/13/2018 at 08:29 point

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