zabolekar / budivelnyk Goto Github PK
View Code? Open in Web Editor NEWassembly language experiments
License: MIT License
assembly language experiments
License: MIT License
Would be nice to emit a single instruction for each homogeneous group of +
, -
, <
or >
. As of now repeated instructions are emitted.
Also it might be an interesting challenge to add recognition of some of these:
[-]
or simple equivalents (it is the user’s fault if they write [-+-]
and it doesn’t optimize);—probably the later the lesser a gain.
Something definite should be happening at EOF when ,
is run, and be tested.
Cf. https://esolangs.org/wiki/Brainfuck#EOF:
EOF is a controversial issue. Many implementations return 0, some return -1, and several notable brainfuck programmers suggest that on EOF the memory cell should be left as-is, without modification. In the original distribution the compiler left the cell unchanged, while the interpreter used the EOF from C which, strictly speaking, could be any negative integer, but which usually is -1 (which, in the case of byte-sized cells, ends up as 255).
and https://esolangs.org/wiki/Brainfuck#EOF_2:
An interpreter should normally either return Zero or leave the cell unchanged on EOF.
The Zero option matches the brainfuck language in that the only conditional in brainfuck is a comparison with zero. Using this form, in theory, allows slightly shorter code. For eight bit cells the "leave the cell untouched" matches the C/Unix read(2) system call in that the character memory will be left unchanged on EOF. For Unix the EOF (or error) condition is signalled by the return value, which is lost with BF. If the interpreter's cells are more than eight bits the "unchanged cell" can safely handle binary data. If the cells are eight bit or the interpreter sets the cells to zero on EOF binary data cannot be handled.
For a brainfuck program this means that ASCII data+EOF should be read using a
[-],
construct (or similar). Binary input should, probably, be read using a construct of the form[-]-,
. This requires that input bytes are in the range 0..255 when the cell size exceeds eight bits.Note: It is strongly recommended that an interpreter be configurable to all three normal form of EOF (Zero, minus one and unchanged).
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.