r/Assembly_language • • Feb 18 '26 Hooray

Project show-off Did my first Rainbow Hello World in pure x86 asm!

Post image
1.7k Upvotes

Couldn't get it to work on the bare metal (boot from cd) though hahahahahha​​


r/Assembly_language • • Mar 04 '26

Why did I write a web server in assembly?

Post image
1.3k Upvotes

In December 2024 and May 2025, a friend of mine had to submit university projects. He was tasked with developing a game using a GitHub template and asked for my help. The first project was in C using the raylib library, and the second one was in C++ with the same graphics library. During development, I often improved the game's architecture since I started from scratch and wanted to implement various mechanics. In both cases, the professors awarded extra points for the projects. My friend was busy exploring the game's structure and code while I was working on its implementation. Since we were on the same local network, I used Python’s http.server module so he could access the project from his computer. That sparked an idea: I wanted to write a similar program myself, but to make things more interesting, I decided to use Assembly. Once I finally had some free time, I managed to complete the project. I recently released a YouTube video about it and polished the web server code a bit. Here is the source code.


r/Assembly_language • • Jul 18 '26

Hello world

Post image
925 Upvotes

r/Assembly_language • • Nov 30 '25

My operating system made with assembly

693 Upvotes

I will share the details soon, thats the version 2 of it and new versions are coming soon. Im planning to make kernel 32 bit instead of 16bit. I hope i can succeed.


r/Assembly_language • • Feb 27 '26

How you see C code after learning Assembly:

Post image
682 Upvotes

r/Assembly_language • • Jun 13 '26

Assembly vibe coder 😿

Post image
477 Upvotes
fish: Job 1, './crash' terminated by signal SIGSEGV (Address boundary error)

r/Assembly_language • • Mar 01 '26

Project show-off I decompiled NFS2:SE and NFS3:HP to make them run on Linux

Thumbnail
gallery
409 Upvotes

