# Tag Info

Accepted

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

I can only quote from the manual of a rather primitive CPU, a 68020 processor from around 1986: "Calculating the exact runtime of a sequence of instructions is difficult, even if you have precise ...
• 25.4k
Accepted

### Assembly writer vs compiler in VLIW architecture

The "assembly writer" in that book is a human software developer who writes code in assembler language.
• 25.4k

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

You cannot do this in general, but in some senses, you very much can, and there have been a few historical cases in which you indeed had to. The Atari 2600 (or Atari Video Computer System) was one of ...
• 403

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

There are two aspects at play here As @gnasher729 points out, if we know the exact instructions to execute, it's still difficult to estimate the exact runtime because of things like caching, branch ...
• 29.2k

### Assembly writer vs compiler in VLIW architecture

In VLIW architecture, the compiler/and or assembly writer chooses instructions that can be executed in parallel The meaning of this sentence is that in VLIW architecture, assembler (machine) code ...
• 1,805
Accepted

### Essential difference between Assembly languages to all other programming languages

The two most obvious characteristics of an assembly language are: It is specific to a particular CPU architecture. There is a one-to-one correspondence between assembly language commands and machine ...
• 1,549

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

Assembler code describes instructions for one particular architecture. It is slightly helpful by allowing you to use human-readable names for instructions, names for memory addresses, doing some ...
• 25.4k

### Essential difference between Assembly languages to all other programming languages

The essential difference between assembly language and every other programming language is that assembly language specifies the sequence of instructions directly, whereas in any other language, the ...
• 270k

### How does a CPU do function calls?

Note that Turing machines don't have any function calls, and they work just fine as Turing machines. Function calls are not a necessity for Turing-completeness. All non-recursive function calls can ...
• 888

### Essential difference between Assembly languages to all other programming languages

(Warning, this historical account of increasing abstraction and declarative programming may annoy, confuse, or upset you:) Hello, world! By far and large, programing languages happen on a continuum, ...
• 169
Accepted

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

I've seen compilers that compile directly to object code. I've seen compilers that compile to assembler code. I've seen compilers that compile to byte code for a virtual machine. I've seen ...
• 25.4k

### Are assembly languages untyped?

Assembly language is normally untyped, in the sense that there is no type-checking. Adding type-checking is a non-trivial research challenge (hence the papers you see). Papers on typed assembly ...
• 143k

### Are assembly languages untyped?

Can we say that assembly is generally untyped? If you mean "assembly" as, e.g. x86 assembly language, then I think yes, to some degree. Types are some constraints that we can statically checked/...

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

An assembler is a program that reads assembly language commands and translates then into a sequence of binary instructions, addresses and data values that is called machine code. The machine code is ...
• 1,549

### Why do compilers produce assembly code?

Usually compilers work internally with sequences of instructions. Each instruction will be represented by a data structure representing it's operation name, operands and so-on. When the operands are ...
• 235

### Why do compilers produce assembly code?

Even platforms that use the same instruction set may have different relocatable object file formats. I can think of "a.out" (early UNIX), OMF, MZ (MS-DOS EXE), NE (16-bit Windows), COFF (UNIX System V)...
Accepted

### The instructions a Stack Machine has

There are dozens and dozens of stack machines out there in the wild, and they all have different instruction sets. So there's no single correct answer. Some people might consider using ...
• 6,940

### How does a CPU do function calls?

Is there a return address stack on the CPU (limited to memory on chip), or is it emulated in software at the assembler using regular RAM? Yes. Some processors do not have a stack (and need to ...
• 157

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

That translation isn’t done by the CPU when it executed the instructions. It is done a lot earlier, when a program called “assembler” translates the assembler instructions into sequences of bits that ...
• 25.4k

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

Would the choice of "computer system" happen to include microcontrollers? Some microcontrollers have very predictable execution times, for example the 8 bit PIC series have four clock cycles per ...

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

Back in the era of 8-bit computers, some games did something like that. Programmers would use the exact amount of time it took to execute instructions, based on the amount of time they took and the ...
• 1,121

### Are assembly languages untyped?

Many assembly languages do have certain features that could be considered static typing. Most often this is for making programming easier, rather than type checking. In many assembly languages you ...
• 626

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

You can think of a bitvector as a set, by giving names to the various bits. For example, if we name the bits in an 8-bit integer using the numbers $0,\ldots,7$ (where $0$ is the LSB and $7$ is the MSB)...
• 270k

### Essential difference between Assembly languages to all other programming languages

It makes sense to pay attention to formal grammars when talking about programming languages. Typical program in assembly language has very simple grammar, consisting mainly of following productions (I'...
• 2,977

### Essential difference between Assembly languages to all other programming languages

In an assembly language, you specify the sequence of instructions of your code. In other languages that are compiled, you specify the effect of these instructions, not the instructions themselves. The ...
• 25.4k
Accepted

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

Just what makes a processor a 32-bit processor? And what would 64-bit word/32-bit halfword mean in the context? There are processors allowing a single instruction ...
• 917

### RAM and ROM confusion

"ROM" stands for "read only memory". This usually means that you can read any location in ROM, but you can't change what is already in ROM. (Data in ROM is written when the ROM chip is constructed, ...
• 686

### CPU Registers and Computation

The CPU has direct access to registers. If A and B are already in the registers then the CPU can perform the addition directly (via the Arithmetic Logic Unit) and store the output in one of the ...
• 623
Accepted

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

Porting to a different operating system is about a lot more than the particular assembly language you use. Different operating systems have different system calls, different libraries, and different ...
• 143k