5 ms·
If you are looking for a truly simple virtual machine, check out SUBLEQ. It's ONE instruction and you can do it in like 7 lines of C. Or maybe three if you co
by ilaksh 6y ago
If you are looking for a truly simple virtual machine, check out SUBLEQ. It's ONE instruction and you can do it in like 7 lines of C. Or maybe three if you compress it.
gemini://biomimetic.me/subleq.gmi
- howerj 6y agoI managed to port an Forth interpreter to a 16-bit SUBLEQ machine, it's even self hosting, although too slow to use for anything. Getting some of the comparison operators working correctly was more difficult than getting bitwise operators working.
- deleted 6y ago[deleted]
- tromp 6y agoIt's really 3 instructions, SUBLEQ, INPUT, and OUTPUT, where you encode the latter two with bogus values for operands of the first. My idea of a truly simple virtual machine is https://www.ioccc.org/2012/tromp/hint.html https://www.ioccc.org/2012/tromp/hint.html
- howerj 6y agoYour more minimal VM is larger than a minimal SUBLEQ VM! :) I think that is a fair characterization of most SUBLEQ implementations however that did annoy me slightly. You can make ones that use proper memory mapped I/O so they end up being truly single instruction, but they end up being larger.
- rwmj 6y agoWhat am I supposed to do with that URL?
- 1vuio0pswjnm7 6y agoHere's the www URL: https://github.com/runvnc/subleqrun https://github.com/runvnc/subleqrun Accessing gemini sites is relatively easy: echo -e 'gemini://biomimetic.me\r\n'|openssl s_client -connect biomimetic.me:1965 -ign_eof
- flobosg 6y agoConnect to it via a Gemini[1] client or use a web proxy: https://portal.mozz.us/gemini/biomimetic.me/subleq.gmi https://portal.mozz.us/gemini/biomimetic.me/subleq.gmi [1]: https://gemini.circumlunar.space/ https://gemini.circumlunar.space/