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.
170
questions
-4
votes
0
answers
56
views
Confusion regarding content in pictures for branching micro-operation [closed]
Picture 1
About branching micro-operation.
Picture 2
Reference architecture for micro-operations.
Confusion:
MAR <- IR (address) & DR <- PC (Both micro-operations can be performed in ...
0
votes
2
answers
203
views
Why does jl test for the second operand of cmp to be less than the first, instead of the other way around?
Something like this
cmp $0, %eax
jl exit
jumps to the exit: label if the content of register eax is less than 0.
So it's kind of jl applies the < operator to the operands of cmp, but in reverse ...
-1
votes
1
answer
108
views
Debugging miscompile [closed]
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 ...
6
votes
3
answers
1k
views
How does a JIT compiler actually emit and then call the emitted native code?
Assuming that a VM runs a JIT compiler on otherwise "interpreted" code, such as a line by line interpreter or some form of bytecode/IL code and determines that it can create optimised native ...
-3
votes
1
answer
384
views
When making a compiler, what's the best way for compiling to machine code in the backend? [closed]
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,...
-5
votes
2
answers
148
views
Archival-quality future-proof pseudo-CPU architecture
Suppose we maintain a massive electronic library of texts/photos/videos etc., and want to ensure that these files are readable indefinitely long in the future. [Update] one of the major problems with ...
0
votes
2
answers
167
views
Where to put files (interfaces) that link two independent assemblies: Authentication and Main Program
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 ...
2
votes
1
answer
368
views
How do these two ways of enforcing alignment work together?
In Computer Systems: a Programmer's Perspective,
Alignment is enforced by making sure that every data type is
organized and allocated in such a way that every object within the
type satisfies its ...
-1
votes
3
answers
231
views
Is an assembly program a procedure itself and does it occupy a stack frame?
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 ...
-1
votes
1
answer
87
views
What specifies the agreement (i.e. the convention) of which registers are used to pass which arguments and to return which values?
In Computer Systems: a Programmer's Perspective:
procedure calls may involve
passing data as arguments, and returning from a procedure may also
involve returning a value. With x86-64, most of these ...
0
votes
2
answers
350
views
Do differences between ATT and Intel formats of assembly languages come from differences between their underlying machine languages?
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 ...
0
votes
3
answers
193
views
Does the assembler perform the same tasks as the translator from C to assembly?
When compiling C programs to assembly programs and then to machine programs, does the assembler (e.g. the one used in GCC or other popular C compilers) perform the same tasks as the translator from C ...
-3
votes
2
answers
232
views
Why will it take approximately 2 years for Apple to transition Mac to ARM? [closed]
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 ...
-2
votes
3
answers
176
views
If you're building an algorithm from the C stdlib in pure Assembly (with no help), what is the best workflow for debugging/iterating?
I am a JavaScript developer mainly, so I am familiar with object-oriented code and dealing with things you can see easily and interact with, like the GUI, even HTTP requests, etc. Plus you can put ...
10
votes
1
answer
3k
views
Why is Assembly Language called "Assembly"?
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 ...