r/Assembly_language • • Jul 28 '26

Project show-off So I have made an OS :D

0 Upvotes

It is called DoomOS, it is also made in assembly. Decent features, external applications, SDK, planning to implement custom interrupts and FAT12(also this is a floppy 16bit OS). It is at- https://github.com/Doomer39/DoomOS/tree/main .What else are you supposed to write?


r/Assembly_language • • Sep 02 '26

Question The Byte 0 in x86 Just Adds?

0 Upvotes

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 • • Dec 17 '25

Hey everyone, I need help learning how to assemble things!

0 Upvotes

What roadmap did you follow to learn this awesome language?

Do you recommend any books or roadmaps?


r/Assembly_language • • Jul 26 '21

Help O meu código esta certo?

0 Upvotes

Eu estou tentando transformar esse código de mips em c mas não consigo entender direito a condição feita na linha 11.

01 addi $sp, $sp, -12
02 sw $t0, 0($sp)
03 sw $t1, 4($sp)
04 sw $t2, 8($sp)
05 add $v0, $zero, $zero
06 sll $t0, $a1, 2
07 add $t0, $t0, $a0
08 add $t1, $a0, $zero
09 loop: beq $t0, $t1, exit
10 lw $t2, 0($t1)
11 bgt $v0, $t2, next
12 add $v0, $zero, $t2
13 next: addi $t1, $t1, 4
14 j loop
15 exit: lw $t0, 0($sp)

16 lw $t1, 4($sp)
17 lw $t2, 8($sp)
18 addi $sp, $sp, 12
19 jr $ra

meu código em c ficou assim

#include <stdio.h>

int funcao(int* vetor, int tam){
    int t1 = 0;
    int v0 = 0;

    while (t1 < tam){
        int t2 = vetor[t1];

        if (v0 <= t2){
            v0 += t2;
        }
        t1 += 1;
    }

    return v0;
}

r/Assembly_language • • May 19 '24

I think I'm a bit obsessed with Assembly... (without understanding the registers)

Thumbnail
gallery
2 Upvotes

r/Assembly_language • • 5d ago

Help C to ASM

0 Upvotes

Hello everyone!

I am currently working on a side project where a python script takes a C source file and converts it into ASMx86_64 (Intel syntax) and I am just trying to find resources for type conversions without making some kind of script where I automate generating a program and compiling it for ASM in GCC.

Does a list like this exist? And if so, are there separate ones for Windows and Linux? (As I think there’s a difference, not completely sure)

Thanks, have a good one frens


r/Assembly_language • • Apr 03 '23

Suppose a signal is fed into port P3.4. Write a program to keep counting the number of falling edges of the signal until the count reaches 100. Then stop the counting, and send the word “OVER” through the serial port at a Baud rate of 19200 bits per second. Write the answer in 8051 ALP. Help!!

0 Upvotes

r/Assembly_language • • Nov 19 '22

Help I know this is not a homework solving sub but i really need your help. How do i solve these?

Post image
2 Upvotes

r/Assembly_language • • Nov 17 '21

How do I reverse engineer this file? my job depends on it

4 Upvotes

Hi my name is mohsen and I just joined. to be honest I've only dabbled with Assembly like NASM and never got it. but that changes now because whether I like it or not I must do this.

the company that hired me sent me a Sample.zip file and told me if and only if I can de assemble and re-write it in C# 8 they'll hire me. so I immediately opened could binary ninja on firefox and uploaded pdb.dll this is what came back:

int32_t __stdcall _start(int32_t arg1 @ esi, int32_t arg2 @ edi, int32_t arg3, int32_t arg4, int32_t arg5)

start:

push ebp {__saved_ebp}

mov ebp, esp {__saved_ebp}

cmp dword [ebp+0xc {arg4}], 0x1

jne 0x10009a2

call sub_10009e01

push dword [ebp+0x10 {arg5}] {var_8}

push dword [ebp+0xc {arg4}] {var_c}

push dword [ebp+0x8 {arg3}] {var_10}

call sub_10009a3b

add esp, 0xc

pop ebp {__saved_ebp}

retn 0xc {__return_addr}

I don't understand it at all. so basically main takes total of five arguments. but what does:

cmp dword [ebp+0xc {arg4}], 0x1

