r/Assembly_language 14h ago

Best place to learn assembly?

10 Upvotes

I want to learn Assembly for modifying and playing with direct hardware like with the Raspberry Pi Pico or ESP32. I already have some experience in programming like with Java, Python, HTML, and C#.

Anyone got any recommendations on where to go to learn Assembly language? Any extra knowledge beyond Assembly to modify hardware?

Thanks for reading!

edit: i kind of want to learn how to mod consoles and stuff and that is why i want to learn assembly to try and develop my own modifications for consoles like the n64 or gamecube.


r/Assembly_language 23h ago

Project show-off AmmAsm now supports SSE, CMOVcc, and SETcc

Post image
13 Upvotes

This post is second part of: https://www.reddit.com/r/Assembly_language/s/BtzYTyQAyi

I recently finished full implementing CMOVcc, SETcc, and the first group of SSE instructions in my handwritten x86-64 assembler written in C.

Seeing objdump correctly decode the generated object file is always satisfying.

I'm still implementing more of the x86-64 ISA, so if there are instruction groups you'd like to see next, I'd be happy to hear suggestions.

Github: https://github.com/LinuxCoder13/AmmAsm


r/Assembly_language 1d ago

Question what does the rva instruction do?

3 Upvotes

I do not have much assembly programming experience. I've done some light programming with it, but recently I've been using the tool "IDA" to try and reverse engineer some stuff for fun. I've got some DLL's open that are related to the windows operating system, and there are a few lines at the top of the .rdata section that look like

dd rva asc_180001368 ; AddressOfRawData

and

dd rva unk_1800013B4 ; AddressOfRawData

or

dd rva off_180001088 ; AddressOfFunctions

I understand that dd is declaring 4 bytes of contiguous data, and the labels after rva seem to refer to a 32 bit address later in the DLL where some amount of data is stored. I did some googling and this is the first assembly related thing I can't find any information on. Is rva an IDA specific thing or is it an assembly instruction?


r/Assembly_language 1d ago

Solved! why i cant edit some parts of the code (the bottom part)

Post image
4 Upvotes

r/Assembly_language 1d ago

Where to learn the syntax?

5 Upvotes

I've never properly learned the syntax of assembly, but I really want to learn it. I know C and Java, but I really want to know more about how the CPU actually operates. So it would be nice if you all would recommend a place for me to learn Assembly. ARM64 specifically, because that is the architecture my computer's CPU uses. Thank you in advance


r/Assembly_language 2d ago

To Learn Assembly

43 Upvotes

Here is a suggestion for those wanting to learn assembly language.

  1. Pick a processor (probably a simple 8 bit one like 6502 or Z80) that has some existing software.

  2. Using your favorite programming language, write a simulator for that processor and get it to the point where the existing software run. For example, write a Z80 simulator and get CP/M to boot.

  3. Note that some of these processors have undocumented instructions. Lists of these are floating around on the web. Try implementing some of these as well and evaluate how they relate to the documented instructions.

This will force you to consider all the little quirks like seldom used addressing modes and other odd combinations.


r/Assembly_language 2d ago

Help How to learn ASM?

27 Upvotes

I have never learned Assembly in my life. I actually am doing low level programming like C and Rust, but I am looking forward to learn Assembly, of course not using Assembly for everything, but I want understanding and learn to use it. So where do I get started?


r/Assembly_language 2d ago

6502 assembler/debugger for Inspiration Forth

Thumbnail gallery
9 Upvotes

FYI, I made this 6502 assembler, disassembler, and emulator/debugger in Forth for my Inspiration project.


r/Assembly_language 2d ago

Solved! App won't store user input when write is called.

3 Upvotes

I am a beginner trying to write a simple app that asks the user a question and the outcome changes based on the user input. I use an Apple M1 CPU, but I can't get it to work and I don't understand what I am doing wrong. This is my code:
`
.global _main
.align 4

_main:
stitle:
; set output settings
mov x0, #1
adr x1, title
mov x2, #5
; call system to output
mov x16, #4
svc #0x80
; set output settings to choices
mov x0, #1
adr x1, choices
mov x2, #19
; call system to output
mov x16, #4
svc #0x80
; set user input settings
mov x0, #1
adr x1, input
mov x2, #1
; accept user input
mov x16, #3
svc #0x80
; check value
adr x9, input
cmp x9, #2
b.eq stitle ; placeholder
end:
; terminate app
mov x0, #0
mov x16, #1
svc #0xFFFF

input: .byte 2
title: .ascii "Test\n"
choices: .ascii "1 - start\n2 - quit\n"
`
When I check the value of input, it shows nothing, even if I entered a value.


r/Assembly_language 2d ago

I created os

0 Upvotes

Наконец-то выложил в открытый доступ свой проект — lOS.

