3 ms·
Even better idea : write a CPU simulator! Just a while loop that reads assembler from a file and interprets it on a virtual CPU. I did this in Java a while
by DLWormwood 17y ago
Even better idea : write a CPU simulator! Just a while loop that reads assembler
from a file and interprets it on a virtual CPU. I did this in Java a while ago,
I reproduced a few Intel x86 ASM instructions. MOV, CMP and JMP are all you need
for Turing completeness, if I recall correctly.
I actually had to work with one of these for a class in college. My project was to create a compiler for a fictional assembly language, and emit object code for a finctional processor. While I got basic stuff like move, load and add working, I never got branching to work right... /-: (The only C I ever got in a computer related class.)