is supposed to mean its a compare if not equal program jumps to 0x10009a26 but what does dword [ebp+0xc {arg4}] mean? and why are we comparing it to 1 (are we basically saying if true continue if false jump?)

I don't know how to read and reconstruct it in C and then in C#.

any advice? how does this work?


r/Assembly_language • • Mar 14 '26

8051 assembly code

0 Upvotes

We are using AT89S52 , we have 6 led matrices and want to scroll the text continuously through them ..a sentence like "hey how are you" and once that's finished we want to make it scroll on loop . Uart is should also be used (tera term ) that if our project head ask us to display a particular word or sentence at that time we should display it on time . So whats the assembly language code for it ? We use keil to convert it to hex code . AI code is not working. We are so desperate that we are even ready to pay ..but please help us


r/Assembly_language • • Sep 15 '25

Reverse engineering

1 Upvotes

I am finding some 14 yrs old who is learning assembly language and reverse engineering like me


r/Assembly_language • • Jan 07 '21

PLEASE HELP MY STUPID ASS!!

0 Upvotes

Write a program in assembly language to do the following :

- Input a number between -99 and +99 (excluding zero).

- If the number is positive, add the number to a memory location labeled “POSITIVE”.

- If the number is negative, add the number to a memory location labeled “NEGATIVE”.

- The program ends when zero is entered.