Это моя собственная операционная система для офисных компьютеров. Писал на ассемблере, разбирался с UEFI, FAT32, сетевыми протоколами и графикой. Было сложно, но чертовски интересно.

Что умеет:

• загружаться с USB-флешки

• работать с файлами

• выходить в интернет

• показывать графический интерфейс

• подключаться к GitHub

Исходники открыты — https://github.com/bro732965-oss/lOS

Буду рад фидбеку, особенно от тех, кто тоже пишет низкоуровневые штуки. Контрибьютеры приветствуются!


r/Assembly_language 4d ago

Hello world

Post image
858 Upvotes

r/Assembly_language 4d ago

You are about to see the most beautiful Assembly code ever written

34 Upvotes

Please evaluate the elegance of the code. Assembly.
https://github.com/AlexanderLLLL/ELAM/blob/main/ELAM/ElamBoot.asm


r/Assembly_language 4d ago

Project show-off Assembler x86-64 from scratch

19 Upvotes

About a year ago I started writing AmmAsm, a handwritten x86-64 assembler in C to better understand x86-64 instruction encoding, ELF, and linking.

It currently supports generating Linux x86-64 executables, PIE binaries, and ELF relocatable object files that can be linked with ld or gcc.

I implemented everything from the lexer and parser to the instruction encoder, ELF writer, relocation handling, symbol resolution, and, in the latest release (v2.2.0), a macro preprocessor.

I'd love to hear feedback from people interested in assemblers, instruction encoding, or x86-64 in general.

Thanks!

Repository: https://github.com/LinuxCoder13/AmmAsm


r/Assembly_language 4d ago

Any Honeywell GMAP programmers here?

4 Upvotes

Hello, I've been an assembly language programmer since the late 70s. Are there any former Honeywell GCOS-8 or Level 66 GMAP coders lurking about.


r/Assembly_language 5d ago

Looks legit. Nothing sus about basically editing comments for 30 years and then adding 6x the amount of new assembler code in 2026. 🤔🤔🤔🤔🤔

Post image
9 Upvotes

Blumf is adding backdoors to inject AI into my ASS...

Admit it!!!

AI says 2.15 is a safe old version that will work on modern Loonix

Or should I install DOS to run the 0.97... version from 1997?

EDIT:

Lol current version is 3x the size of the one from a few years ago. Sounds totally legit


r/Assembly_language 6d ago

Help NASM matrix-free qudit simulator: scaling from d=3,n=2 to d=10,n=5 on a Pentium 4 - cache tiling, SOA vs AOS, and DIV optimization

7 Upvotes

Yeah, you probably said "wtf!?" when you saw this, but—well—I’m unfortunately obsessed with backward compatibility and performance.
I wrote a matrix-free qudit simulator in NASM (32-bit, Windows) with a button-panel GUI. Currently it supports d=3, n=2. The state vector is stored as an AOS (array of structures) with 2 doubles (real, imag) per basis state. Gate application loops over all d^n states, extracts qudit values via repeated DIV/MOD, and multiplies by a small d×d gate matrix.

I want to scale it up to d=10, n=5 (100,000 states). I'm targeting a Pentium 4 (NetBurst, 8KB L1 data cache, SSE2 only) as the worst case, as well as an i3-2310M.

Questions:

  1. Will switching from AOS to SOA (separate arrays for real and imag) actually help on a Pentium 4, given the long NetBurst FPU pipeline and tiny 8KB L1 cache?
  2. What's the best cache-tiling strategy when the access stride depends on the qudit index q? For q=0, stride=1 (sequential), but for q=4, stride=10000 (huge). Is it worth tiling only for low q, or should I just PREFETCHT0?
  3. The repeated DIV for mixed-radix decomposition is killing performance. Should I precompute a 500KB lookup table (qudit values per index) to avoid DIV entirely? Does this tradeoff make sense on a Pentium 4 with its slow memory bus?
  4. What's the realistic performance ceiling for 1 gate application on a P4? 0.5 seconds? 2 seconds? Is it even worth trying to make it interactive, or should I just run it in a background thread with a "Processing..." message?
  5. For the i3-2310M (Sandy Bridge, 3MB L3), will the entire 800KB real array fit in L3 and make the SOA transition unnecessary, or does AOS still hurt due to cache line pollution?

r/Assembly_language 7d ago

Interactive documentation and visual reference for binary formats and system memory layouts.

Thumbnail github.com
3 Upvotes

r/Assembly_language 8d ago

AttoChess - A Tiny Assembly Chess Program

21 Upvotes

AttoChess is my own 16-bit x86 DOS chess engine written in assembly, which is 10 bytes shorter than the previous world record. This assembly program draws the screen, reads typed coordinates, performs a true 4-ply recursive minimax search, and responds with its moves. You can play a game against this assembly engine directly in your browser on the project page:https://nicholas-afk.github.io/AttoChess/

