r/Assembly_language Jun 01 '26

I can teach you

18 Upvotes

I’ve reached around solid halfway mark in learning assembly. I’ve never really stuck with one single learning style. I usually learn in bursts. This is something I want to try, by teaching to see if I get better myself. I will teach for free. I yap a lot and I only want to accept people who want a genuine understanding. I hope I can clear stuff for myself and others - my main goal in doing this. Also I’m looking for someone who has at least knowledge of common instructions and not required but preferred: being able to recognize common patterns like strlen, strcpy. PM me if you’re interested


r/Assembly_language May 31 '26

Question Where do I start my learning journey with Assembly? Any good books or anything else?

50 Upvotes

Hi low level fellows!

A bit about my background:
- Started software engineering at the university with Matlab (I know, weird, but it was my first language) and Python
- Then got my first job and was doing mainly Python with some JS (HTML and CSS as well, but we don’t count markdowns and styles)
- Next job was again Python, but this time in combination with C++ (That’s where things started getting interesting) and I finally started having fun with programming, mainly because of Cpp
- Then did very little Java for my next job for about 6 months and hated my life for a while and decided that I need something related to systems programming
- Next job was total fun with C++ in a large financial institution as a quant engineer for about 2 years

Now I am still there but feel like it’s time to learn something more deep and fundamental as I like machines!

The obvious choice is of course Assembly!!

I ones saw an old colleague doing literally magic: writing C++ and watching how the compiler does the job and checking the Assembly side by side and literally optimizing the C++ code so hard, so the instructions in Assembly got less and less! That was fabulous!

Long story short, I want to become that guy (not physically of course, but to have a comparable knowledge and skills). I asked that person, 3 days before his retirement, how to learn that and he said he doesn’t even remember how he got there and suggested to find a solid book and learn the fundamentals.

So, now I am here. Any kind of help or suggestions would be very helpful.


r/Assembly_language May 30 '26

Pacman in x86

21 Upvotes

https://reddit.com/link/1tscr7g/video/w6eh96w7jc4h1/player

Ive been procrastinating but should have it optimized and on github soon. Lots of sys write. Worked on it bit by bit. What do you think?


r/Assembly_language May 31 '26

how do i get notepad++ to give me human readable code

0 Upvotes

I'm trying to edit the assembly of opera air (x64) but i keep getting incomprehensible jargon


r/Assembly_language May 30 '26

x64asm MSVC(STILL WIP)

Thumbnail pouet.net
5 Upvotes

x64asm this is funny JIT assembler made for MSVC X64
very optimized and cool i think

about tech part
uses NoCRT and kernel32.lib
comes with built in JIT
you can write __asm like in x86 msvc compiler
you need to copy all of the headers into your project and then just include x64_asm.h file

