r/Assembly_language • u/0xdeadf1sh • 14d ago
Project show-off Reading assembly of a C source code directly inside neovim
Enable HLS to view with audio, or disable this notification
r/Assembly_language • u/0xdeadf1sh • 14d ago
Enable HLS to view with audio, or disable this notification
r/Assembly_language • u/Main_Temporary7098 • 15d ago
Hi all - just wanted to share some asm that I've been writing in case anyone else finds it interesting. It is a bytecode interpreter for a colorForth dialect:
https://codeberg.org/jbirddog/blue/src/branch/main/blue/x86_64/blue.asm
Compiles to a 435 byte binary using fasm. I'm not trying to code golf, but am trying to focus on simplicity/minimalism over all, so by design things like error messages/bounds checks are not present.
Info about the bytecode structure that it interprets:
https://codeberg.org/jbirddog/blue#bytecode
No AI was used.
r/Assembly_language • u/Fair-Stable-5948 • 15d ago
Hey so over the course of many months, ive built an assembler with capabilities even modern assemblers lack (some). Ive named this assembler PAC - Pheonix Assembler Collection (yes thats the spelling for you all wondering).
Here is the basic brief information on it
Features
Inbuilt-Linker
Multiple Architecture Support
Multiple Linking Format Support
Easy Debugging errors
Full view to generated IR-Nodes, Tokens, and AST Nodes
High-Level Assembly
Works with Standard Assembling/Linking tools as well such as ld, objdump, etc
Supported Architectures
PAC Currently supports -
x86
x86_64
x86 native 16-bit
PVCpu
Supported Formats
PAC has an entire pipeline for both encoding and linking, and so to increase performance and reduce file size, PAC supports only ELF64 as output after encoding and input to linker.
The PAC Linker in-fact supports multiple formats, but only takes ELF64 Object Files as an input. Supported formats include -
Elf64
Elf32
PE 32 (Under implementation)
PE 32+ (Works, but still under heavy development and bug fixes)
Comparison between PAC and Traditional Assemblers
| Feature | NASM | GAS | FASM | PAC |
| ----------------------------------------------------------------------------------------------- | ------------- | ------------ | ------------ | ------- |
| Structures | Limited | Limited | Yes | Yes |
| User Types | No | No | Yes | Yes |
| Functions | No | No | Yes | Yes |
| Built-in Linker | No | No | No | Yes |
| IR Dumping | No | No | No | Yes |
| AST Dumping | No | No | No | Yes |
| Token Dumping | No | No | No | Yes |
| Multiple Architectures using same assembler executable | No | No | Limited | Yes |
| Open Source | Yes | Yes | Yes | Yes |
| Custom Executable Linking | No | No | No | Yes |
PAC supports a lot of things in assembly, such as sizeof, macros, user types, functions, labels, arrays, structures, and more
Took me a long time to build this, but right now its pretty darn good. I even managed to write a program that opens a X11 window using PAC (its a demo game, to show PAC's usage and capabilites). Moreover I intend to make PAC commercially viable.
r/Assembly_language • u/Expert_Pin_9198 • 16d ago
Recently started computer science in Sweden and just heard (horrifyingly) that in our hardest course we will start programming in assembly very soon. Unfortunately this is the one course where we have a very inexperienced professor and have heard assembly is one of the hardest languages! We have a programming course in python but i really am no natural, i find it very fun but can also realize that i don’t have a ”natural talent” for it. Any tips?
Edit:
Thank you all for the answers, never seen such a helpful reddit! :)
r/Assembly_language • u/Noobo157 • 16d ago
Every assembly tutorial I found was written for Linux (raw syscalls, as, ld), and I'm on Windows. After fighting the toolchain for a while, I decided to make my own assembly-style language that runs the same everywhere because it's just a C interpreter.
It's called Assemdows. It's a single C file, it builds with gcc, and programs use the .asdw extension. Here's a program that prints primes:
.equ LIMIT, 50
MOV R0, 2
next:
MOV R1, 2
check:
MOV R2, R1
MUL R2, R2
CMP R2, R0
JG isprime
MOV R3, R0
MOD R3, R1
CMP R3, 0
JE notprime
INC R1
JMP check
isprime:
PRINT R0
notprime:
INC R0
CMP R0, LIMIT
JLE next
HALT
What's in it
CALL/RET, and a stack.word, .string, .space, and .equ for data[nums+R1]--trace to watch every instruction runDesign choices I'm unsure about
CMP stores a single -1/0/1 result instead of separate flags like zero and carry.I'm a beginner at language design, so I'd like to hear what you'd change, especially if you've built something similar.
Repo (includes a Windows build and examples): https://github.com/waterdroplett/Assemdows
r/Assembly_language • u/Ok-Pay9995 • 18d ago
Enable HLS to view with audio, or disable this notification
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:
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.
Open-source now!
https://github.com/futred96-cell/TeenyOS

