4 ms·
There can be control flow. MOV an address into the right spot in the interrupt vector table then do a MOV that causes a fault that calls the right interrupt (su
by acegopher 3y ago
There can be control flow. MOV an address into the right spot in the interrupt vector table then do a MOV that causes a fault that calls the right interrupt (such as a page fault).
- anyfoo 3y agoBut now you're just employing another machine, which is not just made out of MOVs. The video describes in detail what actually happens. I encourage watching it, it's pretty genius, but the very short version is that you turn execution "off" for any code that is not in the "current" branch by switching over all MOVs to target a scratch space instead of their real targets, which means they still execute, but don't have an actual effect. Before each possible branch target, you check whether to turn execution "on", if it's the current one, i.e. making the instructions which are part of that branch affect "actual" memory again.
- SpaghettiCthulu 3y agoIt could be argued that the IVT is part of the MOV instruction seeing as the MOV instruction will directly use it for page faults (if I understand correctly).
- userbinator 3y agoIncidentally, the fault handling (presumably done in microcode) is itself Turing-complete: https://news.ycombinator.com/item?id=5261598 https://news.ycombinator.com/item?id=5261598