This is an old project that I just pushed to github (https://github.com/motor-dev/nfs-recompiled)

[EDIT] Not only Linux - grab the windows executables from the release page! https://github.com/motor-dev/nfs-recompiled/releases/tag/v1.0.0

For, well, reasons, I decided to decompile the Need for Speed 2 executable to make it run again and preferably not on Windows. For weirder reasons, I did not use a known decompiler and just rolled my own. After much much hacking and fighting with incorrect instruction implementation, I finally landed a working version.

The decompiler is a manual script made with Capstone to decode instructions, and some Python to try and locate procedure starts and ends more or less successfully. Full of hacks, hints and workarounds. All good enough for the full game to run.

I discovered that the NFS3: HP engine was very similar to NFS2 and I could likely also make it run. It was also a successful project but it turns out that the software renderer for NFS3: HP was a bit too slow to run on a modern machine after decompiling and recompiling. So I decided to implement the Voodoo renderer for that game.

Fun disassembly facts - the compiler used to make this was Watcom C/C++. There was a bug in the implementation - when using string copy, it was doing some pretty standard
rep movsd dword ptr es:[edi], dword ptr [esi]

but due to an error in what would likely be handwritten assembly? the opcode used was not the standard f3 a5 but instead f2 a5 which would be an opcode for repNE movsd dword ptr es:[edi], dword ptr [esi]
except it actually does not exist for x86. It is very likely the processors of that time (and maybe those of today?) interpreted that as rep movsd . Or someone knowledgeable about assembly can tell me what was going on.

In any case, Capstone didn't like that too much and just dropped the rep prefix which was a headache to debug.

Fun fact number 2 - in the software renderer on non MMX CPUs, NFS3: HP uses the FPU to do a screen copy. In a loop, it loads 80 bits of screen data into an FPU register, then dumps the FPU register into the other surface data. That was the first time I heard of a memcpy made with the FPU.

The disassembler will output truckloads of code similar to this

/* align: skip 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 */
void Application::sub_436140(WinApplication* app, x86::CPU& cpu)
{
  NFS2_USE(cpu);
  NFS2_USE(app);
    // 00436140  51                     -push ecx
    *app->getMemory<x86::reg32>(cpu.esp-4) = cpu.ecx;
    cpu.esp -= 4;
    // 00436141  52                     -push edx
    *app->getMemory<x86::reg32>(cpu.esp-4) = cpu.edx;
    cpu.esp -= 4;
    // 00436142  8b0d98c84d00           -mov ecx, dword ptr [0x4dc898]
    cpu.ecx = *app->getMemory<x86::reg32>(x86::reg32(5097624) /* 0x4dc898 */);
    // 00436148  b888934b00             -mov eax, 0x4b9388
    cpu.eax = 4952968 /*0x4b9388*/;
    // 0043614d  31d2                   -xor edx, edx
    cpu.edx ^= x86::reg32(x86::sreg32(cpu.edx));
    // 0043614f  e84c020000             -call 0x4363a0
    cpu.esp -= 4;
    sub_4363a0(app, cpu);
    if (cpu.terminate) return;
    // 00436154  e8574b0400             -call 0x47acb0
    cpu.esp -= 4;
    sub_47acb0(app, cpu);
    if (cpu.terminate) return;
    // 00436159  89c1                   -mov ecx, eax
    cpu.ecx = cpu.eax;
    // 0043615b  85c0                   +test eax, eax
    cpu.clear_co();
    cpu.set_szp(static_cast<x86::reg32>(cpu.eax & cpu.eax));
    // 0043615d  7409                   -je 0x436168
    if (cpu.flags.zf)
    {
        goto L_0x00436168;
    }
...

I have no idea how any of those games actually work - but the x86 implementation is good enough that it just runs.

If someone wants to try out, you will need the game data to actually run the game. It's a bit tricky to set up, I don't think anyone is actually interested in running it but let me know if there's a fan out there really trying to run this and I will try and help. The reason why it needs the installed game is that it is literally the game executable with no modification - so just like the real game, it expects some data to be installed on the disk and some data to be on the CD.

(disclaimer - use of generative AI for the CMakeFiles and the README, but not for the disassembly - win32 API which was actually done a few years ago)


r/Assembly_language • • Oct 05 '26 Bravo

Made an OS from scratch at 13 (NASM, 32-bit, GUI + TCP/IP)

392 Upvotes

the micro version is pretty buggy, I probably wont even release it, but the base version is the one I've been putting real time into. Here's what it has:

  • Bootloader + 32-bit kernel, all hand-written in NASM

  • 640×480 true color GUI (windows, drag, resize, snapping, taskbar, start menu)

  • Apps: Terminal, Files, Notepad, Paint, Calculator, Snake, Settings

  • e1000 NIC driver + ARP + IPv4 + ICMP + TCP + UDP

  • SB16 audio driver that plays .wav files

  • A peer-to-peer naming layer so two TeenyOS machines can resolve names for each other without DNS/ICANN

  • Persistent filesystem, wallpaper, login screen, preferences

I rebuilt the whole thing from scratch after losing 10 months of work. Learned more from that than from any tutorial. and heres a link for a little showcase of the OS :) theres a bug with settings (Makes cursor black, will be fixed soon) i will probably release it early-mid 2027 i forgot to show the ram usage on the OS, but currently it uses 650KB (Base ver, might be wrong when the os gets updated) micro uses half of that. Im gonna try to make it even more lightweight.

After thinking about it, I want to be completely honest about this. I didn't write everything 100% by hand; I used DeepSeek as a coding assistant for specific parts.
yes i DID use ai, but not that much, no i didnt use claude, not gemini, not chatgpt, not any of those, i only used deepseek
i DIDNT make everything with ai, heres what i genuinely made with ai
Debug lines for SB16
The wallpaper
Preferences
Cursor color
login screen
window resize
paint
30% Of the UI
and lastly, the clock.
I Genuinely wish i was smart enough to not actually use ai, but i tried to use it the least i could. I think you know that claude or any of those big AI Companies cant do this for free, which is why i used deepseek.
Im really sorry if you dont like me using AI, but im trying to use it the least i can and is still learning assembly.
Also for the people who have supported me, thank you. I never actually expected it to get that much views, thought it would flop. And if your curious, no, i havent spent a dime on ai, deepseek is the best free option which is why i went with it, i genuinely am sorry if i disappointed you.

And again, thanks to all the people who have supported me.

TeenyOS is scrapped, I am working on a new OS (not from scratch) with another person.

Open-source now!
https://github.com/futred96-cell/TeenyOS


r/Assembly_language • • Feb 23 '26

Help I may have fucked up

Post image
389 Upvotes

so I one day woke up (yesterday night) and decided syntax is annoying, and so I started to learn how to manually assemble ASM code, under regular circumstances I code for bios legacy mode, in real mode I have full control and I decided to try and turn one of my projects to hex without external help but I have been keeping getting the same result of this emoji appearing and I keep trying and I can't find the solution so I thought maybe one of you people and assembly developers know


r/Assembly_language • • Jul 05 '26

Stop using CISC

Post image
233 Upvotes

r/Assembly_language • • 14d ago

All in a sudden, every Indian Bro TechLead turn into hardcore Assembly De 🤡

Post image
213 Upvotes

Far as I know, people barely doing this before AI-Boom. Now, all in a sudden, they come out of no where.. with the process always have flaws in the end 🤷‍♂️

Must be the context length issue 😀

And how did I know it was all genAI ? Human - who are passionate about Assembly & familiar with DOS era will prefer Integer Math to render graphics, even 3D.

Only an Agent with assigned tasks list will take use of Floating Point instruction (like fadd, fsincos, fdiv... ) to shortcut the thing, without hesitation to add FPU as hidden requirement to run the program..

** Update / Notes :

1/ About FPU :
Yes, any X86 processor nowadays will let you do floating point instructions anyway, even more fancy than just MMX, you have AVX2/512 for any heavy-lifting data movement. But that's not my point - which was more about a human thinking process Where every skilled asm programmer showing their work here I know, even just need Integer Math to write their 3D flying simulator in asm/dos.

2/ Personal Opinion :
I didn't mean to push for hate/envy speech but I feel really unusual in the channel content with consistent error pattern/flaws across his videos. So as someone who also wrote asm by hands for years (but not an expert, I admit, just a hobby), I feel really really skeptical.

Whoever put hours into dissembling stuffs & writting compilers may question interesting things like those processe, right ?

I would like to compare this Indian channel with others like inkbox or necro_ware channel - which is way more "human" thinking process to compare here & wonderful content 🤷‍♂️

1-inkbox : https://youtu.be/ZFHnbozz7b4?si=4RxqG9YF5wDTYi3t

2-necro_ware : https://youtu.be/OZ2ZSxNhTYg?si=382deA_5bxI6MMZm


r/Assembly_language • • 5d ago

My first day on assembly

Post image
203 Upvotes

Im raw dogging assembly

No python or some beta shi

Im going to do it like our forefathers

Wish me luck or dont

I will succeed either way.

EDIT: I am suppriesd at the positive support and helpful messages from this community. And now i carey your spirits to succeed i wont let you guys and your expectations down. Most importantly I wont betray myself.


r/Assembly_language • • 16d ago

CLI Mandelbrot renderer written in x86-64 assembly

192 Upvotes

it is written in x86-64 assembly using GNU assembler syntax, with the intel style instruction syntax

it targets linux and calls the MPFR library for the high precision fractal calculations

Github: https://github.com/haaakez/cli-mandelbrot


r/Assembly_language • • Jul 11 '25

6502 is though man. 3 months in the making for just that.

184 Upvotes

I have been working on this small RPG for the NES for a while now. Learned a lot through the months and managed to have something that actually feels like a game. However I'm slowly starting to feel discouraged and I'm looking at those game engines that people use and wonder how much faster it would be to develop a game on those? This is my first game ever.


r/Assembly_language • • Jun 15 '24

Project show-off Me and my friend have created Snake game in assembly for Intel 8051

177 Upvotes

r/Assembly_language • • Jul 10 '26 Bravo

Project show-off I made discord in x86 (a comprehensive HTTP server)

Thumbnail
gallery
164 Upvotes

my HTTP & Web Socket server I wrote a year ago in assembly. it supports routing, static files, authentication, session management, and many more, written entirely in assembly (the backend)

note: this was an educational project, it is not stable and has a ton of bugs. please dont try to ship anything using it >,<

my repo link: https://github.com/NoamRothschild/asm


r/Assembly_language • • Dec 29 '25

Project show-off Little racing game I'm making in Gameboy Assembly. Not perfect, but taking shape.

163 Upvotes

r/Assembly_language • • Feb 24 '26

Not my image but maybe a useful cheatsheet for arm users

Post image
157 Upvotes

r/Assembly_language • • Sep 11 '26

I just understood pointers on a deep level thanks to Assembly

150 Upvotes

it feels like orgasm honestly. the dopamine you get from understanding this shit on a deep level is unmatched.


r/Assembly_language • • Oct 09 '26

Project show-off Reading assembly of a C source code directly inside neovim

149 Upvotes

r/Assembly_language • • Aug 12 '22

Help Not my image but maybe a useful cheatsheet for arm users

Post image
148 Upvotes

r/Assembly_language • • Jan 06 '25

Wrote my first ARM assembly code

Post image
146 Upvotes

I'm really excited to learn and code as many programs as possible using assembly. This was my first program. If you have any suggestions on what should I write next, then please let me know.


r/Assembly_language • • Aug 27 '25

Question How do reverse engineers know what to look for in a binary?

140 Upvotes

Hey folks,

I’ve been trying to wrap my head around how people actually approach reverse engineering a binary. When you open up a program in a disassembler/debugger (like x64dbg), you’re suddenly faced with thousands of assembly instructions.

What I don’t understand is: how do you know what’s important in there?

Do reverse engineers literally go line by line, stepping through every single instruction?

Or do they look for higher-level patterns, like function calls, system calls, strings, imports, jumps, or common code structures?

How do they figure out what to patch or modify without getting lost in the noise?

For example, if the target is malware, what are the “usual suspects” they expect to find, and why do they zero in on those things? I guess I’m asking what the pattern of thinking is that lets someone make sense of disassembly, rather than just being buried in endless lines of instructions.

I’m not a professional, so apologies if my terminology isn’t precise — I’m just really curious about the real-world workflow and thought process behind reverse engineering.


r/Assembly_language • • Mar 05 '26

If your memory was WIPED, how would you re-learn x86 assembly?

136 Upvotes

Your memory (the one in your brain) was wiped and you needed to re-learn x86 assembly to save the world. How would you go about that? Would you look at specific coursees?

I REALLY want to learn x86 assembly its so cool. However, in my university class, we go over topics way too fast and I end up making projects that don't really teach me anything.

If you were to start over, how would you learn x86 assembly? Would you suggest some courses/Youtube videos? Is the process similar to learning something like Python or C++?


r/Assembly_language • • Mar 20 '25

I am so proud of this code

129 Upvotes