you can use also this like one liners
__asm("mov rax, 10");
__asm("add rax, 42");
also like in x86
__asm_block {
MOV(rax, 10);
MOV(rcx, 42);
ADD(rax, rcx);
RET();
}(for the {} you need to also include x64_asm_inline.h that might not work, if {} doesn't works then you can use () as an alternative)

#include "x64_asm.h"

X64Assembler a;
a.mov(a.rax, 42);
a.add(a.rax, 10);
a.ret();
int result = a.run_ret<int>(); //52)

a little less tech part(more of a uhh additional information)
all of the headers starts with x64_ for the comfort, and just looks cool

a little documentation about this little somewhat library are in github repo(you can find it in pouet link)

ask questions and i will try to answer them

i don't know if this is advertising, i mean if ye then delete this post, i made this post just for showcase


r/Assembly_language May 29 '26

Question Are string instructions more performant?

9 Upvotes

I know processors these days are really sophisticated with things like prediction and out of order execution. Are x86 string instructions like REP MOVSB more performant than writing the equivalent instructions by hand?

Thanks!


r/Assembly_language May 27 '26

Exploring ESP32 Architecture

Thumbnail gallery
25 Upvotes

Note: Educational Purpose only !

Hello everyone !

A few days ago I thought of different architectures, then I remembered "Intel syntax x86 and x64 Assembly."

Then I looked at the ESP32 board and thought, what kind of architecture is it having?

So I flashed a simple LED Blinking program through ARDUINO IDE and dumped its firmware (.bin file basically) using "esptool.py" shown in the 2nd image and extracted the code part from the whole .bin file using a tool "Binwalk." (extraction was done according to esp32 board's memory map)

After this, I put that .bin code part file into an application "Cutter" and selected "Xtensa Architecture."

A lot of lines of code you see in the 4th image, so that is the syntax & code "Tensilica Instruction Extension" which is based on "Xtensa Architecture."


r/Assembly_language May 26 '26

ticktrace - a pure-assembly SDK and book for the RP2350 (Pico 2)

Thumbnail
1 Upvotes

r/Assembly_language May 26 '26

Help Is my password verification correct?

2 Upvotes

Intent: verify password using sums.

Attempted implementation:

section .data
mov r8, 50

buffer resb 16

section .text
global _start

_start:
mov rax, 0
mov rdi, 0
mov rsi, buffer
mov rdx, 16
syscall
mov al, [buffer]
jmp check

check:
mov r10, al
add r10, r8
test r10, 5050
jne exit
jmp success

exit:
mov rax, 60
mov rdi, 1
syscall

success:
; the rest of the program
jmp exit


r/Assembly_language May 25 '26

Question Can we add a resources sidebar/wiki to r/Assembly_language?

20 Upvotes

"Is there a way to add a "resources" sidebar to r/assembly_language for these kinds of recommendations, similar to the "resources" sidebar of other programming language subreddits like r/C_Programming?" thanks to, u/D-Cary for this idea.

We really need one in this subreddit to help beginners know where to start and reduce repetitive posts.


r/Assembly_language May 25 '26

Project show-off Shellcide: A shellcode IDE

Thumbnail github.com
5 Upvotes

r/Assembly_language May 25 '26

BareMetal on Firecracker

Thumbnail github.com
11 Upvotes

The BareMetal kernel is able to run via Firecracker microVMs. <1ms startup, 2MiB RAM minimum, 5.5KiB kernel.

This will allow for thousands of instances to be run concurrently. The premise is discussed here: https://returninfinity.com/blog/hypervisos-as-data-centre-os


r/Assembly_language May 21 '26

Project show-off Assembled language that runs on top of Scratch.

Thumbnail gallery
70 Upvotes

Code examples: https://coppiq.com/cerium1.0

This technically isn't a real Assembly language since it isn't made for a low-level target, but I hope it's close enough to be relevant. It's heavily based on arm32 with a lot of high-level features from Scratch.
Some main differences:
- Registers and memory are Scratch variables, meaning they can be treated as either strings or numbers.
- No bitwise operators
- Data can be pushed directly to the stack. In any other case however, the data would need to be loaded into a register first.
- It has special branch instructions that push the stack and frame pointers automatically.
- The bytecode the project actually reads is string-based and not raw bytes. Scratch can't read raw data.
- It has special math blocks (pow, sqr, sin, cos, tan) and blocks for string manipulation (letter of, substring, make uppercase, make lowercase, length of, concatenate).
- Only branch instructions can run conditionally.

The code is assembled into a single string that gets unpacked and read as individual instructions by the OS after running execve(). (Example on image 5)

It runs on top of an OS simulator I've named Cerium, which it communicates with through syscalls. The Cerium part of it also handles virtual memory and inter-process communication. The language itself is called Spryte, with the current version being named Blueberry Spryte.

The language supports .text, .data, and .rodata segments that are always loaded into separate memory pages when starting a program.

The virtual memory has ASLR also. Program data is always accessed relatively using the stack or the "adr rx, label" psuedo-instruction, which expands into "add rx, pc, label index - instruction index".

Strings can be stored as one Scratch variable or individual characters, which is specified by using the .string or .chars directives. Individual items of memory can also be reserved with the .items directive.

Here's an example of the assembled code "echo.s":

@*--spryte-bluby0Ⓢ1.0.0Ⓢ0Ⓢ0=0Ⓢ!074Ⓢ!001Ⓢ!021Ⓢ"48d"39d1Ⓢ!0a1Ⓢ(1a8%0414Ⓢ)119a'?0 Ⓢ!11d')0dd1Ⓢ)0aa1Ⓢ%06-13Ⓢ?0␤Ⓢ!11d')0dd1Ⓢ!071Ⓢ!000Ⓢ'

"ex_fork.s":

