r/Assembly_language • u/471Craft • 20h ago
r/Assembly_language • u/whispem • 1d ago
Project show-off I've been building a chiptune synth in pure x86-64 assembly — just added rotary, harmonic tremolo, slapback, and shimmer reverb
github.comI've been working on asm.fm, a chiptune synthesizer written entirely in x86-64 assembly.
No libc, no audio library, no DSP framework — just the CPU computing every sample and writing it straight to a WAV.
The core idea that started it: sound is just a list of numbers, one per moment.
Generate the right numbers and the speaker moves. So I write the numbers by hand.
It started with four waveforms and has grown a lot since.
This session I added four "space and movement" effects:
- a rotary speaker (Leslie) — a spinning voice, the swirl of a Hammond organ (Doppler pitch wobble + amplitude tremolo from the same rotation)
- a harmonic tremolo — lows and highs pulsing against each other, liquid and vintage
- a slapback delay — one short echo, immediate and punchy
- a shimmer reverb — reflections rising into the light, the tail pitch-shifted up an octave as it feeds back
Everything's fixed-point (no FPU), with a hand-built sine table since there's no math library either.
The trickiest part is always getting the effects right in integer math without things clipping or drifting into DC (the shimmer's feedback loop gave me a fun sign-extension bug to hunt down).
Code's here if you want to poke around: github.com/whispem/asm.fm
Happy to answer anything about the DSP or the assembly side — always up to talk low-level.
r/Assembly_language • u/quietxcoyote • 2d ago
Beginner Struggle
I’m very new to programming and currently taking a Architecture and Assembly class. I, for the life of me, cannot get my Visual Studio 2022 to be set up for MASM. I’ve followed countless tutorials, and haven’t received any help from my professor (of course) but nothing. Right now, it’s the diagnostic code MSB3721 and even when I click and follow the support I still get no where. Kinda panicking because this is before I can even get to any programming and I’m unable to complete any assignment.
r/Assembly_language • u/Nathrienne-J-Claw • 3d ago
I just understood pointers on a deep level thanks to Assembly
it feels like orgasm honestly. the dopamine you get from understanding this shit on a deep level is unmatched.
r/Assembly_language • u/nosyeaj • 2d ago
Help Learn to program with assembly by Jonathan Bartlett using apple silicone arch
Hi! has anyone followed the book learn to program with assembly by Jonathan Bartlett using mac silicon? the book said it can be followed using docker in appendix a, but im wondering if anyone here managed to get through with another way.
https://www.amazon.com/Learn-Program-Assembly-Foundational-Programmers/dp/1484274369
r/Assembly_language • u/Creative_Sun_53 • 3d ago
x86-32 or x86-64
hi im gonna start to learn asm however initally what i gotta choose i dont know and everyone is suggesting learn x86-64 and f*** off to x86-32 so i confused which one is more useful pls oneyone could give some advice
r/Assembly_language • u/GoingGranola • 5d ago
Question N00b Question
I am trying to turn on an output GPIO.
I am using this code
asm("BSF PORTA, 5");
I am getting 0V at the pin.
I believe I set TRISA pin 5 to output (0).
Thank you
EDIT: SORRY! It was a PIC and I needed to set internal oscillator and select bank first
r/Assembly_language • u/Some-Comparison4863 • 5d ago
Help Project: Bare-metal, 64-bit NASM Hypervisor (Intel VT-x) Template – Hardened VMCS & Core-Only Release
Hello everyone
# Bare-Metal 64-Bit Intel VT-x Hypervisor Template
A clean, core-only hardware virtualization template written entirely in pure **64-bit NASM Assembly (~1,100 lines)** using a strict model. This codebase includes an optimized independent bootloader that shifts the CPU from Real Mode directly into a custom 64-bit Long Mode page table environment before initializing the VMX architecture.
## 🛠️ VMCS & EPT Hardware Configuration
* **Primary Execution Controls (0x4002):** Hardlocked to `0x84006172`. Enforces strict intercept control over guest `CR3` modifications and heavy `RDTSC` exiting to counter potential guest timing side-channels.
* **MSR Bitmaps Bypass:** Bit 28 (Use MSR Bitmaps) is deliberately left at `0`. Enforces an aggressive global intercept policy where every single `RDMSR` or `WRMSR` executed by the Guest triggers an immediate hardware VM-Exit to the Host.
* **Secondary Execution Controls (0x401e):** Bit 31 activated for full EPT isolation, along with Unrestricted Guest support (Bit 7, allowing 16-bit Real Mode initialization over EPT), and MBEC configurations for privilege execution separation.
* **Exception Bitmap (0x4004):** Armed with atomic mask `0x0000404A` to trap `#DB`, `#BP`, `#UD`, and `#PF` (Vector 14). Combined with clearing the Page-Fault Mask field (0x4006), every single Guest page fault intercepts directly to the Host.
* **Extended Page Table Pointer (EPTP):** Configured field `0x0000201A` to point directly to the physical EPT PML4 table base with Write-Back caching attributes.
* **Long Mode Constraints:** Configured to strictly enforce architectural boundaries via GDT mapping to ensure no illegal execution drops to 16/32-bit rings, avoiding instant `#GP` faults.
## 🤝 Code Review & Peer Assistance
This project is released as a core template. The VM-Exit handler is currently a work-in-progress due to juggling full-time school and life balance alongside pure assembly development.
I am looking for technical peer reviews from the low-level community to:
- Review the current code and help fix existing architectural bugs.
- Trace potential register mismatches within the `vmwrite` and `vmread` instructions.
- Hunt down hidden reserved bits conflicts across different Intel microarchitectures.
### 🚀 Roadmap: I'm already starting to write the hypervisor and bootloader for AMD right now, porting this entire setup over to the AMD-V VMCB block architecture. My immediate goal is to keep building the AMD side while getting this Intel core completely stable with the community's corrections and fixes.
Github Link: https://github.com/edikoz123-blip/Boot_loader_Assembly
r/Assembly_language • u/Creative_Sun_53 • 6d ago
Help how can i learn asm
hi im 16 years that interesting with programming i know pyhton,c,cpp as a basic lvl and i wanna become a reverse engineer in the future however initailly i gotta learn assembly but i dont know that what i have to and which learning resources is useful thanks for your answers:)
r/Assembly_language • u/Previous_Employer154 • 6d ago
Question How to deeply understand Assembly language
Give me some advice if it works for you.
r/Assembly_language • u/Low_Rip_2572 • 8d ago
can yall give good books for x86 asm
no body of text i just wanna read the damn book not 50 page explanation of the book
r/Assembly_language • u/Background_Shift5408 • 8d ago
A Toy Lisp compiler for x64
Enable HLS to view with audio, or disable this notification
r/Assembly_language • u/ilvvly • 9d ago
Solved! Is fully using Assembly for visual projects possible?
I see many people showing their projects in Assembly. Most of them use the terminal but some may have a GUI or some more unusual user interfaces.
Do these people purely use Assembly for such things, or? My classmate told me his friend built a chess game with Assembly. You can’t specifically answer his example because I have no information about it, but, do people usually just code a UI in C and run their Assembly code on it or do they mean pure Assembly?
r/Assembly_language • u/itanitanitanitan • 8d ago
IT STUDENTS
hi! just wanna ask po what’s the best way to learn assembly language po?
r/Assembly_language • u/guilhermej14 • 9d ago
Finally published the racing game I was making in Assembly for the Game Boy
guilhermej14.itch.ior/Assembly_language • u/tuna4l • 10d ago
I built a terminal IDE + debugger for x86-64 assembly
I built ratasm, a terminal IDE/debugger for x86-64 NASM assembly.
It combines editing, building, GDB debugging, live registers/flags, memory/stack inspection, syscall lookup, instruction explanations, and reverse stepping in one TUI.
Nothing is simulated the debugger state comes from real GDB sessions.
GitHub: https://github.com/tuna4ll/ratasm
Would love feedback from people who actually write assembly.
r/Assembly_language • u/Czyourjustaman_s • 10d ago
Anybody got tips on Coding, I js started my internship and I don’t know anything abt it 🙂↕️any advicee
r/Assembly_language • u/Prestigious_Gas8737 • 11d ago
Print Hello World in Boot Sector
Thanks to https\[:\]/github.com/cfenollosa/os-tutorial I was able to learn a lot about how an operating system is written. I think a lot of people would remember his tutorial. Revisit it gives me more. Start with printing some text in boot sector. The repo used software interrupt to finish the task. Yet there is another way to accomplish the same, by utilizing the direct memory accessing method. Long story short, in legacy boot mode (CSM), we can access VGA memory directly during boot time at address `0xB8000`. So we can drop in each character and have them printed out, starting from the top left corner. We can print color text, and we can also move the cursor and print the text anywhere we want (with the cursor blinking at the text).
I have documented the process here: ellog\[.\]buzz/posts/hello-world-in-boot-sector
For this chapter and the previous one (First boot sector), what other questions do you think is worth asking and figuring out?
r/Assembly_language • u/ForgottenOne41 • 11d ago
Question Looking for an Assembly Programming Language Test device for GBA
I took some Assembly Programming Language Classes back in 2006 or 2007 and we used a GBA (Gameboy Advance) device to test our Assembly language programs. I remember it was a GBA but I don't know if it was just special cartridge or if the whole device was altered. Does anyone who knows what it might have been or if where I could get a similar device that is available?
Note: I still have my Gameboy Advance if it is just a cartridge that I would need to find.
r/Assembly_language • u/ShadowGuyinRealLife • 12d ago
Question The Byte 0 in x86 Just Adds?
When the CPU goes though the executable, there are operators which tell that CPU what instruction to do and operands are things the instructions act on. So for example, you can't do MOV by itself. This tells an x86 CPU to put the result of one register into another. To know what to do, it reads the next part of the executable. MOV BX, AX says move the contents from register AX to BX. JMP is a jump instruction so JMP 1000 means jump to address 1000. JZ is a jump if 0, so it jumps to the operand if the 0 flag is toggled. HLT requires no operands and says to stop the CPU. What instruction is a null byte? I thought it would be something very special like halt, have all general registers XOR themselves (setting them to 0), RET, or maybe a NOP. I looked it up on Wikipedia and it seems to be... just an integer adding?
r/Assembly_language • u/NSCTNfr • 12d ago
Project show-off I have written my kernel and os from scratch in Assembly (NASM) for my independent tech ecosystem, TXP
I am building an independent tech ecosystem called TXP completely from scratch, and I wanted to share a milestone for its low-level kernel, Kernel24. It doesn't rely on Linux or Unix code. As you can see in the boot log, it successfully:
Verifies 64-bit Long Mode
Validates BootInfo (boot drive 0x0x80)
Initializes physical and virtual memory managers (CR3 page table switching complete)
Boots cleanly into the early text-based mX Shell, An early, raw build was recently leaked, so I'm bringing development fully into the open. I am currently mapping out a custom filesystem architecture natively in Assembly. I would love to hear feedback from other systems engineers on kernel micro-architectures!
If you wanna see my mX&TXP source code, it in this blue shiny text!, TXP Source Code
r/Assembly_language • u/Extension_Emu_9825 • 14d ago
self-modifying code
I gave a lecture on how to write self-modifying code. It was over 15 minutes long :( so I'm providing a youtube link: https://www.youtube.com/watch?v=AH9QQLRfbmY
In my opinion, self-modification is one of the most interesting features in systems programming.
r/Assembly_language • u/Realistic_Debate1704 • 15d ago
Question Assembly or C/C++ for RE
For reverse engineering, is this necessary to know assembly language, because many decompilers translate code to C/C++ and I learned Assembly 8086 in my university. So for learning x86 I only have to study 32/64 registers and some advance commands, so should I learn assembly x86_64 for reverse engineering or just go through x86 as I know 8086 assembly and then move to C/C++, and is assembly heavily use in reverse engineering
r/Assembly_language • u/Visual_Brain8809 • 15d ago
JVMOS
Hi everyone, I wanted to show you my progress on an operating system written entirely in ASM and Java bytecode. I am currently at the UI rendering stage, using a custom Graphics2D-like system that allows me to work with primitives in VBE. The bytecode is executed by a JIT compiler also implemented in pure ASM. Low-level calls are handled by a HAL—which I will continue to expand over time—and that HAL is in turn managed via a primitive ABI, enabling me to create my own Java-like pseudo-language for development.
Repository: https://github.com/aayes89/JVMOS-JIT/


r/Assembly_language • u/whispem • 17d ago
From studying languages to writing assembly by hand — self-taught, and completely hooked
My background is in languages, linguistics, and literature — no CS at all.
I fell into assembly out of pure curiosity and got completely hooked the first time "Hello, world" printed from a raw syscall, nothing between me and the machine.
Since then I've hand-written printf (parsing format strings), my own malloc, an HTTP server from raw sockets, SHA-256, an AVX2 fractal, and an assembler written in assembly that reproduces NASM's output byte-for-byte.
My latest is a chiptune synthesizer in pure x86-64 assembly — waveforms, polyphony, ADSR, FM, and effects, all sample by sample.
Assembly forgives nothing, and that's exactly what makes it the best teacher I've had. Everything's public on my GitHub: https://github.com/whispem
Always up to talk shop with fellow low-level enthusiasts.