From 09844c8d38840b3f8eb74e450502041df7037f96 Mon Sep 17 00:00:00 2001 From: Anton Lydike Date: Sun, 18 Apr 2021 18:39:32 +0200 Subject: [PATCH] fixed isinstance check in write syscall --- examples/exit.asm | 0 examples/hello-world.asm | 0 riscemu/Syscall.py | 2 +- 3 files changed, 1 insertion(+), 1 deletion(-) create mode 100644 examples/exit.asm create mode 100644 examples/hello-world.asm diff --git a/examples/exit.asm b/examples/exit.asm new file mode 100644 index 0000000..e69de29 diff --git a/examples/hello-world.asm b/examples/hello-world.asm new file mode 100644 index 0000000..e69de29 diff --git a/riscemu/Syscall.py b/riscemu/Syscall.py index 74aeb64..5d3c117 100644 --- a/riscemu/Syscall.py +++ b/riscemu/Syscall.py @@ -98,7 +98,7 @@ class SyscallInterface: data = scall.cpu.mmu.read(addr, size) - if not isinstance(str, bytearray): + if not isinstance(data, bytearray): print(FMT_SYSCALL + '[Syscall] write: writing from .text region not supported.' + FMT_NONE) return scall.ret(-1)