Skip to main content

Questions tagged [assembly]

Programming questions are off-topic here. Do not ask questions about how to write code in assembly. However, conceptual questions about how coding in assembly is different may be appropriate. See our help centre for the scope of this site.

0 votes
2 answers
63 views

On a micro-architectural level, why is using a temporary variable faster than using XOR to swap two variables?

I've done some very basic bench marking for the following: ...
Joshua Singla's user avatar
0 votes
0 answers
66 views

Binary addition and declare the Register Flags X86

I'm trying to solve a question that asks me to find the sum of two Hexadecimal (16 base) values and then set the X86 Register Flags such as SF,...
Zeroday's user avatar
10 votes
2 answers
2k views

Purpose of the IRQ on a 6502

I've been researching the NES lately. Why does the IRQ/BRK Instruction exist on the 6502? All it seems to do is say "no more IRQs," jump to a random ROM address, and store the current state. ...
Anonymous Coder's user avatar
0 votes
1 answer
79 views

Assembly question ISA

I am studying for a exam in Computer Architecture and one of the exercises says this: write the assembly code which calculates the equation of D=(A+B)/4+C.The ISA of the processor has the following ...
Root Groves's user avatar
1 vote
0 answers
52 views

How to characterize software on hardware without having to run it?

To provide context, we are trying to characterize software in order to identify similarities between them and create clusters of similar software. When you can execute the software, the problem ...
Javier Jareño's user avatar
3 votes
1 answer
1k views

How to allocate memory in NASM without C functions (x64)?

So I'm using NASM on linux and I was curious how this is done. All the info I can find online uses functions from C like malloc(). Can this be done purely with assembly code? Perhaps via a system call?...
Lonely Lad's user avatar
3 votes
1 answer
244 views

Patterson & Hennessy, Computer Organization and Design, 5th edition, Question for Ex. 2.3

I am stumbling over the Exercise 2.3 of Chapter 2, i.e.: For the following C statement, what is the corresponding MIPS assembly code? Assume that the variables f, <...
lordsnyder's user avatar
1 vote
1 answer
140 views

What are the most minimalistic assembly's mnemonics to make complete turing machine?

Disclaimer: I'm a computer engineering student, not a computer science. Pardon me for mistakenly using computer science terms. I want to design computer architecture with the most minimalist design as ...
Muhammad Ikhwan Perwira's user avatar
0 votes
3 answers
142 views

How Many Times Would The Assembler Load and Store i

So, this is a snippet of a C code: for (i = 0; i < 20; i++) { a[i] = rand() & 0xFF; printf("a[%d]: %d\n", i, a[i]); } Now, imagine "i&...
River Uzoma's user avatar
2 votes
1 answer
196 views

Calculate the CPI of a program

...
First_1st's user avatar
0 votes
1 answer
161 views

How do you tell whether a binary number is positive or negative?

Consider the figure in Exercise 2. If the current machine code that executes is 0x214bfffd and the values of the registers in the processor are as shown below, what is then the value of the input WD3 ?...
First_1st's user avatar
0 votes
1 answer
82 views

What is the reason or advantage of having special purpose status flags for the result of comparisons? [duplicate]

The C semantics treat the result of a comparison or any true/false operation as just an int ...
CPlus's user avatar
  • 209
0 votes
2 answers
2k views

How do you convert this x86 assembly program to binary

I'm trying to convert a x86 assembly language program to binary. I have read a 1979 Intel 8086 manual and so understand the basic architecture, however I am still unsure as to how to convert this. ...
Hannah's user avatar
  • 1
7 votes
6 answers
4k views

How AlphaDev improved sorting algorithms?

On the 7th of June 2023, Google DeepMind released an article about AlphaDev. AlphaDev is an evolution of AlphaZero (used to beat world champions at Go, Chess and Shogi), and it can produce assembly ...
nico263nico's user avatar
0 votes
0 answers
178 views

I'm having trouble storing the value in R0 into the correct memory location (LC-3 Assembly)

Here is my LC-3 Assembly code. It is designed to add up the 10 values in x3100 through x3109 and store them in x310A. It correctly adds the values, storing the total in R0, however I cannot seem to ...
Leo's user avatar
  • 1

15 30 50 per page
1
2 3 4 5