mirror of
https://github.com/curioustorvald/tsvm.git
synced 2026-03-11 21:51:50 +09:00
implementing 'hdk' to main system wip
This commit is contained in:
@@ -102,4 +102,10 @@ class DMADelegate(private val vm: VM) {
|
||||
fun ramToRam(from: Int, to: Int, length: Int) {
|
||||
UnsafeHelper.memcpy(vm.usermem.ptr + from, vm.usermem.ptr + to, length.toLong())
|
||||
}
|
||||
|
||||
fun strToRam(str: String, to: Int, srcOff: Int, length: Int) {
|
||||
for (i in srcOff until srcOff + length) {
|
||||
vm.poke(to.toLong() + i, str[i - srcOff].code.toByte())
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user