3 ms·
> True, but we can just use the subset of machine code that works on all of them. All you need to be Turing-complete is `add`, `jne`, and that's pretty much it
by DaiPlusPlus 9y ago
> True, but we can just use the subset of machine code that works on all of them.
All you need to be Turing-complete is `add`, `jne`, and that's pretty much it - and every mainstream instruction set today supports at least those 2 operations: https://en.wikipedia.org/wiki/One_instruction_set_computer https://en.wikipedia.org/wiki/One_instruction_set_computer
Of course the computer would run terribly - so I hope you're joking there.
A a web-dev analogy, it's like saying we should abandon CSS and use <table>-for-layout because you don't want Internet Explorer 4.0 users to be left out.
- function_seven 9y ago> Of course the computer would run terribly - so I hope you're joking there. I thought RISC was the future? (Yes, I’m joking)
- DaiPlusPlus 9y agoIn all seriousness - I think you're on to something with a minimal-instruction-set program that only uses operations common to as many ISAs as possible - that way all that needs to be done is reassembly of the program in O(n) time by remapping opcodes to their correct binary representation for a given ISA. I wonder if it might have application for portable binary libraries in industries that love trade-secrets, or something like C--.
- Retr0spectrum 9y agoThere's a slightly crazy guy on osdev who wrote an entire graphical OS for a simulated SUBLEQ architecture: http://forum.osdev.org/viewtopic.php?f=2&t=31420 http://forum.osdev.org/viewtopic.php?f=2&t=31420
- Vendan 9y agoTechnically, x86(and probably others) are turing complete with just MOV: https://github.com/xoreaxeaxeax/movfuscator https://github.com/xoreaxeaxeax/movfuscator