added do-nothing function

This commit is contained in:
minjaesong
2020-12-08 17:35:09 +09:00
parent c4522c7de3
commit b8f4c13ba2

View File

@@ -109,6 +109,16 @@ class VMJSR223Delegate(val vm: VM) {
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)
}