7/6/2026 at 9:17:10 PM
> If A = −1: Read one keypress from the human operator and place a number representing it into slot[B]. (If no key is pressed, place 0.)> If B = −1: Display slot[A] as one character of text to the human operator.
This is not well specified imho:
1) What if both A and B are -1? I can't do any of the two, or I would read / write an invalid slot (since slots indexes are >= 0)
2) What does "Read a keypress" mean? Should I wait for the operator to press a key? In that case, how can no key be pressed? Timeout? Or should I just check if a key is already pressed when the instruction is executed?
by curtisblaine
7/6/2026 at 10:12:53 PM
Agreed that the napkin is pretty unclear. You can check the reference VM for clarification of the de facto intended semantics: https://github.com/adriancable/eternal/blob/main/vm/vm.cby derdi