Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/aliiimaher/assembler-x86
This is an assembler written in python.
https://github.com/aliiimaher/assembler-x86
assembler assembly assembly-x86 opcodes
Last synced: 1 day ago
JSON representation
This is an assembler written in python.
- Host: GitHub
- URL: https://github.com/aliiimaher/assembler-x86
- Owner: aliiimaher
- License: mit
- Created: 2023-08-02T18:32:10.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2023-08-02T19:32:24.000Z (over 1 year ago)
- Last Synced: 2024-09-17T17:09:41.880Z (about 2 months ago)
- Topics: assembler, assembly, assembly-x86, opcodes
- Language: Python
- Homepage:
- Size: 3.52 MB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Design An Assembler Assembler-X86
This is an assembler written in Python.## Author: Seyed Ali Maher
## Student NO.: 9932113
## Creation Date: 1400-10-06
## Revision: 03## Program Description
Design an assembler that converts assembly code to machine code. This assembler project supports instructions like ADD, AND, SUB, OR, and JMP.
## Improvements in Part 3
In this part, a short JMP instruction is added. Additionally, support is extended to handle the last parts (MOD = 11) and (MOD = 00).
## Warnings
1. We don't support 16 bits in MOD = 00!
2. For ah, ch, esp, and ebp, we consider them the same as other registers (No SIB).
3. Only one jump is allowed.## Sources
- [Assembly Instructions Reference](http://www.c-jump.com/CIS77/CPU/x86/lecture.html#X77_0210_encoding_add_immediate)
- [Online Assembler and Disassembler](http://shell-storm.org/online/Online-Assembler-and-Disassembler/)## Special Thanks
A great thanks to Mr. Mirhosseini for his awesome guidance during the development of this assembler.
## How to Use
1. Ensure you have Python installed on your machine.
2. Clone this repository to your local system.
3. Create an input text file named `InputsAsmCodes.txt` and add your assembly code to it.
4. Run the assembler using the command: `python assembler.py`.
5. The assembler will read the input file, process the instructions, and generate the corresponding machine code.
6. The output will be displayed in the console.## Example Assembly Code
```assembly
; Example Assembly Code
ADD AX, BX
SUB CX, DX
AND AX, 0x0F
OR BH, AL
JMP LABELLABEL:
; Your code here
```![Assembler Image](Assembly%20Opcode%20Table.jpg)