mirror of
https://github.com/curioustorvald/tsvm.git
synced 2026-06-10 15:04:03 +09:00
bf interpreter because lulz
This commit is contained in:
21
assets/bf/scan
Normal file
21
assets/bf/scan
Normal file
@@ -0,0 +1,21 @@
|
||||
Calculate the value 256 and test if it's zero
|
||||
If the interpreter errors on overflow this is where it'll happen
|
||||
++++++++[>++++++++<-]>[<++++>-]
|
||||
+<[>-<
|
||||
Not zero so multiply by 256 again to get 65536
|
||||
[>++++<-]>[<++++++++>-]<[>++++++++<-]
|
||||
+>[>
|
||||
# Print "32"
|
||||
++++++++++[>+++++<-]>+.-.[-]<
|
||||
<[-]<->] <[>>
|
||||
# Print "16"
|
||||
+++++++[>+++++++<-]>.+++++.[-]<
|
||||
<<-]] >[>
|
||||
# Print "8"
|
||||
++++++++[>+++++++<-]>.[-]<
|
||||
<-]<
|
||||
# Print " bit cells\n"
|
||||
+++++++++++[>+++>+++++++++>+++++++++>+<<<<-]>-.>-.+++++++.+++++++++++.<.
|
||||
>>.++.+++++++..<-.>>-
|
||||
Clean up used cells.
|
||||
[[-]<]
|
||||
Reference in New Issue
Block a user