diff options
author | Kartik K. Agaram <vc@akkartik.com> | 2015-03-28 19:20:58 -0700 |
---|---|---|
committer | Kartik K. Agaram <vc@akkartik.com> | 2015-03-28 19:20:58 -0700 |
commit | d39883ec7eaa17a3efafeff86ee3f0d75e4d0ebf (patch) | |
tree | f8430a788ea15a4dfd6b76b33a6df740749f62b1 /cpp/020array | |
parent | f1a3be1c542120b01fd8273aabf8a674530df981 (diff) | |
download | mu-d39883ec7eaa17a3efafeff86ee3f0d75e4d0ebf.tar.gz |
989
Diffstat (limited to 'cpp/020array')
-rw-r--r-- | cpp/020array | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/cpp/020array b/cpp/020array index f6f2c0c5..bfa2b4ac 100644 --- a/cpp/020array +++ b/cpp/020array @@ -122,3 +122,15 @@ case INDEX_ADDRESS: { write_memory(instructions[pc].products[0], result); break; } + +:(scenario "index_indirect") +recipe main [ + 1:integer <- copy 3:literal + 2:integer <- copy 14:literal + 3:integer <- copy 15:literal + 4:integer <- copy 16:literal + 5:address:array:integer <- copy 1:literal + 6:integer <- index 5:address:array:integer/deref, 1:literal +] ++run: instruction main/5 ++mem: storing 15 in location 6 |