run exe arg, deref -> read
This commit is contained in:
@@ -15,15 +15,15 @@ func main[] : I64
|
||||
else if op == '<'
|
||||
p = p - 1
|
||||
else if op == '+'
|
||||
str.set(memory, p, str.nth(memory, p)+1)
|
||||
str.set(memory, p, mem.read8(memory + p)+1)
|
||||
else if op == '-'
|
||||
str.set(memory, p, str.nth(memory, p)-1)
|
||||
str.set(memory, p, mem.read8(memory + p)-1)
|
||||
else if op == '.'
|
||||
c.printf("%c", str.nth(memory, p))
|
||||
c.printf("%c", mem.read8(memory + p))
|
||||
else if op == ','
|
||||
str.set(memory, p, c.getchar())
|
||||
else if op == '['
|
||||
if !str.nth(memory, p)
|
||||
if !mem.read8(memory + p)
|
||||
i = i + 1
|
||||
let opened: I64 = 0
|
||||
while i < src_len & !(str.nth(src, i) == ']' & !opened)
|
||||
@@ -33,7 +33,7 @@ func main[] : I64
|
||||
opened = opened - 1
|
||||
i = i + 1
|
||||
else if op == ']'
|
||||
if str.nth(memory, p)
|
||||
if mem.read8(memory + p)
|
||||
i = i - 1
|
||||
let closed: I64 = 0
|
||||
while i >= 0 & !(str.nth(src, i) == '[' & !closed)
|
||||
|
||||
Reference in New Issue
Block a user