Re:Intel x86 documentation has more pages than the 6502 has ...
by flamedoge on Wednesday December 07, 2016 @11:47PM
(#13128466)
don't you technically just need mov which is said to be turing complete?
[ Parent
| on HN ]
Re:Intel x86 documentation has more pages than the 6502 has ...
by fnj on Thursday December 08, 2016 @04:30AM
(#13129316)
It's not clear to me how [simple unconditional] mov could possibly do the job alone. I believe it could only work if it incorporates "magic" memory locations - e.g., storing at location x executes math combining location x and location y in some way and alters location z. This simply begs the question by moving logic behind the curtain.
I think the single instruction which can do the entire job without any magic assist is subneg x, y, z:
Subtract location x from location y; store the result in location y; and branch to location z if result is less than 0; else proceed to next.
Or various trivial variations of the same idea.
Any complication beyond this is no more than syntactical sugar and performance optimization.
Re:Intel x86 documentation has more pages than the 6502 has ...
by fnj on Thursday December 08, 2016 @06:27AM
(#13129680)
Once I checked out the reference at the end of README.md, I like it. I could try to object that the "magic" has been moved into the addressing modes of the mov, but that would be a bit arbitrary.
If you focus only on direct memory addressing (no indirect or indexed), mine does still work, but mov doesn't. I think.