mirror of
https://github.com/curioustorvald/tsvm.git
synced 2026-03-07 19:51:51 +09:00
added do-nothing function
This commit is contained in:
@@ -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)
|
||||
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user