mirror of
https://github.com/irmen/prog8.git
synced 2024-09-07 03:54:27 +00:00
fixed stackvm pop signed byte into register
This commit is contained in:
parent
ede2b83ce4
commit
fd19298a05
@ -1097,8 +1097,11 @@ class StackVm(private var traceOutputFile: String?) {
|
||||
checkDt(value, DataType.UBYTE, DataType.BYTE)
|
||||
val variable = getVar(ins.callLabel!!)
|
||||
checkDt(variable, DataType.UBYTE, DataType.BYTE)
|
||||
if(value.type!=variable.type)
|
||||
if(value.type!=variable.type) {
|
||||
if(ins.callLabel !in Register.values().map { it.name }) {
|
||||
throw VmExecutionException("datatype mismatch")
|
||||
}
|
||||
}
|
||||
variables[ins.callLabel] = value
|
||||
setFlags(value)
|
||||
}
|
||||
@ -2250,6 +2253,13 @@ class StackVm(private var traceOutputFile: String?) {
|
||||
val num = variables.getValue("A").integerValue()
|
||||
canvas?.printText(num.toString(), 1, true)
|
||||
}
|
||||
Syscall.SYSASM_c64scr_print_b -> {
|
||||
val num = variables.getValue("A").integerValue()
|
||||
if(num<=127)
|
||||
canvas?.printText(num.toString(), 1, true)
|
||||
else
|
||||
canvas?.printText("-${256-num}", 1, true)
|
||||
}
|
||||
Syscall.SYSASM_c64scr_print_uw -> {
|
||||
val lo = variables.getValue("A").integerValue()
|
||||
val hi = variables.getValue("Y").integerValue()
|
||||
|
Loading…
Reference in New Issue
Block a user