Beditasm
- This article is no longer maintained by anyone
Beditasm is an assembly-like esolang created by User:None1, which runs on an imaginary binary editor.
Data storage
The esolang stores its data in an imaginary editor which has a null byte initially, and two registers which are initially 0.
Commands
INS
There are two usages:
- INS (with no arguments), read a character from user input and insert it at the cursor.
- INS <CHARACTER>, insert <CHARACTER> at the cursor
KEY
KEY <KEY>
Press <KEY> in the imaginary editor.
Valid keys are:
- DELETE, delete the character at the cursor.
- BS, delete the character at the left of the cursor.
- CTRL-A, Select all.
- CTRL-S, Select the character at the cursor.
- CTRL-P, print the selected text to standard output, if there is no selected text, print the whole text.
- CTRL-C, copy.
- CTRL-V, paste.
- CTRL-X, cut.
- CTRL-BS, move the cursor to the left.
- ENTER, insert line feed.
ASC
ASC <HEX>, <HEX> is two hex digits, which represents an ASCII character, set the second register as that character.
REG
REG, insert the character stored in the second register at the cursor.
CMP
CMP, compare if the value is equal to the second register, store the boolean result to the first register.
J
J <LINE-NUMBER>, if the value in the first register IS 0, then jump to <LINE-NUMBER>.
C
Comment.
This esolang is not case sensitive.
Example Programs
Hello World
INS H INS e INS l INS l INS o ASC 20 REG INS W INS o INS r INS l INS d INS ! KEY Ctrl-P
Cat Program
INS KEY Ctrl-S KEY Ctrl-P KEY DELETE J 1
Truth Machine
ASC 30 INS KEY Ctrl-S CMP J 13 INS 0 CMP KEY BS KEY BS INS 1 KEY Ctrl-P J 6 INS 0 KEY Ctrl-P
Note that if the input is neither 1 nor 0, the program will treat it as 1.
Turing Completeness
Beditasm is Turing complete, I'm writing a proof now.
P.S.: The proof may not right away, because I'm busy working on other esolangs.