Click here to find out how I made this project
I find assemblers really interesting because they convert human-readable text into the actual bit patterns undersood by the processor. Assembly is a direct one-for-one translation from text to instructions, each instruction in the assembly code becomes a single instruction that's passed to the processor.
I wrote every part of my Assembler from scratch, from the parser to the code generator. Doing everything from scratch required me to learn Apple's Mach object format and implement Java code to parse and generate Mach object files. I also learned how to write ARM64 assembly.
Below you can run my own handwritten Assembler. It's written in Java and it currently targets the Mach object format and the ARM64 processor architecture. My long-term goal for this project is to target more formats and architectures such as the Linux ELF format, Windows PE format and the x86 processor architecture too.
Click 'Run code' below to send the example assembly code to my server where my assembler will be called and the resulting object file will be returned. The different sections of the object file are colour coded when you wave your mouse over them. Click on any byte in the output for more information about its section of the object file.
Thank you for reading about my Assembler implementation, I hope you enjoyed playing with the example code. If you would like to learn more please read my writeup here.
You can find all of the source code for my Assembler implementation on my GitHub here https://github.com/FrancisMcN/assembler