while (stack.length && stack.at(-1) <= cur) {
JIO_OK ("jump if I/O OK") tests whether CPL ≤ IOPL. The same check gates PUSHF, POPF, INT n, and IRET. The monitor then emulates each instruction as appropriate: maintaining a virtual interrupt flag per V86 task, reflecting software interrupts through the real-mode interrupt vector table, virtualizing I/O accesses, and so on.
。关于这个话题,服务器推荐提供了深入分析
Version management: Each system state is versioned, making tracking easier
Chris Damant/Bernwood Ecology