namespace; include rt; fn sumbytes(n) { let buf[64], i = 0, s = 0, b, reps, ch; while (i < 64) { buf[i] = i * 0x0101010101010101; i++; } b = rt.addr_b(buf); ch = rt.get_c(); reps = 0; while (ch >= '0' && ch <= '9') { reps = reps * 10 + ch - '0'; ch = rt.get_c(); } while (reps > 0) { i = 0; s = 0; while (i < n) { s = s + rt.ld8(b + (i & 511)); i++; } reps--; } return s; } fn main() { rt.put_n(sumbytes(4000)); rt.put_c(10); return 0; }