mirror of
https://github.com/curioustorvald/tsvm.git
synced 2026-06-14 08:24:04 +09:00
added do-nothing function
This commit is contained in:
@@ -109,6 +109,16 @@ class VMJSR223Delegate(val vm: VM) {
|
|||||||
return sb.toString()
|
return sb.toString()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
fun spin() {
|
||||||
|
Thread.sleep(4L);
|
||||||
|
}
|
||||||
|
|
||||||
|
fun waitForMemChg(addr: Int, andMask: Int, xorMask: Int) {
|
||||||
|
while ((peek(addr) xor xorMask) and andMask == 0) {
|
||||||
|
spin();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
fun waitForMemChg(addr: Int, andMask: Int) = waitForMemChg(addr, andMask, 0)
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user