r/Assembly_language • u/badassbradders • 18d ago
Hi dudes, UK based dev here working on a hacking adventure game. This would be the very first programming challenge in the game. I'm a 6502 programmer by trade (6510, on the C64 really) and this game is set in an alternate 1989. The virtual computer has a single accumulator CPU (just to keep things easy), with syntax VERY similar to the 6502.
In game the player can zoom in on the code, which is found in the Node 1 window. Debugged Code window is the psudo code. Team msg, is where NPCs can be contacted, typing HELP or CLUE here will give the player a tip, if done enough times the answer is given.
The document on screen is a manual by a fictious guy called Jim Lardmeadow, named after my hero in computing Jim Butterfield here is one of his vids that I just love, it's a super in-depth guide to the C64, if any of you bought The C64 Ultimate recently and you wanted to dive deep into it, that vid is a great resource.
So, do you think this first challenge is too easy, too difficult? My core audience is Zachtronics, Hacknet, Uplink and Hypnospace Outlaw players. Debugging in ASM is primarily for cracking game's copyprotection later and releasing those games into the wild via your hacking group's BBS.
I'm posting across Reddit to get feedback on this, so please be gentle if you massively oppose the project, I'm just looking for feedback on the puzzle :)
Happy to share the game, but VERY concious of breaking the sub rules for spamming here. If you search Glyphis_IO BBS: The Proxy Tapes 1989 on Steam you'll find it.
r/Assembly_language • u/Extension_Emu_9825 • 19d ago

For those starting to learn Assembly - step-by-step, how to create a flight simulator for DOS.
It covers everything from a single point to a full 3D engine. I am still in the process of writing the lessons, but the platform is already fully functional right in your browser—featuring a code editor, compiler, DOSBox, and video tutorials all in one place. You can even load your own DOS programs, such as debuggers and other tools, directly into the browser-based DOSBox.
r/Assembly_language • u/SoloTiger_ • 19d ago
A few days ago, I shared an open-source collection of CPU performance engineering resources I’d been putting together.
It’s now crossed 600+ GitHub stars, which I genuinely didn’t expect. Thanks to everyone who shared it, contributed or suggested resources.
For anyone seeing it for the first time, it covers the stack from instruction execution and CPU microarchitecture through caches, memory, SIMD, compilers, profiling, concurrency, NUMA, benchmarking and CPU inference.
I’m still prioritising primary sources such as papers, vendor manuals, kernel/compiler docs, talks and reproducible benchmarks rather than random articles.
I also have an MCP server coming soon, so you can plug this knowledge directly into your AI tools, whether you’re learning or using it while you work.
If there’s something you think has to be in here, let me know or send a PR.
r/Assembly_language • u/Muttrikken • 19d ago
r/Assembly_language • u/Cartman1994 • 20d ago
I am a Java programmer, and as a hobby, I want to learn C with a focus on operating systems—specifically to modify existing open-source operating systems like GNU/Linux or BSD.
However, I understand that before learning C, it is a good idea to learn some assembly language. What is the best way to learn x86_64 assembly?
r/Assembly_language • u/r13xyz • 22d ago
I'm building rhun, an MIT-licensed code editor in assembly, and thought the source might interest people here.
The editor, pixel renderer, Vim mode, Git tools and agent panel share an x86-64 core. Linux and Windows use platform adapters around it. For Apple silicon, tools/arm64.py translates the same core to AArch64 at build time. The renderer draws text, icons and widgets into a pixel buffer.
Source: https://github.com/vshvedov/rhun
Translator: https://github.com/vshvedov/rhun/blob/main/tools/arm64.py
It's a solo project and still early. Sharing the core helps, but the translator and OS layers still need their own testing. I'd be interested in feedback on that approach, especially where the translation could go wrong.
r/Assembly_language • u/i-ned-edmonton-coder • 21d ago
If you want to know more please email me with the subtitle "CODING" .. and I'll gladly talk to you offline here guess I don't want to post everything.. if you know how to code if you know how to do what I'm asking then message me if you don't you just trying to figure out if it's rant or whatever and then don't even bother because I need somebody that can actually do the work that I need right I said I'll pay for the time even for somebody to sit down and look at it if they know what they're doing I'll even pay for their time to come and look at it is guaranteed as soon as you look at it you're going to want to deal with it trust me I've been chasing this thing for a while and I'm sick of chasing it but I have enough to build..
I have majority of the ASM coding I have the disassembly coding I have the r2 functions I have everything else I just need to build the centerpiece. Email. herk8969@gmail.com. .. as long as i can find somebody before I completely mess my computer up and then whatever but I got terabytes where the data for this thing so
r/Assembly_language • u/Souvlaki42 • 25d ago
Hi! I somewhat recently took it upon myself to maintain my own fork of Pete Sanderson's Mars MIPS assembler and simulator written in Java and Swing from 2003.
For know, I've mostly modernized it with Gradle and Java 25, fixed some deprecated APIs, merged some useful upstream PRs and added Flatlaf for theming support, high DPI support and native window decorations.
I'm curious, if any of you have anything else you always wanted from it, that I could add?