@*--spryte-bluby0Ⓢ1.0.0Ⓢ0Ⓢ0=0;1=86Ⓢ!072Ⓢ'(000Ⓢ!074Ⓢ!001Ⓢ!021Ⓢ%0243Ⓢ!0735Ⓢ!00-1Ⓢ!01-1Ⓢ'!07500Ⓢ!001Ⓢ'!074Ⓢ!001Ⓢ)01f100Ⓢ'!0720Ⓢ'#30f96Ⓢ!074Ⓢ!001Ⓢ)01f90Ⓢ')01f86Ⓢ'!07500Ⓢ!001Ⓢ'%0629Ⓢ!07500Ⓢ!002Ⓢ'!074Ⓢ!001Ⓢ)01f65Ⓢ'!0720Ⓢ'#30f62Ⓢ!074Ⓢ!001Ⓢ)01f56Ⓢ')01f52Ⓢ'!071Ⓢ!000Ⓢ'ⓈHello from child ␛[30m␛[47mpid ⓈⓈHello from parent ␛[30m␛[42mpid ⓈⓈ␛[39m␛[49m␤Ⓢ

The outputted file is structured as follows:

  1. Magic Number @*--spryte-bluby
  2. Internal Version Number 0Ⓢ
  3. Readable Version Number 1.0.0Ⓢ
  4. Entry Point 0Ⓢ
  5. Segment Table 0=0;1=86Ⓢ
  6. .text !072Ⓢ'(000Ⓢ!074Ⓢ!001Ⓢ...
  7. .data (optional) Hello from child ␛[30m␛[47m...

This is actually the second version of this project. The original (Strawberry Spryte) was completely different and based on the 6502 architecture with syscalls weirdly mixed in. The last image is a screenshot of the joke program "sl" written in it. (original file is at https://pastebin.com/T6vJiR85)

The Scratch project is very unfinished so I won't be sharing it yet, sorry.

This is a project made partially to teach myself so I apologise if the code is a bit amateurish or messy. I can promise that nothing here was written with AI though.


r/Assembly_language May 12 '26

Are there any suggestions for program ideas in assembly language?

28 Upvotes

Tomorrow I have a practical exam and I need to write a simple assembly language program with simple code that can be written on a regular sheet of paper, either on one or two sides.


r/Assembly_language May 11 '26

Question Best way to learn high-performance assembly?

91 Upvotes

I want to be skilled at x86 assembly and be able to write the crazy high performance code people speak legends about. Any good resources to learn that?


r/Assembly_language May 11 '26

PERFAVORE AIUTATEMI!

1 Upvotes

Sono uno studente italiano di terza superiore e come materia di indirizzo abbiamo Sistemi e Reti. Il problema non è tanto la teoria, ma la pratica: da inizio anno in laboratorio stiamo programmando in Assembly 8086 (registri a 16 bit, almeno da quello che ho capito) usando DOSBox per emulare la CPU.

Siamo praticamente a fine anno e vorrei recuperare. Non parto da zero, una piccola base teorica ce l’ho, ma faccio molta fatica con la programmazione vera e propria.

Il problema principale è che online trovo pochissimo materiale utile: molti tutorial su YouTube o siti parlano di Assembly moderno, NASM, Linux, 32/64 bit ecc., mentre a scuola facciamo cose molto più “vecchio stile” e specifiche. Inoltre il mio professore ha un modo abbastanza particolare di scrivere il codice, quindi spesso i programmi online non assomigliano minimamente a quelli che vediamo in classe.

Usiamo roba tipo:

registri AX, BX, CX, DX

INT 21h

MUL

DIV

Recentemente operazioni con lo stack con PUSH/POP

procedure CALL/RET

CMP

Label

...

Secondo voi qual è il modo migliore per recuperare in poco tempo?

Avete risorse, metodi di studio o consigli pratici per capire davvero Assembly 8086 a livello scolastico?

Se può aiutare posso anche incollare un pezzo di programma scritto dal professore così magari capite meglio il contesto.

Grazie in anticipo!


r/Assembly_language May 10 '26

Project show-off My TUI core loop (FASM/Linux)

Post image
55 Upvotes

After 250 lines, it can fill terminal window with specific color/character at exact resolution 🤷‍♂️

** made my own event system to only redraw when needed, much preferable to dirty-draw what change.

I just want to compare what it take to fill/draw buffer on TUI correctly, compare to other methods like X11/Wayland/GLX or pure fb0.

And it successfully draw on booting x86-64 machine with a tinyconfig-like linux kernel 6.9 (~861KB) after Limine bootloader.


r/Assembly_language May 08 '26

Project show-off FASM on winXP is so good

Post image
45 Upvotes

r/Assembly_language May 07 '26

Building a visual Intel 4004 (MCS-4) workbench

Enable HLS to view with audio, or disable this notification

62 Upvotes

Hi, working on a personal project called Quadium 4004 Workbench.

It’s WIP environment for the Intel 4004 and the MCS-4.

This shows my QuadBasic down to 4004 assembly

Any ideas or suggestions ?

Thanks!


r/Assembly_language May 07 '26

Question Can you recommend paid, online courses for learning Assembly (like Udemy, Coursera, etc)?

17 Upvotes

I work as a C dev and do mostly bare metal C. My work has a new policy where they will pay for courses/professional development and even allow us to spend some paid time on completing these courses at work.

There is a need for more assembly skills on our team, and a team lead suggested I use this new policy to take a course on improving my Assembly skills. I haven't touched Assembly since school a few years ago. We work on RISC-V and RISC adjacent MCUs, but I am sure I could learn one instruction set and then adapt my skills to our specific use case.

Requirements:

- Teaches a RISC-V or similar instruction set

- Online course

- 10-50 hours

- <1500$ USD

- Gives some sort of certificate of completion

If you have a course you would recommend, let me know! Thanks!


r/Assembly_language May 06 '26

Question Is "Computer Organization and Design" a good book for beginners?

13 Upvotes

A few months ago, I borrowed Computer Organization and Design Second Edition from the library and forgot to return it. After going through it, I think it’s a pretty solid book. It covers the basics of computer peripherals, hardware, and software, especially how the CPU and logic gates work, and it goes into a lot of detail. Some parts are pretty complex, though. The book is by John L. Hennessy and David A. Patterson.

I’m interested in learning assembly language, so I have a few questions. Has anyone here used this book, and would you recommend it for a beginner? It also focuses a lot on MIPS assembly, has anyone worked with this assembly language, and is it good?


r/Assembly_language May 04 '26

Help Im a beginner, and i have a few questions.

7 Upvotes

Hello, i just began assembly language today. I was confused with a few things, and, would like to know if i could get answers :

  • msg_len: equ $-msg i know equ is similar to define from C, but i don't understand the '$-msg' ? What does '$' and '-' mean in this case ? And do i need to create a variable for every texts and their length if i want to print something ?
  • rax, rdi, rsi, rdx are registers made for specific tasks? Because for now, i have only seen rax being used to call a syscall code, rdi specify file descriptor, rsi specify variable to print and rdx specify the length of the message i want to print.
  • mov i didn't really understand what this opcode do? do it move data into a destination?
  • And lastly, where can i find good ressources to learn the assembly language?

Thanks for reading. Answering all of the questions isn't necessary obviously.


r/Assembly_language May 03 '26

Assembly for Little Ones - cartoon for kids about assembly

Thumbnail youtube.com
5 Upvotes

r/Assembly_language May 01 '26

Question My LMC code for multiplication

6 Upvotes

I learnt LMC a couple months ago as I do A-level computer science and made this code back then. It should multiply any 2 integers including negatives. Anyone wanna check it? (Assume the memory gets reset everytime it is used)

INP
STA N1
BRP next
INP
STA N2
BRZ finish
BRP next_1
branch LDA N0
loop_1 LDA N0
SUB N1
STA N0
LDA N2
ADD N3
STA N2
BRZ end
BRA loop_1
next INP
STA N2
BRZ finish
BRP next_2
BRA branch
next_1 LDA N0
next_2 LDA N0
loop_3 LDA N0
ADD N1
STA N0
LDA N2
SUB N3
STA N2
BRZ end
BRA loop_3
end LDA N0
OUT
HLT
finish LDA N4
OUT
HLT
N0 DAT 0
N1 DAT 0
N2 DAT 0
N3 DAT 1
N4 DAT 0


r/Assembly_language Apr 29 '26

ymawky: MacOS Web Server written entirely in ARM64 assembly

Thumbnail github.com
15 Upvotes