As is typical of assembly size-coding compromises, the engine ignores castling, en passant, and pawn promotion. The complete assembly source code and build documentation are included on the website. I would like to hear your comments, or questions about my x86 assembly register-golfing tips!


r/Assembly_language 8d ago

Would I need a positive mask?

3 Upvotes

I am learning SSE string instruction right now and the mask bit (bit 5) is really confusing. I am not sure why I need them (or dont need them). From what I understand the cpu should already know which bits is valid or invalid based on implicit (terminating null) or explicit input (length). So a invert search (bit 6 = 1) should be valid even if the occurence is found at the ending non-16 aligned chuck.

; ---------- find the last occurenc ----------

pstrscan_l:

sub     rsp, 8

push    rbx

push    r12

xor     rax, rax

pxor    xmm0, xmm0

pinsrb  xmm0, \[rsi\], 0        ; inserting search prompt into xmm0 for used later

xor     r12, r12

.block_loop:

pcmpistri   xmm0, \[rdi + rax\], 1000000b       ; bit 6 is 1, flag null and after as invalid

setz    bl                  ; zf on? 1 : 0

jc      .found              ; if there at least one match, cf is set

jz      .done               ; set if the fetch sequence is 'short' essentially when it hit the last fetch cycle

add     rax, 16             ; fetch in chuck of 16, so increaed by 16 byte!

jmp     .block_loop

.found:

; if we find the prompt letter, execute below

mov     r12, rax            ; contain the chuck offset

lea     r12, \[r12 + rcx + 1\]; rcx contains the position of the char 

cmp     bl, 1               ; if this is true than it mean we at the end

je      .done

add     rax, 16

jmp     .block_loop

.done:

mov     rax, r12

pop     r12

pop     rbx

add     rsp, 8

ret

r/Assembly_language 9d ago

How I'm learning x86-64: rebuilding userland from raw syscalls (roadmap inside, steal it)

Thumbnail github.com
52 Upvotes

I learn better by building than by reading, so my "course" is a repo: rebuild userland piece by piece in x86-64 NASM on Linux.

No libc, no external calls — syscall or nothing.

The path so far, in order of pain:

- cat, wc, ls, grep — great first projects: open/read/write, buffered I/O, argv, without drowning

- printf — varargs by hand over the SysV ABI, format parsing

- malloc — brk/mmap, a free list, alignment (humbling)

- a shell — fork, execve, pipes, redirections

- a Forth interpreter — the first "boss fight", and the most fun

Repo (MIT, written to be read):

https://github.com/whispem/learn-assembly-with-em

If you're learning too: steal the roadmap, that's the point.

If you're further along: tell me what I should be doing differently — that's also the point.


r/Assembly_language 11d ago

I'm 15 and Solved My First Reverse Engineering Challenge

Post image
622 Upvotes

Recovered a Password Using Reverse Engineering 🎉

passionate about learning reverse engineering and cybersecurity.

Today I solved a practice reverse engineering challenge by analyzing the program's logic to recover the correct password. It was a great opportunity to improve my understanding of how executables work internally.

I'm still learning, but every challenge helps me get better at reverse engineering, Assembly, and Linux.

I'd appreciate any feedback, advice, or beginner-friendly reverse engineering resources from the community.

Thanks for reading!


r/Assembly_language 10d ago

Title: Reverse Engineering My Second Software with Radare2

Post image
72 Upvotes

today I finished reverse engineering my second software using Radare2.

I analyzed the binary, examined the assembly, followed the program's execution flow, and understood how the password verification worked instead of relying on trial and error.

With each project, I'm getting more comfortable with:

  • ELF binary analysis
  • Navigating functions in Radare2
  • Reading x86-64 assembly
  • Understanding control flow and conditional branches

I'm still learning reverse engineering, so I'd appreciate any feedback or suggestions on how I can improve my workflow.


r/Assembly_language 11d ago

Need some guidance

3 Upvotes

I have been doing assembly x86 from programing from ground up book it's at&t syntax. My end goal is malware analysis and reverse engineering. I have already done c from k&r and was planning to pick practical malware analysis. So the thing I need help with is that should I continue with pgup book for assembly or some thing else.


r/Assembly_language 10d ago

Question Any legit Free Libre and Open Soy Assembler that works with Intel syntax?

0 Upvotes

I was gonna use NASM, but holy moly they are so sus. They have a .us and .dev website. I don't want USA politics in my assembler. And they have fresh updates. Like what are you updating? (I guess some new esoteric AI slop instructions that the asian shill guy invented. Gotta remember to download some 20 year old version)

MASM and TASM have dumb syntax and are proprietary 😩😩😩


r/Assembly_language 13d ago

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

Thumbnail gallery
160 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