Bad language from school, recreated to look like Assembly!!! :D Ahmed-approved! (Ahmed is made by my brother)
Go to the Releases page and download the latest instakod.exe file.
To run your InstaKod code, move instakod.exe and your code file to the same folder, then, in the directory, run:
In PowerShell: ./instakod.exe <your file name>
In Command Prompt: instakod.exe <your file name>
This language can be pretty complex, so I've added a folder with examples!
There are only 4 variables, labeled A, B, C and D. They can only store integers. They usually can't store negative numbers, the only way to do so is to use subtraction. A comparison is:
- < / LT (less than)
- <= / LE (less than or equal to)
- = / EQ (equal to)
- != / NE (not equal to)
- > / GT (greater than)
- >= / GE (greater than or equal to).
A jump destination is:
- NXT/NEXT (Jumps to the next instruction)
- END (Ends the program)
- A number (Jumps to the line with that number)
You can't add empty lines because of how the JMP instruction works.
Comments are added at the end of lines with the # symbol. Due to this, the symbol cannot be put into strings.
PVR <variable> - Prints the contents of a variable. Example:
PVR C
Will print the contents of the variable C.
PTX <text> - Prints some text. (you have to use double " quotes, use \" to print a " symbol!) Example:
PTX "Text!!!"
Will print the string Text!!!
NLN - Goes to a new line.
(you really don't need an example...)
LTV <variable> - Load user input to a variable. Example:
LTV B
Will load whatever the user types into B.
SET <variable> <variable or number> - Sets a variable to a specific integer or the contents of another variable. Example:
SET A B
Will set A to the same value as B.
ADD <variable> <variable or number> - Increases the value of a variable by an integer or the contents of another variable. Example:
ADD D 2
Will increase D by 2.
SUB <variable> <variable or number> - Decreases the value of a variable by an integer or the contents of another variable. Example:
SUB A 5
Will decrease A by 5.
IF/IFJ <variable> <comparison> <variable or number> <jump destination> <jump destination> - Compares <variable> with <variable or number> using <comparison>. If the statement is true, jump to the first <jump destination>, otherwise, jump to the second one. Examples:
IF A EQ 0 NEXT END
Will jump to the next line if A is equal to 0, otherwise, ends execution of the program.
IFJ C >= B NXT 2
Will jump to the next line if C is greater than or equal to B, otherwise, jumps to line 2.
JMP <jump destination> - Jumps to the specified jump destination. Example:
JMP 13
Will jump to line 13.
This project is licensed under the MIT License — see the LICENSE file for details
Your reward for making it this far is AHMED!!! (made by my brother)