summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorspv420 <unomilliono@gmail.com>2022-04-23 18:40:22 -0400
committerspv420 <unomilliono@gmail.com>2022-04-23 18:40:22 -0400
commitbc3e2818f1c96289f1db2ed367274fb7bb06e89a (patch)
treed9b764a032b538e64d8fcbc39046dae6446583f0
parentbba0b79e286a7b7e64febb8bef7835336a522bbf (diff)
yeet
-rw-r--r--src/js/lib/myutils.js8
-rw-r--r--src/js/main.js4
2 files changed, 9 insertions, 3 deletions
diff --git a/src/js/lib/myutils.js b/src/js/lib/myutils.js
index 0d10182..80d4d9b 100644
--- a/src/js/lib/myutils.js
+++ b/src/js/lib/myutils.js
@@ -1,3 +1,9 @@
function puts(s) {
- return calls4arg("puts\0", sptr(s), 0, 0, 0);
+ return calls4arg("puts\0", sptr(s + "\0"), 0, 0, 0);
+}
+
+function printf() {
+ for (var i = 0; i < arguments.length; i++) {
+ puts(arguments[i]);
+ }
} \ No newline at end of file
diff --git a/src/js/main.js b/src/js/main.js
index b67ba34..e040d05 100644
--- a/src/js/main.js
+++ b/src/js/main.js
@@ -34,8 +34,8 @@ function main() {
init_sptr_heap();
- puts("we out here\0");
- puts("I came through a portal holding a 40 and a blunt. Do you really wanna test me right now?\0");
+ puts("we out here");
+ puts("I came through a portal holding a 40 and a blunt. Do you really wanna test me right now?");
log("slide=0x" + slide.toString(16));
log("*(uint8_t*)base = 0x" + read_u8(base).toString(16));