diff options
Diffstat (limited to 'lisc/test')
-rw-r--r-- | lisc/test/max.ssa | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/lisc/test/max.ssa b/lisc/test/max.ssa index e9c0c43..0a099fd 100644 --- a/lisc/test/max.ssa +++ b/lisc/test/max.ssa @@ -2,14 +2,15 @@ # in a nul-terminated array # of unsigned bytes # -# b input array -# a output max +# the output is stored in $a + +data $arr = { b 10, b -60, b 10, b 100, b 200, b 0 } function $test() { @start @loop %max =w phi @start -1, @new %byt, @old %max - %loc =l phi @start $b, @new %loc1, @old %loc1 + %loc =l phi @start $arr, @new %loc1, @old %loc1 %byt =w loadub %loc %loc1 =l add 1, %loc jnz %byt, @iter, @end |