Skip to content

moesay/Elegant86

Repository files navigation

Elegant86 logo

Elegant86

A cross-platform 8086/8088 assembler & emulator built to make assembly easier.
Report bug · Request feature

Table of contents

Why?

The reason behind building Elegant86 is to make Assembly much easier to learn by offering a CPU execution-visualizer that shows you exactly what happened after executing that specific instruction. But you might ask, who needs Assembly in the '20s? Assembly is here to stay. Understanding Assembly will give you a good perspective of how your project really works and how to optimize it.

Elegant86 doesn't invoke another assembler to assemble your code. Elegant86 itself is an assembler. A simple in design, powerful in execution one. So you have the chance to dive into its code and see how your instructions get converted into machine code. The design simplicity made contributing to the project easier but there is a cost. Simply, Elegant86 is not optimal.

Quick start

Linux

To build Elegant86 you need git, qt5, g++ >= 11 or clang++ >= 11, cmake, make.

$ git clone git@github.com:moesay/Elegant86.git
$ cd Elegant86
$ mkdir build && cd build
$ cmake ..
$ make Elegant86

If g++-11 isn't detected by cmake, use cmake -DCMAKE_CXX_COMPILER=/path/to/g++-11.

By default its -DCMAKE_CXX_COMPILER=/usr/bin/g++-11

Windows

Elegant86 hasn't been guranteed to compile with Windows compilers. This section will be updated after testing.

Elegant86 UML Diagram

Implemented instructions list

Instruction Status Instruction Status Instruction Status Instruction Status
add ✔️ push ✔️ pop ✔️ mov ✔️
in out adc inc
sub sbb dec neg
cmp aas ✔️ das ✔️ mul
imul aam ✔️ div idiv
aad ✔️ cbw ✔️ cwd ✔️ not
shl sal shr sar
rol ror rcl rcr
and ✔️ test or xchg
xor rep movs cmps
scas lods sti ✔️ call
jmp ✔️ ret je ✔️ cld ✔️
jl ✔️ into ✔️ jle ✔️ jng ✔️
aaa ✔️ jnae ✔️ jbe ✔️ jna ✔️
jp ✔️ jpe ✔️ wait ✔️ js ✔️
jne ✔️ jnz ✔️ jnl ✔️ jge ✔️
jnle ✔️ jg ✔️ jnb ✔️ jae ✔️
nop ✔️ ja ✔️ jnp ✔️ jpo ✔️
jno ✔️ ret jns ✔️ loop
loopz loope loopnz loopne
jcxz ✔️ int jnge ✔️ iret ✔️
clc ✔️ cmc ✔️ stc ✔️ jz ✔️
std ✔️ cli ✔️ stds ✔️ hlt ✔️
jo ✔️ esc lock ✔️ jb ✔️
daa ✔️ lahf ✔️ jnbe popf ✔️
sahf ✔️

Documentation

Elegant86 hasn't been documented yet. This section will be updated once the documentation is ready.

Contributing

There are no contributing guidelines for Elegant86 (so far). Feel free to fork the repo and help releasing Elegant86 faster.

Note: Instructions implementations won't be pulled to the repository without a successful unit test. Elegant86 uses gtest for testing. Consider writing the proper unit test for your implementation.

Bugs and features requests

Have a bug or a feature request? Please first check the issues and search for existing and closed one. If your problem or idea is not addressed yet, please open a new issue.

Copyright and license

Code copyright 2019–2022 the Elegant86 Author. Code released under the GNU General Public License.

Elegant86 icon copyright ©️ Freepik Company S.L.

About

A cross-platform 8086/8088 assembler & emulator built to make assembly easier.

Topics

Resources

License

Stars

Watchers

Forks