 # ## Machine Model
 environment = (0 for i in [0...100]) # Originally 30000 instead of 100
 pointer = 0
-output = (string) -> console.log string
-input = prompt
+output = (byte) -> console.log String.fromCharCode(byte)
+input = () -> prompt "Input byte value: "
 
 # ## Evaluate
 

    when DEC_BYTE
      environment[pointer]--
    when OUTPUT_BYTE
      output(String.fromCharCode(environment[pointer]))
    when INPUT_BYTE
      byteValue = input("Input byte value: ")
      environment[pointer] = byteValue

isCommand = (child) -> typeof child is 'string'
isBlock = (child) -> typeof child is 'object'


# We presume no one in their right mind would want to type brainfuck directly
# into the interpreter, but rather specify the path of a file to execute.
filename = prompt("Enter path of input program: ")
program = fs.readFileSync(filename, 'utf8')

log "-*- Input Program -*-"
