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.

Filter by
Sorted by
Tagged with
0
votes
0answers
14 views

Parallel Floyd-Warshall algorithm in Assembler - possible?

I want to implement parallel Floyd-Warshall algorithm in assembler. The FW algorithm is all about if and assign statements ...
1
vote
0answers
9 views

How does an assembler manage varying offsets when using a literal pool?

I am trying to write a simple multi-pass assembler. Wikipedia states that: Multi-pass assemblers create a table with all symbols and their values in the first passes, then use the table in later ...
1
vote
2answers
47 views

Why can't we compile 8086 Assembily for all OSs from any OS?

If Mac OS, Linux, and Windows (mostly) all use Intel's 8086 64 bit instruction set, why can't we compile 8086 64 assembly from any operating system to any other operating system? (e.g. compile a Mac ...
0
votes
0answers
24 views

Unbanked access, banked access and common memory access

What are they and what are their differences? Unbanked access Banked access Common memory access [EDIT] This question is originated from my reading of MPLAB XC8 PIC Assembler User's Guide where the ...
2
votes
0answers
13 views

Detecting Data and Control Hazards for a mips 5 stage pipeline

I'm practicing data and control dependencies, but having trouble detecting them. For this example, I'm assuming this pipeline is fully bypassed (with forwarding). I think the only data dependency is ...
0
votes
3answers
48 views

CPU Registers and Computation

How exactly does the control unit in the CPU retrieves data from registers? Does it retrieve bit by bit? For example if I'm adding two numbers, A+B, how does the computation takes place in memory ...
0
votes
1answer
49 views

Is it possible to modify the linux assembler in order to modify what fuctions do?

I was wondering if it were possible to modify the linux assembler in order to change the function of "-" to "+" and vice versa. I was also wondering if this would affect the whole system making it ...
2
votes
0answers
44 views

What is “orthogonality” in the context of Instruction Encoding?

What does it mean by "orthogonality" in the context of Instruction Encoding? Why CISC Architecture is orthogonal while RISC is not?
0
votes
0answers
42 views

Linker question in MIPS

The above is the example from section 2.12 Translating and Starting a Program from Computer Organization and Design, Fifth Edition, The Hardware/Software Interface, by David A. Patterson and John L. ...
0
votes
1answer
60 views

RAM and ROM confusion

we know RAM contains instruction for we ask computer to do operations we know ROM contains instructions which for computer to work does this mean RAM contains address of instruction sitting in ROM? ...
0
votes
1answer
65 views

Can a 32-bit processor work with a 64-bit size word?

In a 32-bit byte addressable memory system, each "row" has 4 bytes and each byte has a 32-bit address. My question is: can I read and/or write word of length 64 bits from/to memory? In other terms, ...
0
votes
0answers
19 views

Direct mapped cache example

i am really confused on the topic Direct Mapped Cache i've been looking around for an example with a good explanation and it's making me more confused then ever. For example: I have 2048 byte ...
8
votes
3answers
268 views

Are assembly languages untyped?

I'm writing my Bsc thesis about type systems of various languages and I want to have a short section about assembly languages. Initially I thought I'll bring up assembly as a counter example to ...
0
votes
1answer
212 views
1
vote
1answer
22 views

Names of power-of-two bit operations on bitsets that would not assume any number interpretation

Three commonly used functions when it comes to bit manipulation are : is_pow2: Checking that an integer is a power-of-two (only one bit is set): $00010000 \...
0
votes
2answers
75 views

Do compilers of high programming languages always compile them directly to machine code?

As an amateur Bash/JavaScript scripter who never wrote one sentence in Assembly, I ask: Do compilers of high programming languages always compile them directly to machine code, or are there cases ...
6
votes
7answers
780 views

Essential difference between Assembly languages to all other programming languages

I understand that any assembly programming language has so little abstraction, so that one who programms with it (OS creator, hardware driver creator, "hacker" and so on), would have to know the ...
2
votes
2answers
188 views

Does assembly language get translated to binary code? If so, is assembly language portable across machines?

I've tried to find the answer through Google but I've come across conflicting uses of terminology, so I just wanted to be absolutely clear. Here is my understanding: High level code written in a ...
2
votes
1answer
57 views

Understanding addition overflows when performing full, signed multiplication of two 64-bit numbers

I am close to solving question 3.59 from Computer Systems: A Programmer's Perspective 3rd Editionby Randal E. Bryant and David R. O'Hallaron, however I am having difficulties with understanding the ...
23
votes
7answers
6k views

Given a specific computer system, is it possible to estimate the actual precise run time of a piece of Assembly code

this is a piece of Assembly code ...
1
vote
3answers
595 views

How is an Assembly Language Processed by a CPU's Circuitry?

I'd like to have a bit more understanding of how, on a circuitry/hardware level, an assembler program works. I think I have a very broad-brush understanding of how a CPU would process machine code on ...
8
votes
2answers
2k views

Assembly writer vs compiler in VLIW architecture

I read this sentence in a book: In VLIW architecture, the compiler/and or assembly writer chooses instructions that can be executed in parallel. What is the difference between assembly writer and ...
2
votes
1answer
64 views

Prove that the next multiple of 4 is obtained using the next formula

I was reading an assembly procedure that needed to align addresses on 4 bytes boundary for performance reasons so it has used the next statement that i formulated as a theorem to be proven. Let $s$ ...
0
votes
1answer
43 views

The instructions a Stack Machine has

Trying to figure out which instructions a stack machine has, and wanted to clarify / reassure that these are in fact all of them. push onto stack ...
19
votes
6answers
8k views

Why do compilers produce assembly code?

Assembly language is converted in to machine language by assembler. Why would a compiler convert high-level language to assembly? Can't it directly convert from the high-level language to machine code?...