:PROPERTIES: :ID: bb14685f-f6d2-460e-b2d5-a8c964fa4752 :END: #+title: Assembler - [[https://www.youtube.com/c/BenEater/featured][(97) Ben Eater - YouTube]] - [[https://www.youtube.com/c/CryptFunIT/playlists?view=1&sort=dd&shelf_id=0][(97) CryptoFun [ IT ] - YouTube]] - [[https://github.com/akyoto/asm][akyoto/asm: An x86-64 assembler written in Go.]] - [[https://github.com/andrescv/jupiter][andrescv/jupiter: RISC-V Assembler and Runtime Simulator]] - [[https://github.com/andrewchambers/minias][andrewchambers/minias: A mini x86-64 assembler for fun and learning.]] - [[https://ratfactor.com/assembly-nights][Assembly Nights - ratfactor]] - [[https://github.com/Blackend/Cyjon][Blackend/Cyjon: A simple, clean code, multi-tasking operating system written in pure assembly language for 64-bit processors from the AMD64 family.]] - [[https://github.com/cch123/asm-cli][cch123/asm-cli: Interactive shell of assembly language(X86/X64) based on unicorn and keystone]] - [[https://github.com/cch123/asm-cli-rust][cch123/asm-cli-rust: interative assembly shell written in rust]] - [[https://developer.amd.com/resources/developer-guides-manuals/][Developer Guides, Manuals & ISA Documents - AMD]] - [[https://github.com/Dman95/SASM][Dman95/SASM: SASM - simple crossplatform IDE for NASM, MASM, GAS and FASM assembly languages]] - [[https://github.com/echo-devim/fhex][echo-devim/fhex: A Full-Featured HexEditor compatible with Linux/Windows/MacOS]] - [[https://github.com/franeklubi/dino][franeklubi/dino: Chrome's t-rex based bootsector game (512 bytes) written in 16-bit x86 assembly (now with 8086 support!)]] - [[https://github.com/google/bindiff][google/bindiff: Quickly find differences and similarities in disassembled code]] - [[https://github.com/hlorenzi/customasm][hlorenzi/customasm: 💻 An assembler for custom, user-defined instruction sets! https://hlorenzi.github.io/customasm/web/]] - [[https://github.com/horsicq/XOpcodeCalc][horsicq/XOpcodeCalc: Opcode calculator]] - [[https://github.com/icebreaker/floppybird][icebreaker/floppybird: Floppy Bird (OS)]] - [[https://github.com/icedland/iced][icedland/iced: Blazing fast and correct x86/x64 disassembler, assembler, decoder, encoder for .NET, Rust, Python, JavaScript]] - [[https://github.com/io12/BootMine][io12/BootMine: Bootable minesweeper game in a 512-byte boot sector]] - [[https://github.com/IUCompilerCourse/Essentials-of-Compilation][IUCompilerCourse/Essentials-of-Compilation: A book about compiling Racket and Python to x86-64 assembly]] - [[https://github.com/JohnEarnest/Octo][JohnEarnest/Octo: A Chip8 IDE]] - [[https://github.com/loov/lensm][loov/lensm: Go assembly and source viewer]] - [[https://github.com/mat-sz/bfloader][mat-sz/bfloader: Brainfuck IDE and interpreter in 512 bytes. (boot sector)]] - [[https://github.com/nanochess/Invaders][nanochess/Invaders: Invaders game in 512 bytes (boot sector)]] - [[https://github.com/nanochess][nanochess (Oscar Toledo)]] - [[https://github.com/NikitaIvanovV/snake-asm][NikitaIvanovV/snake-asm: Tiny snake game written in x86_64 assembly for Linux]] - [[https://github.com/nikolay-govorov/asm-server][nikolay-govorov/asm-server: Stupid "hello world" http server on NASM. Linux, x64, NASM, zero dependencies.]] - [[https://github.com/nir9/fastws][nir9/fastws: Minimalist Web Server for Linux written in x64 Assembly]] - [[https://github.com/robalb/x86-64-playground][robalb/x86-64-playground: An online assembly editor, emulator and debugger for the x86-64 architecture]] - [[https://github.com/robiot/cbot][robiot/cbot: Shutdown or reboot your linux system with x86_64 assembly]] - [[https://github.com/Schweigi/assembler-simulator][Schweigi/assembler-simulator: Simple 8-bit Assembler Simulator with Angular.js]] - [[https://www.agner.org/optimize/#manuals][Software optimization resources. C++ and assembly. Windows, Linux, BSD, Mac OS X]] - [[https://github.com/someodd/gasm][someodd/gasm: bare-metal i386 Gopher server for Linux]] - [[https://github.com/tenderlove/asmrepl][tenderlove/asmrepl: A REPL for x86-64 assembly language]] - [[https://github.com/TheThirdOne/rars][TheThirdOne/rars: RARS -- RISC-V Assembler and Runtime Simulator]] - [[https://github.com/ThomasJaeger/VisualMASM][ThomasJaeger/VisualMASM: Visual MASM - Assembly IDE for Microsoft MASM]] - [[https://github.com/tsoding/todo.asm][tsoding/todo.asm: Todo Web Application in flat assembler]] - [[https://github.com/x64dbg/x64dbg][x64dbg/x64dbg: An open-source x64/x32 debugger for windows.]] - [[https://github.com/yasp/yasp][yasp/yasp: yasp is a fully functional web-based assembler development environment, including a real assembler, emulator and debugger.]] - [[https://github.com/zyantific/zydis][zyantific/zydis: Fast and lightweight x86/x86-64 disassembler and code generation library]] [[https://habr.com/ru/post/569204/#comment_23288698]] Обычно ассемблер является отображением машинных кодов практически 1 в 1. Мы, например, на 1 курсе университета писали программы в машинных кодах в debug.exe, чтобы потом вздохнуть с облегчением, когда начался ассемблер. Да транслятор вычисляет размеры операндов и адреса меток за вас, но в остальном не сказал бы, что есть какая-то существенная разница. Зная ассемблер, например, вы можете в отладчике остановиться на вызове функции отображения месседжбокса ("This program is not licensed"), промотать код немножко вверх и заменить jne на je (например, обычно конечно всё сложнее) - и вот уже программа принимает любой ключ, кроме собственно верного. Затем, зная, где находится это место в коде - открываете какой-нибудь HIEW и патчите опкод перехода руками. Просматривая голые hex-коды сделать то же самое будет гораздо сложнее. llvm-mc #+begin_example oleg@guixsd ~$ echo "0x33 0xc0 0x31 0xc0" | /gnu/store/…-llvm-10.0.0/bin/llvm-mc -mcpu=i686 -disassemble -show-inst .text xorl %eax, %eax # # # > xorl %eax, %eax # # # > #+end_example * Learning - [[https://github.com/brianrhall/Assembly][brianrhall/Assembly: Assembly Programming and Computer Architecture for Software Engineers]] - [[https://github.com/hackclub/some-assembly-required][hackclub/some-assembly-required: An approachable introduction to assembly.]] - [[https://github.com/luamfb/intro_x86-64][luamfb/intro_x86-64: Introduction to x86-64 assembly]]