Lime Assembler
This is a simple 32-bit x86 Assembler language written in Python 3.11.5. Its supports basic x86 instructions and some advanced commands.
- 'def :const(size) const(value)'
- Sizes (Line 68)
- no_input_inst (Line 320)
- jcc_inst (Line 354)
- shift_inst (Line 396)
- type1-2-3_inst (Line 400-430)
- push-pop-segments (Line 442)
- $const, ?
- process(v, s, n): zeroExtend(toHex(v, s), s, n)
- memProc(v, s): reverse(splitBytes(process(v, s, False)))
python3 main.py -s release -f 0 -ver 111 -of 1 -i test.lasm -o test
python3 main.py -help
python3 main.py -version
python3 main.py -s release -f 0 -ver 000 -of 1 -i test.lasm -o test
Note: I used Black Formatter for making code more Prettier
Lasm has 3 main codes:
- main.py (Main thread.)
- variables.py (Variables, constants, colors and settings.)
- functions.py (Basic functions like toInt(x) for converting string to int.)
- instructions.py (Complex commands and instructions.)
To get started, you will need to install Python 3.6 or later. Once you have Python installed, you can clone the LASM repository from GitHub:
git clone https://github.com/Duiccni/Lasm-v1.1.x.git
When you have the code you can run it with python like:
python main.py -i <input-file.lasm> -o <output-file>
NOTE: Dont add output file extension to command.
- NASM (Netwide Assembler)