- Output the total to the output box (the contents of “POSITIVE” added to “NEGATIVE”.


r/Assembly_language • • Dec 12 '22

Does anyone know the answer ?

Post image
4 Upvotes

r/Assembly_language • • Jul 03 '26

(16-bit assembly graphical o.s. W.I.P.)(Dumb Question) How to make a simple algorithm in assembly (16-bit) to make filled circle of a certain radius (ive already made other shapes and have a _Make_Pixel label.)

3 Upvotes

There are only a couple things-
1.- Must not like take a lot of variables.
2.- Must not be 300+ lines.
3.- Should be 12th grade or lower math (i'm dumb).
4.- please don't just put equations if you know programming lang. pls explain it in any programming lang.

Most importantly it should make a filled circle of any radius.

edit- I've already tried Brensaums algorithm (didnt work), 8 point algorithm (didnt work), graphing algorithm with tension and

=> x^2 + y^2 = d, t+factor>d>t-factor. (tried didnt work)


r/Assembly_language • • Dec 13 '22

Help I need some help with this

Post image
2 Upvotes

r/Assembly_language • • Jun 01 '21

Help Help me Plz

Thumbnail
gallery
0 Upvotes

r/Assembly_language • • Feb 04 '25

Help Why wont NASM assemble my .asm file?

Thumbnail
gallery
21 Upvotes

I'm using zorin os and I can't get nasm to assemble test.asm, stating that the file or directory doesn't exist... but it does😤. I have test.asm in the home directory. What am I doing wrong?


r/Assembly_language • • 29d ago

Project show-off x86_64 NASM Dev — A lightweight GUI NASM development tool for Window

4 Upvotes

Hello!

I’m introducing x86_64 NASM Dev, a native Windows development environment focused on NASM, x86, and x86-64 assembly programming.

The goal of this project is to bring writing, assembling, running, debugging, disassembling, and inspecting assembly code together into one lightweight application.

Features

Output Formats

The application supports multiple output targets:

  • ELF64

  • Win64

  • Win32

  • RAW Binary

This allows the same development environment to be used for different types of assembly projects, from normal applications to low-level system development and raw binary projects.

Assembly

  • NASM-based assembly

  • Assemble source code directly from the application

  • Build and run assembled programs

  • View assembly output and build results

  • Display assembler errors

  • Save and Save As

  • Integrated source editor

Syntax Highlighting

The editor provides syntax highlighting for different parts of NASM source code:

  • Instructions

  • Registers

  • Labels

  • Directives

  • Strings

  • Numbers

  • Comments

This makes larger assembly files easier to read and navigate.

Real-Time Syntax and Error Checking

The editor is designed to provide immediate feedback when working with NASM code.

  • Detect invalid NASM syntax

  • Highlight invalid syntax directly in the editor

  • Underline errors

  • Show the exact line containing the problem

  • Show the exact column when available

  • Display the actual NASM error message

This makes it easier to locate and correct assembly errors without having to search through build output manually.

Debugger

The debugger provides control over program execution:

  • Step Into

  • Step Over

  • Continue

  • Breakpoints

  • Stop execution

  • Inspect program state while debugging

The objective is to make debugging assembly code more practical without leaving the development environment.

Register Viewer and Editor

The application can display CPU register state while debugging.

Supported registers include:

  • RAX

  • RBX

  • RCX

  • RDX

  • RSP

  • RBP

  • RSI

  • RDI

  • RIP

  • R8–R15

  • RFLAGS

Registers can also be edited during debugging, allowing the program state to be modified and tested directly.

Memory Viewer

The memory viewer provides a low-level view of program memory:

  • Hexadecimal memory representation

  • ASCII representation

  • Memory addresses

  • Pointer following

  • Memory inspection while debugging

This is intended for inspecting buffers, pointers, structures, strings, and other data directly in memory.

Stack Viewer

The stack can be inspected while the program is running or being stepped through.

  • ESP/RSP-based stack view

  • Stack addresses

  • Stack values

  • Follow stack changes while stepping

  • Inspect stack data during debugging

Disassembler

The application includes a built-in disassembler for inspecting machine code.

It can be used to examine binaries and understand the instructions contained within them.

Disassembly can be particularly useful when working with:

  • RAW binaries

  • Object files

  • Executables

  • OS development projects

  • Compiled machine code

  • Low-level debugging

Conversion Tools

The application also includes:

  • Hexadecimal → ASCII

  • ASCII → Hexadecimal

These tools are useful when working directly with binary data, memory contents, strings, and machine-code representations.

Designed for Low-Level Development

x86_64 NASM Dev is intended for developers working with:

  • NASM assembly

  • x86/x86-64 programming

  • Operating-system development

  • Bootloaders

  • Kernel development

  • Raw binaries

  • Reverse engineering

  • Machine-code analysis

  • Low-level programming

  • Assembly experimentation

The focus is on keeping the environment lightweight while still providing tools for both writing assembly and inspecting what happens at the machine-code level.

The current executable is around 77mb because of :

nasm.exe ~2 MB

ndisasm.exe ~1 MB

lld-link.exe ~75 MB (For Windows)

GUI/code <1 MB

Primarly In C and Some c# for style
You Can Find The Source Code at : https://github.com/moslemhamoudi6-cyber/x86_64-Nasm-Dev
You Can Find the Final Build Executable At : https://github.com/moslemhamoudi6-cyber/x86_64-Nasm-Dev/releases/tag/EXE

This project is still under development, with more features and improvements planned.
Hope You Enjoy it!


r/Assembly_language • • Mar 29 '26

I built a fileless ICMP C2 agent in pure x64 Assembly (libc-free) that bypasses Suricata v8.0.3 DPI and behavioral heuristics.

7 Upvotes

Hello everyone,

I wanted to share a research project I've been working on: Ghost-C2 (v3.0.0). It’s a hyper-stealth, fileless C2 implant written entirely in pure x86_64 Assembly with zero external dependencies (no libc).

The goal was to see how far I could push ICMP tunneling to evade modern Deep Packet Inspection (DPI) and behavioral monitoring systems.

🛡️ Key Stealth Features (v3.0.0):

  • Protocol Mimicry: Encapsulates encrypted payloads within standard Linux ping patterns (including dynamic timestamps via rdtsc).

  • Asymmetric Signature-less Trigger: Employs a polymorphic authentication mechanism where the agent validates commands based on a mathematical sum (ID + Sequence = 45k/55k). This prevents local network echo interference and renders static signature rules completely blind.

  • Fileless Execution: Uses sys_memfd_create (syscall 319) to capture command outputs in RAM—zero disk artifacts.

  • Traffic Shaping (Jitter): Implements randomized transmission intervals (100-300ms) to disrupt periodic beaconing detection.

  • Data Fragmentation (Chunking): Automatically splits large command outputs into 56-byte chunks. This ensures the total ICMP packet stays within standard diagnostic boundaries to bypass payload anomaly detection.

  • Rolling XOR Obfuscation: A symmetric rolling cipher protects both Echo Request and Reply streams, ensuring high entropy and breaking static signatures.

  • Process Masquerading: Dynamically renames itself at runtime (e.g., to [kworker] or systemd-resolved) using sys_prctl and stack manipulation.

🎯 Empirical Success:

Successfully verified a full bypass against Suricata v8.0.3 (Latest Release) using Emerging Threats (ET) Open signatures and custom "Protocol Violation" rules. During the transfer of ~25KB of metadata, zero alerts were triggered.

💻 Low-Level Inventory:

Operating directly with the Linux Kernel via:

  • sys_socket (41) & sys_recvfrom (45) for raw ICMP interaction.

  • sys_memfd_create (319) for anonymous RAM buffering.

  • sys_ptrace (101) for Anti-Debug & Anti-Dump.

A Note on Blue Team Evasion (The OPSEC Reality): I specifically designed the packet structure to push the Rolling XOR payload past the 32-byte offset. Many DPI engines only inspect the initial padding for performance reasons, meaning they classify the packet as "legitimate ping" before hitting the high-entropy payload. Furthermore, by masquerading as a network-native daemon (like systemd-resolved), the implant dodges behavioral alerts for SOCK_RAW usage via False Positive exhaustion.

Why No TTY? I made a deliberate OPSEC decision to exclude an interactive TTY. Implementing a PTY requires ioctl and continuous stateful streams, which creates an "ICMP Storm" and leaves massive behavioral artifacts. Ghost-C2 is built for absolute invisibility, not convenience.

Check out the source code and full technical analysis here:Check out the source code and full technical analysis here:

🔗 GitHub: GithubC2-GHOST

🔗 Blog: https://netacoding.web.app/posts/icmp-ghost/

I'd love to hear your thoughts on the evasion techniques or any suggestions for future syscall-based enhancements!


r/Assembly_language • • Apr 11 '26

Question Experimentation with capability flags and control flow validation

0 Upvotes

Is this prototype good?

section .data:

secret db 5, 4

global _start

section .text:

msg db "You have exited successfully", 0

equ length $ - 29

global success

_start:

test rbx, rbx

jz fail

cmp rbx, 10

jl fail

mov ebx, rbx

rol ebx, 5

mov secret, ebx

jmp success

success:

cmp ebx, secret

jne fail

mov rax, 1

mov rdi, 1

mov rsi, msg

mov rdx, length

syscall

jmp end

fail:

mov rax, 60

mov rdi, 0

syscall

end:

mov rax, 60

mov rdi, 0

syscall


r/Assembly_language • • Feb 09 '22

Solved! What are the usage of eax, ebx, ecx and edx? What are their equivalents in ASM 16-bit and 64-bit?

0 Upvotes

r/Assembly_language • • May 04 '23

Help Can someone confirm if this answer is correct?

Thumbnail
gallery
0 Upvotes

r/Assembly_language • • Aug 28 '26

Project show-off I made a platform for beginners to start learning Risc-V

Thumbnail
reddit.com
0 Upvotes

r/Assembly_language • • Nov 01 '25

I'm a beginner and my teacher wants me to compile my assembly code but I have no idea how on a windows computer

5 Upvotes

My teacher is really bad at teaching the important stuff so I know how to do the code for simple printing in assembly but i don't know how to compile the code. this is my code in linux RISC-V assembly to print "Hello World!":

  .equ LX_WRITE, 64
  .equ LX_EXIT, 93


.global _start


_start:


  addi a0, x0, 1
  la   a1, str1
  addi a2, x0, 13
  addi a7, x0, LX_WRITE
  ecall


  addi a0, x0, 0
  addi a7, x0, LX_EXIT
  ecall


.data
  str1:   .ascii "Hello World!\n"

I've gotten as far as doing-

riscv-none-elf-as hello.s -o hello.o
riscv-none-elf-ld hello.o -o hello.elf

-but I have no clue how to go from here. I would like to find a good tutorial on this but I can't find anything i understand or have the prerequisites downloaded for. I would love if there was an online compiler for the "hello.elf" file or something but I don't know if thats something possible. I also need to keep the code the exact same like keep the "ecall"s in there even though they're linux things because I will need to use them for future assignments. Thank you for the help


r/Assembly_language • • Oct 25 '25

Where can I learn x86_64 from zero? I'm in Windows

25 Upvotes

Title