diff options
| author | spv420 <unomilliono@gmail.com> | 2022-04-23 18:38:28 -0400 |
|---|---|---|
| committer | spv420 <unomilliono@gmail.com> | 2022-04-23 18:38:28 -0400 |
| commit | bba0b79e286a7b7e64febb8bef7835336a522bbf (patch) | |
| tree | b130fa7c025ae465cbba8c25c2bdbf53a19d0c7c /src/js | |
| parent | c540142dfa20bc7c5413c73cf22e26caaac6a427 (diff) | |
functional programming ftw!
Diffstat (limited to 'src/js')
| -rw-r--r-- | src/js/lib/myutils.js | 3 | ||||
| -rw-r--r-- | src/js/main.js | 4 |
2 files changed, 5 insertions, 2 deletions
diff --git a/src/js/lib/myutils.js b/src/js/lib/myutils.js new file mode 100644 index 0000000..0d10182 --- /dev/null +++ b/src/js/lib/myutils.js @@ -0,0 +1,3 @@ +function puts(s) { + return calls4arg("puts\0", sptr(s), 0, 0, 0); +}
\ No newline at end of file diff --git a/src/js/main.js b/src/js/main.js index c3f5c7d..b67ba34 100644 --- a/src/js/main.js +++ b/src/js/main.js @@ -34,8 +34,8 @@ function main() { init_sptr_heap(); - calls4arg("puts\0", sptr("we out here\0"), 0, 0, 0); - calls4arg("puts\0", sptr("I came through a portal holding a 40 and a blunt. Do you really wanna test me right now?\0"), 0, 0, 0); + 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"); log("slide=0x" + slide.toString(16)); log("*(uint8_t*)base = 0x" + read_u8(base).toString(16)); |
