A mini assembler for x86_64, written for fun and learning.

Related tags

Miscellaneous dumbas
Overview

minias

A mini assembler for x86_64, written for fun and learning.

Goals:

  • A simple, tiny, fast implementation (in that order).
  • Assemble the output of cproc/qbe.
  • Relocatable elf output.

Non Goals:

  • Assemble every assembly instruction.
  • Assemble other architectures.
  • Work as a library.

Building

redo minias

or

leg asm.peg > asm.peg.inc
cc -O2 *.c -o minias

Resources

You might also like...
A basic assembler

Assembler ASSEMBLER DERLEYİCİSİ Programlama Dilleri (derleyiciler) giriş olarak yazılan bir programın kaynak kodunu alır (kodun doğru yazıldığı varsay

A fully customisable assembler for your own instruction sets

CASM A fully customisable assembler for your own instruction sets! What Is CASM? 🇨 Documentation 📚 Command-Line Usage 💻 How To Install CASM 💾 Buil

x86-64 Assembler based on Zydis

Zasm : x86-64 Assembler based on Zydis Why? Some of my projects were using Zydis and AsmJit where instructions where were first decoded with Zydis and

PHP Encoder, protect PHP scripts in PHP 8 and PHP 7, High Performance, Compitable with X86_64, MIPS, ARM platform and Ubuntu/Centos/OpenWRT system.

What's FRICC2? FRICC2 is a PHP Script encryption tool. When you are developing a commercial software using PHP, the script can be distributed as encry

SafetyHook - simple procedure hooking library for Windows x86 and x86_64 systems

SafetyHook SafetyHook is simple procedure hooking library for Windows x86 and x86_64 systems. It aims to make runtime procedure hooking as safe as pos

It's a simple and free x86_64 architecture operating system created by one person, GoofOS started since 2022

This project is while developing... GoofOS GoofOS is a text operating system for x86 computers. About This is a 32 bit x86_64 graphical operating syst

Linux x86_64 Process Injection Utility | Manipulate Processes With Customized Payloads (beta)
Linux x86_64 Process Injection Utility | Manipulate Processes With Customized Payloads (beta)

K55 - Linux x86_64 Process Injection Utility (C++11) About K55 (pronounced: "kay fifty-five") The K55 payload injection tool is used for injecting x86

An x86_64 operating system
An x86_64 operating system

Vigil Vigil is a x86_64 operating system. Features Booted by Limine using the stivale2 protocol Physical memory manager Virtual memory manager "Slab"

x86_64, PE32+, FAT32 bootloader
x86_64, PE32+, FAT32 bootloader

carboot This project is a small x86_64 bootloader capable of reading FAT32 and mapping PE32+ images. It is the bootloader for carbon and is designed t

Comments
  • Use smaller encodings in a few more cases.

    Use smaller encodings in a few more cases.

    None of these are bugs, but they showed up when comparing disassembly between gas and minias.

    I'm less confident about the imul change than the other two. Please double-check that it looks correct to you.

    opened by michaelforney 0
  • Use void * for functions that access bytes of object representation.

    Use void * for functions that access bytes of object representation.

    Although out() and secaddbytes() only use their argument to call fwrite()/memcpy(), using the type uint8_t * suggests that it might be dereferenced as uint8_t. In general, it is undefined behavior to access an object through a uint8_t pointer, since uint8_t is not necessarily a character type.

    So, just use void * to avoid some casts and implication of possible undefined behavior.

    opened by michaelforney 0
  • Use Elf64_Rela for relocations.

    Use Elf64_Rela for relocations.

    I needed this to run hello world on my system (otherwise I get a segfault). I'm not sure exactly why Elf64_Rel worked for you but not for me, but since the spec says to always use explicit addends, this seems like the right thing to do.

    opened by michaelforney 0
Owner
null
This is a prank windows malware, is only for fun, it's just for fun, it's not harmful

DBUSTER-PRO (C) 2021-2022 DioBrando This is a prank windows malware, just for fun, nothing harmful. I will teach you how to compile, and remove malwar

Dio brando 8 Apr 15, 2022
ASMotor is a portable and generic assembler engine and development system written in ANSI C99

ASMotor is a portable and generic assembler engine and development system written in ANSI C99 and licensed under the GNU Public License v3. The package consists of the assembler, the librarian and the linker. It can be used as either a cross or native development system.

null 42 Nov 18, 2022
An x86_64 hobbyist OS written in C and Assembly

KnutOS An x86_64 hobbyist OS made for FUN and LEARNING! It is written in C and Assembly and features a monolithic kernel. Screenshots Features Limine

Yves Vollmeier 31 Dec 9, 2022
A programming language written for fun!

The Noja language Introduction Objective Show me the code! Implementation overview Supported platforms Development state Build Usage Introduction This

Francesco Cozzuto 56 Dec 3, 2022
Just a basic mini library for parsing simple files that only have variables written and with Lua extension.

C++ Parser Lua file config Just a basic mini library for parsing simple files that only have variables written and with Lua extension. Note: At the mo

Marcos Oliveira 3 Dec 26, 2021
Hobbyist Operating System targeting x86_64 systems. Includes userspace, Virtual File System, An InitFS (tarfs), Lua port, easy porting, a decent LibC and LibM, and a shell that supports: piping, file redirection, and more.

SynnixOS Epic Hobby OS targeting x86_64 CPUs, it includes some hacked together functionality for most essential OSs although, with interactivity via Q

RaidTheWeb 42 Oct 28, 2022
Commodore 6502ASM, the original 6502/65C02/65CE02 Assembler used by Commodore for C65 project

Commodore 6502ASM This is the source code of the 6502/65C02/65CE02 assembler developed and used by Commodore for the C65 project. It aims to be compat

Michael Steil 17 Nov 29, 2022
A simple assembler, made primarily for assembling output from my compiler.

Assembler This assembler is not currently meant for general use. It supports only the instructions and features emitted (and used) in my C compiler. I

null 2 Nov 14, 2021
Toy 8 bit CPU with a real assembler

neko8 neko8 is a 8 bit CPU emulator designed to be easy to learn written in C. It uses its own simple architecture and can be programmed in its own fo

rem 4 Jan 4, 2022
x86 Assembler used for generating shellcode

Intel x86 assembler [email protected] syntax: Decimal “integers begin with a non-zero digit followed by zero or more decimal digits (0–9)” B

thescientist 1 Dec 28, 2022