// This demonstrates the ijvma generation in ruri. main { word a; word i; word str; str = "Writing a array: "; printstr(str); a = alloca(10); for (i = 0; i < 10; i = i + 1) { a[i] = i + '0'; } for (i = 0; i < 10; i = i + 1) { out a[i]; } out '\n'; halt; } method printstr (word str) { word i; i = 0; while (str[i]) { out str[i]; i = i + 1; } return 0; }