News for hackers. Stuff that matters.
Re:Design and Implementation of a 256-Core BrainFuck Compute... by posterboy on Saturday October 15, 2016 @06:01PM (#12715839)
All 6 BF commands have x86 opcode counterparts, already. Don't quote me, I'm guessing.
Re:Design and Implementation of a 256-Core BrainFuck Compute... by userbinator on Saturday October 15, 2016 @06:24PM (#12715901)
Not quite, but an interpreter can be written in less than 100 bytes of x86 instructions:

http://www.hugi.scene.org/compo/compoold.htm#compo6

Re:Design and Implementation of a 256-Core BrainFuck Compute... by posterboy on Sunday October 16, 2016 @08:02AM (#12718222)
The competition rules have added constraints to make the interpreter a usual command line tool. However, with memory mapped input and output ports it becomes a lot easier, which would be akin to 8bit micro controller programming. Parsing would take more than one cpu instruction per BF instruction, so the program would need to be assembled. I don't know x86 well enough to write that, though. I imagined, there would be a single instruction equivalent of 'x=*(p++)', but couldn't find anything like that.

In some makeshift syntax and with one instruction too much, I got:

   >, < = inc, dec al
   +, - = inc, dec [al]
   . = out output_port, [al]
   , = in [al], input_port
   [ = Label: cmp [al], #0
       jnz (Labelend + sizeof (jmp instruction))
   ] = Labelend: jmp Label
The labels are generated by the assembler. The ports would have to be directly soldered to some I/O peripherie, but alternatively the input and output could be memory mapped and fed by interrupts, as well.