Skip to main content

Questions tagged [assembly]

An assembly language is a low-level programming language for a computer, microcontroller, or other programmable device, in which each statement corresponds to a single machine code instruction.

Filter by
Sorted by
Tagged with
-2 votes
3 answers
354 views

Backstory: Writing a QImage to Sixel renderer. Feel like I have optimized it the best I can using basic c++. I have heard suggestions here or there that you can utilize things like GPU, SIMD, insert ...
Anon's user avatar
  • 3,649
0 votes
0 answers
161 views

Recently, I started learning Arm64 assembly. The assembler I'm using is the GNU Assembler (GAS). The version of GAS I'm using is GNU assembler (GNU Binutils for Ubuntu) 2.42. I want to make my code ...
CorkiMain's user avatar
-1 votes
1 answer
136 views

Recently I encountered an issue at work where a unit test written in C++ would crash only when being compiled with MSVC 2017 (MSVC 2019 and up are fine). I tried to debug this issue and it seems like ...
yijiem's user avatar
  • 107
-3 votes
1 answer
488 views

I know that a lot of compilers use an assembler to compile to machine code, to make an executable (compiled program). Some people even made their own assemblers, or they just use an existing assembler,...
Jack Murrow's user avatar
0 votes
2 answers
287 views

I'm having an issue with dependencies in a C# app that I'm creating. I have an assembly for my authentication process, and a separate assembly for starting up the main program once authentication is ...
Adam B's user avatar
  • 1,660
1 vote
3 answers
277 views

If I am correct, an assembly language uses the program stack to store data. Is it correct that the program stack is partitioned to frames, each of which is for a call to a procedure? So there is no ...
Tim's user avatar
  • 5,555
0 votes
2 answers
422 views

From Computer Systems: a Programmer's Perspective, about assembly languages: We see that the Intel and ATT formats differ in the following ways: The Intel code omits the size designation suffixes. We ...
Tim's user avatar
  • 5,555
-3 votes
2 answers
241 views

Why will it take that long to transition all Mac software to ARM according to Apple? I thought all they would need to do is to recompile the source code of their apps and rewrite SIMD code from intel ...
mbl's user avatar
  • 111
12 votes
1 answer
3k views

Why is assembly language called "assembly"? I was just watching the 1st video in the "Crockford on JavaScript" series. In it, Douglas says, ". . . the first program to make programming easier was ...
katzbatz's user avatar
  • 357
2 votes
1 answer
291 views

In my searching although this question seems to get answered a lot, the answers don't really cover what I want to ask. I'm learning assembly and my question is, in higher level languages e.g C data ...
Nick's user avatar
  • 149
0 votes
1 answer
161 views

The AMD64 specification talks about /0 with regards to instruction encoding but I don't have a clue what is meant by that. For example, in Volume 3 the ADD instruction has three forms: ADD reg/mem16,...
Paul McKneely's user avatar
52 votes
4 answers
17k views

When compiling C code and looking at assembly, it all has the stack grow backwards like this: _main: pushq %rbp movl $5, -4(%rbp) popq %rbp ret -4(%rbp) - does this mean the ...
alex's user avatar
  • 519
0 votes
1 answer
1k views

In laymen's terms, what is the difference between opcodes and operands in assembly language programs? I understand that one involves where to get the data and one involves what is to be performed on ...
Cody Rutscher's user avatar
-4 votes
2 answers
278 views

What I want to know is, how can we still make use of assembly today, in productive manners? When assembly outperform C, so it would seem practical to write a section of the project in assembly rather ...
fido9dido's user avatar
  • 133
-7 votes
1 answer
428 views

Assume the following C code: #include <stdio.h> int main() { int a = 5; int b = 15; return a + b; } Compiling it using gcc creates an assembly code which includes the following: ...
Joes's user avatar
  • 1
1 vote
2 answers
2k views

I'm working on a C compiler for Linux for the purpose of personal curiosity/fun. How can I test the generated assembly before the compiler is complete enough to do anything useful? For example, if I ...
user avatar
0 votes
3 answers
579 views

Basically, I want to know how to simulate while and if if I'm handling the control flow myself through an array of instructions. The while loop can be simulated by if, as seen with assembly branching ...
Lance Pollard's user avatar
0 votes
0 answers
272 views

Along the lines of How v8 JIT compiler manages dynamically changing variables, wondering how you would go about creating dynamically generated variables in assembly. Not necessarily looking for ...
Lance Pollard's user avatar
-1 votes
1 answer
863 views

I am writing a simple compiler. I have written lexer and parser and it now generates assembly code from given code. Now I need to write an assembler which generates machine code. But the problem is ...
Greatcode's user avatar
9 votes
2 answers
8k views

I've been reading about CPUs and how they are implemented, and some big complex architectures (looking at you x86) have instructions that load from memory during one clock cycle. Since one address ...
DylanG's user avatar
  • 135
-1 votes
1 answer
454 views

I've been working on a 24-bit virtual machine to help me learn more about computers and programming in general and was hoping to find a bit more information on memory mapped input/output and hardware ...
Grawprog's user avatar
9 votes
1 answer
3k views

Each data type must be aligned to a multiple of some number of bytes, for example a short int must be aligned to a multiple of 2 bytes, and an int must be aligned to a multiple of 4 bytes. But why ...
mahmoud_t1's user avatar
8 votes
1 answer
2k views

The following image shows where the sections of a process are laid out in the process's virtual address space: You can see that there is only one stack section (since this process only has one thread ...
joseph_m's user avatar
  • 335
1 vote
1 answer
420 views

I'm am trying to understand machine code memory addressing for x86, and I've encountered two opposing general forms for addressing (using the ModRM and SIB bytes). Most unofficial resources I consult ...
Joseph Johnston's user avatar
-10 votes
1 answer
13k views

I have to do a program to school in Assembler but we did just a few basic things. Is it possible to write code in Java and convert it to Assembler?
jankova0013's user avatar