vm: some preparations for floating point

This commit is contained in:
Irmen de Jong
2022-04-25 00:10:12 +02:00
parent 6471c0c536
commit 625d5b2313
13 changed files with 497 additions and 310 deletions
+7
View File
@@ -44,6 +44,13 @@ class TestMemory: FunSpec({
mem.getUB(1001) shouldBe 0xeau
}
test("32 bits float access") {
val mem = Memory()
mem.getFloat(1000) shouldBe 0.0
mem.setFloat(1000, -9.876543f)
mem.getFloat(1000) shouldBe -9.876543f
}
test("setstring and getstring") {
val mem = Memory()
mem.setString(1000, "******************", false)