Implement stdin.read_exact() to specification
sunjay opened this issue · comments
The current instruction generation for stdin.read_exact()
is not exactly what was described in #66.
- Implement the full, exception safe version of reading input (branching on whether a read returned null or not)
- Put this behind a compiler flag since it may be desirable to turn it off
- Alternatively, add an unsafe method called
stdin.read_exact_unchecked
which reads the bytes without checking if each one is zero - Another alterative is to have a method for reading a single byte that is unchecked, probably makes more sense this way
- Alternatively, add an unsafe method called
- Consider whether this is needed when reading just a single byte at a time (see cat.brn)