Skip to main content
The 2026 Annual Developer Survey Results Site is live— view the results here!

Question list filters

Filter by
Sorted by
Tagged with
Score of 2
1 answer
118 views

I’m writing a C compiler and I want to test the produced assembly on some examples. With a C program that prints the integer 10 followed by a newline, I get this assembly code (after a bit of cleaning)...
Score of 3
1 answer
149 views

I found documentation about variadic libcalls (usually with printf() as example) but I didn't find docs about how variadic syscalls are done. Docs say that the amount of fp registers must be set in ...
Score of -6
1 answer
134 views

I was trying to "mess around" with the CMP instruction NASM and then I was faced with Segmentation fault (core dumped) ./cmp_jmp I don't know what to specify besides that I am ...
Score of 2
2 answers
339 views

I am writing a low-level routine in C++ that mixes inline assembly (or an external .s file) to inspect or modify the current stack frame. Here is an example: #include <iostream> extern "C&...
Score of -4
0 answers
80 views

I'm coding a 32-Bits program in ASM, and now i'm wondering. How can we run an executable like cmd.exe using Win32 API in an ASM Code? I use nasm btw
Score of -3
0 answers
95 views

I wrote a program in HLASM (High level assembler for Mainframe) with one EXEC SQL instruction and I am getting the following errors caused by the DB2 Translator as follows: The instruction I wrote is: ...
Score of 10
2 answers
1030 views

In the book Computer Systems: A Programmer's Perspective an example from Section 3.5.3 shows us the different operations along with their assembly counterpart. C code: long arith(long x, long y, long ...
Score of 11
1 answer
516 views

An issue affecting most RISC architectures is the efficient creation of literal constants. When not loaded from memory, this usually requires a LOADHI instruction of some sort, plus an OR or ADD with ...
Score of 6
1 answer
230 views

What's the difference between WriteFile and WriteConsole in Windows? The documentation says: For WriteFile, "Writes data to the specified file or input/output (I/O) device." (https://learn....
Score of 4
1 answer
127 views

I'm working on esp32 (with xtensa quemu emulation at the moment) creating an "OS" from scratch to learn low level and hardware. So far i created syscal handlers (print uart, exec, and exit) ...
Score of 4
1 answer
193 views

I ran a quick test: typedef float __attribute__((vector_size(16))) simd_float4; #include <stdio.h> int main(void) { simd_float4 test = {1, 2, 3, 4}; __asm__ ("fmov %s0, %s1" : &...
Score of 4
2 answers
397 views

I am on a Skylake-X machine. Here's a very simple loop: %include "events_asm.inc" section .data fmt: db "CYCLES = %lu, RETIRED = %lu", 10, 0 section .text global main extern ...
Score of -2
1 answer
292 views

I was wondering how to retrieve argv and argc using x86_64 assembly language code on Linux (and SYSTEM V).
Score of 4
3 answers
204 views

If your project is entirely in assembly, what would be better: %INCLUDEing everything in one main file, or declaring extern, global for every symbol you want to share between your files and linking it ...
Score of 25
1 answer
980 views

While implementing a simple data structure for more memory-efficient computation of a recurrence table, I noticed something odd: when the unused class member head_ below is removed, the program ...

15 30 50 per page
1
2 3 4 5
…
3005