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.

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.

169 questions
132
votes
17 answers

How does learning assembly aid in programming?

I have been programming in higher level languages (Python, C#, VBA, VB.NET) for around 10 years and I have completely zero understanding on what's going on, "under the hood." I am wondering what are the benefits of learning assembly, and how will it…
Alex Gordon
  • 495
  • 2
  • 5
  • 11
74
votes
9 answers

How were the first compilers made?

I always wonder this, and perhaps I need a good history lesson on programming languages. But since most compilers nowadays are made in C, how were the very first compilers made (AKA before C) or were all the languages just interpreted? With that…
user6791
70
votes
7 answers

Is this an assembly language?

In my childhood I used to program on an MK-61 Soviet calculator. It had four operating registers (X, Y, Z, T) and 15 storage registers. A program could have 105 steps. As I recall it, it had commands like: Swap X and Y registers Shift registers (Z…
defhlt
  • 608
  • 1
  • 5
  • 10
59
votes
12 answers

How Do Computers Work?

This is almost embarrassing ask...I have a degree in Computer Science (and a second one in progress). I've worked as a full-time .NET Developer for nearly five years. I generally seem competent at what I do. But I Don't Know How Computers…
Rob P.
  • 823
  • 2
  • 7
  • 11
57
votes
4 answers

Development process used for the code on Apollo 11 missions?

The Apollo missions had technology no more complicated than a pocket calculator. From link here, there's an information about Apollo Guidance Computer (AGC) The on-board Apollo Guidance Computer (AGC) was about 1 cubic foot with 2K of 16-bit RAM…
54
votes
11 answers

Were the first assemblers written in machine code?

I am reading the book The Elements of Computing Systems: Building a Modern Computer from First Principles, which contains projects encompassing the build of a computer from boolean gates all the way to high level applications (in that order). The…
The111
  • 713
  • 1
  • 6
  • 11
50
votes
4 answers

Why do we still grow the stack backwards?

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 base pointer or the stack pointer are actually…
alex
  • 499
  • 1
  • 4
  • 4
45
votes
5 answers

How can this all fit into 64kb?

So, I am here at assembly 2011 and there was this demo played: http://www.youtube.com/watch?v=69Xjc7eklxE&feature=player_embedded It's one single file only, it says that in the rules. So I repeat, how have they made this to fit into so small file?
Samuli Lehtonen
  • 627
  • 1
  • 5
  • 8
44
votes
15 answers

How have languages influenced CPU design?

We are often told that the hardware doesn't care what language a program is written in as it only sees the compiled binary code, however this is not the whole truth. For example, consider the humble Z80; its extensions to the 8080 instruction set…
Gaius
  • 646
  • 1
  • 7
  • 17
41
votes
1 answer

Frame Pointer Explanation

In MIPS assembly, there is a register for the stack pointer, and another register for the frame pointer. What is the frame pointer and what is its purpose? How does it differ from the stack pointer?
35
votes
13 answers

Low level programming - what's in it for me?

For years I have considered digging into what I consider "low level" languages. For me this means C and assembly. However I had no time for this yet, nor has it EVER been neccessary. Now because I don't see any neccessity arising, I feel like I…
back2dos
  • 29,980
  • 3
  • 73
  • 114
33
votes
11 answers

Is it wise for a high level developer to spend time studying assembly?

It is clear that the knowledge of low level stuff is very important in our work. But in a situation where you're already developing commercial software on a high level, and when you already have a chosen direction but don't have any assembly skill,…
zkaje
  • 433
  • 3
  • 6
27
votes
3 answers

Why is the copying instruction usually named MOV?

In quite many assemblers, a value copying instruction is usually named "MOV" and its description in manuals usually also contains "move" (however, other words can be used, like "load", "store", "extract", etc.) It's uncommon to find an ISA ) which…
Netch
  • 1,510
  • 13
  • 15
25
votes
5 answers

Is there a canonical book on x86 assembly?

There are lots of books on assembly. However, they usually deal with ISAs about which I don't care, such as MIPS or ARM. I don't deal with these architectures; there's no reason for me to try to learn them. But x86 assembly books seem...…
Billy ONeal
  • 8,073
  • 6
  • 43
  • 57
24
votes
3 answers

I want to build a Virtual Machine, are there any good references?

I'm looking to build a Virtual Machine as a platform independent way to run some game code (essentially scripting). The Virtual Machines that I'm aware of in games are rather old: Infocom's Z-Machine, LucasArts' SCUMM, id Software's Quake 3. As a…
Michael Stum
  • 1,778
  • 2
  • 17
  • 22
1
2 3
11 12