initial commit
This commit is contained in:
commit
5ad6baa30d
1 changed files with 2877 additions and 0 deletions
48
README.md
Normal file
48
README.md
Normal file
|
|
@ -0,0 +1,48 @@
|
|||
# echse
|
||||
|
||||
The cutest assembly-like language!
|
||||
|
||||
This is for learning or teaching purposes only - and is probably not useful for anything else.
|
||||
|
||||
## From code to running
|
||||
|
||||
1. Code with macros (.es)
|
||||
2. Preprocessor applies macros and resolves jump labels (.ei)
|
||||
3. Transform into binary representation (.eo)
|
||||
4. Run the binary
|
||||
|
||||
Currently, you have to write and execute a .ei file.
|
||||
|
||||
## Ideas and ToDos
|
||||
|
||||
- a cute manual for the provided functionality
|
||||
- preprocessor that supports jumping to labels and unrolled loops
|
||||
- separate machine configuration and program in files
|
||||
- register custom instructions before parsing
|
||||
- optional stack with pus, pop, ret
|
||||
- small games built upon this:
|
||||
- battle multiple programs against each other
|
||||
- rustlings-like exercises to learn the instructions
|
||||
- put multiple echsen into an environment, interact with environment
|
||||
|
||||
## Limitations
|
||||
|
||||
List of constraints that I want to keep:
|
||||
|
||||
- general-purpose registers
|
||||
- are always interpreted as native signed integers
|
||||
- are numbered r0...rn, without gaps
|
||||
- all base instruction
|
||||
- have names with 3 letters
|
||||
- all test instructions start with i (after prefixes) and always set r0
|
||||
- all conditional jumps act based upon r0
|
||||
- when interpreting numbers as booleans: 0 is false, everything else is true. The name of instructions should reflect that.
|
||||
- all extension instructions
|
||||
- have names longer than 3 letters
|
||||
- have a extension prefix
|
||||
- the executed instructions do not know anything about the preprocessor and all formatting and jump marks are lost
|
||||
- there should be no hard-coded calling convention
|
||||
|
||||
## License
|
||||
|
||||
The code in this repository is licensed under GPL v2 or later, unless stated otherwise in the file.
|
||||
Loading…
Reference in a new issue