diff options
author | bd-912 <bdunahu@colostate.edu> | 2024-04-26 15:50:38 -0600 |
---|---|---|
committer | bd-912 <bdunahu@colostate.edu> | 2024-04-26 15:50:38 -0600 |
commit | 1851f5e76018ec1df3b55dce6cc9a64c9497bf7a (patch) | |
tree | 30f629f7b137a494d4202487f4e22df2d9456481 /base/MoreThan4.vaporm | |
parent | 012298517078170762112abe2654dc69b2f146e1 (diff) |
Rearrange directory structure
Diffstat (limited to 'base/MoreThan4.vaporm')
-rw-r--r-- | base/MoreThan4.vaporm | 68 |
1 files changed, 68 insertions, 0 deletions
diff --git a/base/MoreThan4.vaporm b/base/MoreThan4.vaporm new file mode 100644 index 0000000..bf549b2 --- /dev/null +++ b/base/MoreThan4.vaporm @@ -0,0 +1,68 @@ +const vmt_MT4 + :MT4.Start + :MT4.Change + +func Main [in 0, out 3, local 0] + $t0 = HeapAllocZ(4) + [$t0] = :vmt_MT4 + if $t0 goto :null1 + Error("null pointer") +null1: + $t1 = [$t0] + $t1 = [$t1] + $a0 = $t0 + $a1 = 1 + $a2 = 2 + $a3 = 3 + out[0] = 4 + out[1] = 5 + out[2] = 6 + call $t1 + $t1 = $v0 + PrintIntS($t1) + ret + +func MT4.Start [in 3, out 3, local 0] + $t0 = $a0 + $t1 = $a1 + $t2 = $a2 + $t3 = $a3 + $t4 = in[0] + $t5 = in[1] + $t6 = in[2] + PrintIntS($t1) + PrintIntS($t2) + PrintIntS($t3) + PrintIntS($t4) + PrintIntS($t5) + PrintIntS($t6) + $t7 = [$t0] + $t7 = [$t7+4] + $a0 = $t0 + $a1 = $t6 + $a2 = $t5 + $a3 = $t4 + out[0] = $t3 + out[1] = $t2 + out[2] = $t1 + call $t7 + $t7 = $v0 + $v0 = $t7 + ret + +func MT4.Change [in 3, out 0, local 0] + $t0 = $a1 + $t1 = $a2 + $t2 = $a3 + $t3 = in[0] + $t4 = in[1] + $t5 = in[2] + PrintIntS($t0) + PrintIntS($t1) + PrintIntS($t2) + PrintIntS($t3) + PrintIntS($t4) + PrintIntS($t5) + $v0 = 0 + ret + |