Execute Brain****: Difference between revisions

Content added Content deleted
m (→‎{{header|Phix}}: added syntax colouring the hard way)
Line 1,409: Line 1,409:
target: last vstack
target: last vstack
chop 'vstack
chop 'vstack
set jumphash target instrPointer
jumphash\[target]: instrPointer
set jumphash instrPointer target
jumphash\[instrPointer]: target
]
]
]
]
Line 1,435: Line 1,435:
command: get split Code InstructionPointer
command: get split Code InstructionPointer
case [command=]
case [command=]
when? ["+"] -> set Tape DataPointer (Tape \ DataPointer)+1
when? ["+"] -> Tape\[DataPointer]: Tape\[DataPointer]+1
when? ["-"] -> set Tape DataPointer (Tape \ DataPointer)-1
when? ["-"] -> Tape\[DataPointer]: Tape\[DataPointer]-1
when? [">"] [
when? [">"] [
inc 'DataPointer
inc 'DataPointer
Line 1,442: Line 1,442:
]
]
when? ["<"] -> dec 'DataPointer
when? ["<"] -> dec 'DataPointer
when? ["."] -> prints to :string to :char Tape \ DataPointer
when? ["."] -> prints to :string to :char Tape\[DataPointer]
when? [","][
when? [","][
inp: to :integer input ""
inp: to :integer input ""