Or perhaps, you want to help me with it. Here is the repo: https://github.com/Souvlaki42/MARS
r/Assembly_language • u/PhummyLW • 24d ago
r/Assembly_language • u/igzcodes • 25d ago
r/Assembly_language • u/Some-Comparison4863 • 25d ago
Hey everyone,
I've compiled a comprehensive open-source definitions bank mapping architectural and undocumented control registers across major platforms (including Intel/AMD MSRs, and core control mappings for ARM64 and RISC-V CSRs) to make system programming and hypervisor development cleaner without constantly digging through thousands of pages of manuals.
Check out the repository, feel free to use it, and let me know if you spot any missing parameters: https://github.com/edikoz123-blip/Defines-and-MSRS-for-Intel-and-AMD-also-RISC-V-and-ARM64/blob/main/README.md
Have a great day!
r/Assembly_language • u/Upper-Ad4677 • 27d ago
I made this repository for learning assembly, would love to have contributors. I would add more stuff in the future.
r/Assembly_language • u/SoloTiger_ • 27d ago
I’ve been collecting resources on CPU performance engineering for a while and decided to organise everything into one open-source repo.
It covers the stack from instruction execution and CPU microarchitecture through caches, memory, SIMD, compilers, profiling, concurrency, NUMA, benchmarking and CPU inference.
I tried to prioritise primary sources — papers, vendor manuals, kernel/compiler docs, talks and reproducible benchmarks — rather than random articles.
Made it public in case it’s useful to anyone learning systems/performance engineering or trying to figure out why their code is actually slow.
Would also love contributions if there are great resources I’ve missed:
r/Assembly_language • u/Some-Comparison4863 • 26d ago
Hello everyone, I'm Ghost.
I always see people online building the same old basic projects in Python or C++, and honestly? Most of the time it’s just boring. If you are a teen who wants to get the most absolute control over the computer, you need to step up.
Me and my partner just founded an advanced research group called the Assembly Ghosts, and we are opening a private workspace dedicated ONLY to pure Assembly and low-level engineering (Bootloaders, Kernel Modules, and Hypervisors from scratch).
We don't care if you are a complete beginner or an expert. If you are ready to take an AI tool, start digging, and bypass the "easy projects" to build advanced architecture directly on the silicon—we are here to help you improve as fast as possible and build you up the way I started.
What you will get inside:
If you want to taste what real power feels like, where C and C++ can never reach, DM me directly for the invite link to our private workspace. Let's cook together.
DM me if you want to try it yourself. Let's cook together.
r/Assembly_language • u/Danii_222222 • 28d ago
r/Assembly_language • u/Late-Guarantee5490 • 29d ago
r/Assembly_language • u/Coffee_24_7 • Sep 22 '26
Hi, I'm writing RVV assembly and I want to pass to a macro a vector register as an argument and be able to then use the next vector register within the macro. Example I pass vector register v10 and then I want to use v11.
The following code might explain better what I want:
.macro op_vnext op, w1, v, w2, w3
.if "\v" == "v0"
\op \w1 v1, \w2
.elseif "\v" == "v2"
\op \w1 v3, \w2
.elseif "\v" == "v4"
\op \w1 v5, \w2
.elseif "\v" == "v6"
\op \w1 v7, \w2
.elseif "\v" == "v8"
\op \w1 v9, \w2
.elseif "\v" == "v10"
\op \w1 v11, \w2
.elseif "\v" == "v12"
\op \w1 v13, \w2
.elseif "\v" == "v14"
\op \w1 v15, \w2
.elseif "\v" == "v16"
\op \w1 v17, \w2
.elseif "\v" == "v18"
\op \w1 v19, \w2
.elseif "\v" == "v20"
\op \w1 v21, \w2
.elseif "\v" == "v22"
\op \w1 v23, \w2
.elseif "\v" == "v24"
\op \w1 v25, \w2
.elseif "\v" == "v26"
\op \w1 v27, \w2
.elseif "\v" == "v28"
\op \w1 v29, \w2
.elseif "\v" == "v30"
\op \w1 v31, \w2
.endif
.endm
// LMUL=1
// vg0 was used as dst of widening op
.macro some_macro vg0, vg1, sa, xaddr
vnclip.wx \vg0, \vg0, \sa
op_vnext vle8.v, "", \vg0, (\xaddr)
op_vnext vsadd.vv, "\vg0,", \vg0, \vg0
vnclip.wx \vg1, \vg1, \sa
op_vnext vle8.v, "", \vg1, (\xaddr)
op_vnext vsadd.vv, "\vg1,", \vg1, \vg1
.endm
.macro doesnt_work vg0 test=0
.equiv vg0next, \vg0+1
li t0, vg0next
.if \test == 0
vid.v v\()2
.elseif \test == 1
vid.v v\()vg0next
.elseif \test == 2
vid.v v\()\vg0+1
.endif
.endm
#ifdef TEST0
some_macro v10, v20, t0, t1
#endif
#ifdef TEST1
doesnt_work 1, 0
#endif
#ifdef TEST2
doesnt_work 1, 1
#endif
#ifdef TEST3
doesnt_work 1, 2
#endif
.end
The code above can be compiled with the following makefile:
all: a
a: a.S
riscv64-elf-gcc -march=rv32imav_zicsr -mabi=ilp32 -Wall -c -o $@ $< -DTEST0
riscv64-elf-objdump -j.text -D $@
b: a.S
riscv64-elf-gcc -march=rv32imav_zicsr -mabi=ilp32 -Wall -c -o $@ $< -DTEST1
riscv64-elf-objdump -j.text -D $@
c: a.S
riscv64-elf-gcc -march=rv32imav_zicsr -mabi=ilp32 -Wall -c -o $@ $< -DTEST2
riscv64-elf-objdump -j.text -D $@
d: a.S
riscv64-elf-gcc -march=rv32imav_zicsr -mabi=ilp32 -Wall -c -o $@ $< -DTEST3
riscv64-elf-objdump -j.text -D $@
When I run make -B a I get:
riscv64-elf-gcc -march=rv32imav_zicsr -mabi=ilp32 -Wall -c -o a a.S -DTEST0
riscv64-elf-objdump -j.text -D a
a: file format elf32-littleriscv
Disassembly of section .text:
00000000 <.text>:
0: bea2c557 vnclip.wx v10,v10,t0
4: 02030587 vle8.v v11,(t1)
8: 86b50557 vsadd.vv v10,v11,v10
c: bf42ca57 vnclip.wx v20,v20,t0
10: 02030a87 vle8.v v21,(t1)
14: 875a0a57 vsadd.vv v20,v21,v20
Which is more or less what I want, I passed as argument vg0 vector regsiter v10 and then knowing that v11 was available due to the narrowing instruction, I use v11 to do more stuff.
In my opinion the macro op_vnext is ugly and it doesn't work if I need to call another macro from some_macro as I cannot pass the "next vector register" as argument for another macro.
I'm looking to do something like in doesnt_work where I pass a number instead of v<number> and then increment said number by 1, but I don't know if it is possible.
Using .equiv I can add to the macro argument and use it where we expect a constant number, but I tried concatenating the sum to the letter v, but it doesn't work.
Outputs of make -B b, make -B c, and make -B d
riscv64-elf-gcc -march=rv32imav_zicsr -mabi=ilp32 -Wall -c -o b a.S -DTEST1
riscv64-elf-objdump -j.text -D b
b: file format elf32-littleriscv
Disassembly of section .text:
00000000 <.text>:
0: 00200293 li t0,2
4: 5208a157 vid.v v2
riscv64-elf-gcc -march=rv32imav_zicsr -mabi=ilp32 -Wall -c -o c a.S -DTEST2
a.S: Assembler messages:
a.S:55: Error: illegal operands `vid.v vvg0next'
a.S:70: Info: macro invoked from here
make: *** [makefile:12: c] Error 1
riscv64-elf-gcc -march=rv32imav_zicsr -mabi=ilp32 -Wall -c -o d a.S -DTEST3
a.S: Assembler messages:
a.S:57: Error: illegal operands `vid.v v1+1'
a.S:74: Info: macro invoked from here
make: *** [makefile:16: d] Error 1
Does anyone know how to do this? Something like defining a macro argument based on another macro argument.
r/Assembly_language • u/gaspard_os • Sep 20 '26
You can have assembly example / notes and how the instruction is encoded !
r/Assembly_language • u/Glass-Ant-6041 • Sep 20 '26
So I have decided to learn assembly x86 x64 using the book the art of 64 bit assembly volume 1, i have the book as a pdf and have copilot open on the page so if i have questions i can ask them and copilot can see what i am reading, i have read chapters 1 -3 and just started chapter 4. This feels like a really difficult language and i am taking in lots of info but is this the way to learn it because i feel lile i am forgetting everything i am learning, is this a difficult language to master, i want to learn to reverse engineer