diff --git a/dopey.py b/dopey.py index 998308d..192c453 100644 --- a/dopey.py +++ b/dopey.py @@ -1,3 +1,4 @@ +import sys # create memory buffer BUFFER_SIZE = 30_000 @@ -11,4 +12,19 @@ DECREMENT = "-" OUTPUT = "." INPUT = "," OPEN_LOOP = "[" -CLOSE_LOOP = "]" \ No newline at end of file +CLOSE_LOOP = "]" + +# get bf file location +file_location = None +if len(sys.argv) != 2: + print("Invalid or missing arguments...") + sys.exit() +else: + file_location = sys.argv[1] + +# open file +file = open(file_location, "r") +print(file.read(1)) + + + diff --git a/helloworld.bf b/helloworld.bf new file mode 100644 index 0000000..929a771 --- /dev/null +++ b/helloworld.bf @@ -0,0 +1,2 @@ +++++++++[>++++[>++>+++>+++>+<<<<-]>+>+>->>+[<]<-]>>.> +---.+++++++..+++.>>.<-.<.+++.------.--------.>>+.>++. \ No newline at end of file