Created
April 24, 2016 18:44
-
-
Save kpmy/86b5b438f6e67a5f4ca673fc5c4b3cab to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(module | |
(memory 1 1) | |
(import $print "spectest" "print" | |
(param i32)) | |
(func $start | |
(local $p i32) | |
(local $v i32) | |
(set_local $v | |
(i32.load8_u | |
(get_local $p))) | |
(set_local $v | |
(i32.add | |
(get_local $v) | |
(i32.const 1))) | |
(i32.store8 | |
(get_local $p) | |
(get_local $v)) | |
(call_import $print | |
(i32.load8_u | |
(get_local $p))) | |
(set_local $v | |
(i32.load8_u | |
(get_local $p))) | |
(set_local $v | |
(i32.add | |
(get_local $v) | |
(i32.const 1))) | |
(i32.store8 | |
(get_local $p) | |
(get_local $v)) | |
(call_import $print | |
(i32.load8_u | |
(get_local $p))) | |
(set_local $v | |
(i32.load8_u | |
(get_local $p))) | |
(set_local $v | |
(i32.add | |
(get_local $v) | |
(i32.const 1))) | |
(i32.store8 | |
(get_local $p) | |
(get_local $v)) | |
(call_import $print | |
(i32.load8_u | |
(get_local $p))) | |
(set_local $v | |
(i32.load8_u | |
(get_local $p))) | |
(set_local $v | |
(i32.add | |
(get_local $v) | |
(i32.const 1))) | |
(i32.store8 | |
(get_local $p) | |
(get_local $v)) | |
(call_import $print | |
(i32.load8_u | |
(get_local $p))) | |
(set_local $p | |
(i32.add | |
(get_local $p) | |
(i32.const 1))) | |
(set_local $v | |
(i32.load8_u | |
(get_local $p))) | |
(set_local $v | |
(i32.add | |
(get_local $v) | |
(i32.const 1))) | |
(i32.store8 | |
(get_local $p) | |
(get_local $v)) | |
(call_import $print | |
(i32.load8_u | |
(get_local $p))) | |
(set_local $p | |
(i32.add | |
(get_local $p) | |
(i32.const -1))) | |
(call_import $print | |
(i32.load8_u | |
(get_local $p))) | |
(i32.store8 | |
(get_local $p) | |
(i32.add | |
(i32.load8_u | |
(get_local $p)) | |
(i32.const -1))) | |
(call_import $print | |
(i32.load8_u | |
(get_local $p)))) | |
(start $start)) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment