Skip to content

carltheperson/assembly-enigma

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

33 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Assembly Enigma

An Enigma Machine written in 6502 assembly

Read the blog post about this project here

Examples

example

Running

Step 1: Install xa

Install for Mac here https://formulae.brew.sh/formula/xa

More info here https://www.floodgap.com/retrotech/xa/

Step 2: Clone x6502 (6502 emulator)

git clone https://github.com/haldean/x6502

Step 3: Compile x6502

cd x6502
gcc -o x6502.bin -O3 -lpthread -Wall -lncurses -Werror -Wimplicit-function-declaration *.c

⚠️ You might get an error like debug.c:2:10: fatal error: 'debug-names.h' file not found. I solved it by commenting out the dump_cpu function in x6502/debug.c and line 2 with #include "debug-names.h". You don't need this stuff to run the program (who needs debug functionality?)

Step 4: Compile and run program

While being in ./x6502 run:

xa -w -Istdlib/ ../src/main.asm  && ./x6502 a.o65

Tip: ^C to exit program

Bonus program (Caesar Cihper)

If you want to look at a more easily comprehensible program, there is a file called caesar-cipher.asm in this repository.

xa -w -Istdlib/ ../caesar-cipher.asm  && ./x6502 a.o65

Tip: Type e (as the first thing) to choose encryption or d to choose decryption

License

This project is licensed under the MIT License - see the LICENSE file for details.

About

An Enigma Machine written in 6502 assembly

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published