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.

learn more… | top users | synonyms (1)

3
votes
3answers
8k views

Is there still any value in learning assembly languages today? [closed]

Specifically for a game programmer. If you really needed some assembly routines you could look for help, whereas back in the 80s/90s it was one of the mainstream languages. I read that compilers can ...
1
vote
2answers
2k views

What is the difference between Times and Dup in Assembly Language?

In a bootloader, the second last line is : TIMES 510-($-$$) db 0 Now, will this command also do the same : db 510-($-$$) DUP (0) If not why? I know what TIMES does, but its not mentioned ...
0
votes
0answers
48 views

In x86 assembly, is it better to use two separate registers for imul? [migrated]

I am wondering, mostly out of curiosity, if using the same register for an operation is better than using two. What would be better, considering performance and/or other concerns? Any tips for how to ...
3
votes
2answers
96 views

How does one structure an assembly-language project?

So, I'm taking a MIPS course after returning to school; and we're approaching the point where we begin on our final project. I've always been one for large, well-structured projects: lots of ...
5
votes
3answers
8k views

How do we go from assembly to machine code(code generation)

Is there an easy way to visualize the step between assembling code to machine code? For example if you open about a binary file in notepad you see a textually formatted representation of machine code....
0
votes
1answer
168 views

How assembler coverts to machine code 1 and 0 [duplicate]

I know that assembler is the one which converts to machine code. So here in 8085 instruction set LDA has opcode "3A". My question is how assembler convert mnemonics to opcode and finally to machine ...
1
vote
2answers
176 views

What are microcontrollers programmed in most in industry? C or Assembly? [closed]

So recently in school we have started programming klm25z boards using ARM Assembly. I was wondering if in most industry jobs, microcontrollers are really programmed in assembly over C. It seems to ...
18
votes
7answers
5k views

How do programmers deal with low level software development in high level languages?

I am somewhat new to programming and the best way I can ask this question is with an example. I know how to do basic things in Java and C#. Things like a small windows forms application or make a ...
4
votes
4answers
1k views

Why do some compilers generate direct machine code?

I was taking this course - CMU 18-447, Computer Architecture at Carnegie Mellon to brush my knowledge and concepts. They say that most of the machine level details and implementations are taken care ...
2
votes
3answers
133 views

Is there any low level way to get shifted or unshifted bits which results from bitwise operations?

I was playing with bitwise operations and a question about counting true bits of any positive integer value, so I solved the problem with bit shifting, so I just thought if there would be some way to ...
0
votes
3answers
94 views

Operation excution in terms of clock cycles

Typically for a single instrcution, 6 machine cycles are needed: FETCH instruction DECODE instruction EVALUATE ADDRESS fetch OPERANDS EXECUTE oepration STORE result My concern is regarding the ...
0
votes
3answers
132 views

Memory addresses and Assembly

I recently started reading about programming in Assembly. To my knowledge, in Assembly, a programmer, when storing and retrieving their variables, has to specify the address their variables are stored ...
51
votes
4answers
6k views

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 ...
32
votes
11answers
1k views

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

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 ...
1
vote
1answer
367 views

How to make absolute jumps relative?

Given I have x86 assembly code disassembled into a list of structures that fully describe it (opcode, regs, imm, etc.), how can I programmatically turn absolute jumps to relative jumps? Basically ...
-1
votes
1answer
58 views

Finding register parameters for system calls

By consulting various scattered tutorials and books, I've been able to learn that the 64-bit Linux "exit" system call is 60, and the status value is moved to edi. Similarly, "write" has call number 1, ...
6
votes
1answer
365 views

Does unused code affects the assembly after startup (Memory for example)?

Disclaimer: I come from a PHP background. In PHP, I could have thousands files, which are never loaded, if not needed, due to the autoloader feature (If some code is needed, it would be loaded) How ...
3
votes
2answers
190 views

What's the REAL benefit of using CDECL? (more specifically pushing instead of reg-ing)

So, I'm learning assembly, and I've come to know the ABIs and i got some basics tests working using the cdecl calling convention to use the c's stdlib under nasm. But I've seen other Calling ...
7
votes
1answer
125 views

Unit Testing: Assembler code and different architectures

I am currently unit testing some C code and I am faced with a problem: Within the code there are called functions that contain inline assembler code for the SPARC 8 architecture. Since I am doing ...
43
votes
5answers
17k views

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,...
6
votes
4answers
2k views

Is there much difference between X86 Assembly language on Windows and Linux?

I'm a complete beginner at Assembly, and my aim is to learn as much as I can to do with Assembly to one day I can reach expert level (I know I'm way off right now, but you never know). My only problem ...
3
votes
1answer
94 views

How to be sure that a certain code does not call interrupts?

Imagine that you have an object code file from an untrusted source. You want to run this code to know the result of its computation, and you want the code to perform fast, so setting up a whole ...
2
votes
2answers
125 views

Difference in endianness between operating systems [closed]

There is an assembler that I am writing that is located within the file asm.c located in this repository. It uses the instruction set located in the specs file to produce an output binary. (The ...
12
votes
1answer
23k views

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 ponter and what is its purpose. How does it differ from the stack pointer?
4
votes
7answers
1k views

Will hand-written assembly disappear? [closed]

Last week I was wondering, with compilers getting better and better at optimizing, will there be a point when there is no need for hand written assembly? Are there still specialized fields where the ...
0
votes
0answers
319 views

Writing Z80 table based assembler/disassembler

I have a long-term project: DIY computer with various processors. One of my wishes not only make hardware, but software too. So I started from assembler/disassembler for Linux, though there is a lot ...
8
votes
4answers
616 views

What are the key differences between low-level C development and higher level OOP development? [duplicate]

I have been using high-level OOP language (like C# and/or Java) for quite some time. I know patterns like the gang of four, can read and write code reasonably well and am considered a senior by his ...
-3
votes
2answers
443 views

Best x86 processor(computer) to learn computer architecture and assembly [closed]

I'm planning to build a computer as a hobby from scratch, with the least basic hardware possible in functionality so I can learn the basics of computer architecture and assembly language. I already ...
0
votes
0answers
54 views

IBM PC XT 5162 even and odd BIOS

I am writing a whole new BIOS, from scratch, for the 5162. The already existing BIOS is on chips U34 and U35. Normally, exactly one byte (the odd byte) should be on U34, followed by exactly one even ...
3
votes
3answers
2k views

Will an assembly language book for intel x86 processor be compatible with amd processors?

I'm wanting to get an assembly book to learn assembly, and was wandering if i get a book for intel x86 processor will there be any problems assembling the code on an amd processor?
19
votes
4answers
7k views

Why does Donald Knuth write TAOCP using assembly language?

I don't hate using assembly language, since I have written some in my os course. But obviously, assembly language lacks abstraction, you have to pay more attention to the details. Is assembly ...
1
vote
1answer
484 views

Assembly vs. algorithmic languages (like C, Algol, etc) [duplicate]

Usually, computer science papers describe algorithms in Algol-like pseudolanguage, similar to Pascal or even C/C++. But Donald Knuth uses his own assembly language (MMIX). Are there any good known ...
37
votes
11answers
11k views

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 ...
17
votes
6answers
11k views

Is Assembly still relevant? [closed]

Are there major differences between assembly language and higher level languages when it comes to coding and/or managing projects? Obviously it takes more statements in assembly language to carry out ...
65
votes
9answers
14k views

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 ...
17
votes
6answers
3k views

What came first, the compiler, or the source?

I'm curious about the birth of the compiler. How did programming begin? Did people first build hardware that recognized a certain set of commands, or did people define a language and then build ...
12
votes
12answers
18k views

Assembly as a First Programming Language? [closed]

How good of an idea do you think it would be to teach people Assembly (some variant) as a first programming language? It would take a lot more effort than learning for instance Java or Python, but one ...
-1
votes
1answer
84 views

SPARC and Assembly [closed]

I'm currently self teaching myself programming and became familiar with Python, Java and C and I'm confused as to what are the differences between Assembly and SPARC Assembly and whether or not I ...
126
votes
18answers
39k views

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 ...
0
votes
10answers
833 views

Assembly in a research paper

I am doing a research paper on programming, and I need to somehow explain assembly... I've never learned the language, but I understand what it is used for and kinda what it looks like... MOV A,47 ...
4
votes
2answers
395 views

Why was the AT&T assembly syntax designed this way?

The AT&T assembly syntax, often called the GAS syntax, keeps surprising me. For example, its parameter order: mov $100,%eax /* Destination after source */ This just seems so counter-intuitive! ...
3
votes
1answer
305 views

Can SSE (or AVX) be used to do large bsf?

I'm faced with having to do a bsf (find the first bit set) in a 512bits bitmap. This is in the hot path so I'd like to see how I can speed things up. Right now I'm maintaining a header entry to know ...
0
votes
0answers
86 views

How does a .COM file get loaded for execution

For a bit of fun I thought I would start writing my own emulator for the 80286. I have been reading a bunch about the topic. I thought for simplicity I would start with a really simple COM executable ...
15
votes
5answers
6k views

Advice for an ambitious student on building your own kernel [closed]

I'm a very ambitious university student who wishes to learn pretty much everything there is to know about computers (bash me if you want, I love learning). Recently I thought it would be a fun project ...
-1
votes
1answer
288 views

Longest x86 Instruction

I read the recent article "Longest x86 Instruction" http://blog.onlinedisassembler.com/blog/?p=23 I attempted to reproduce the curious disassembly issue on a Win7x86 development platform using masm ...
2
votes
3answers
243 views

8085 assembly question. Why flag stacks named d0-d7?

I'm trying to make my C programming exciting by learning assembly programming. I've encountered an image of flag registers in 8085 assembly programming. In that image blocks are named from d0-d7(...
-1
votes
2answers
125 views

How were assemblers created straight from binary? [duplicate]

How did these earlier programmers know what combinations of binary produced certain results? Is there a way I can create an assembler from binary today?
1
vote
1answer
190 views

Implementing a VM for simulation [closed]

I am aware of this question, and I think I know why it has been closed. I hope that my question manages to be more specific. My skill level: I have a "Computer Science" degree. I have programmed in ...
42
votes
15answers
10k views

How have languages influenced CPU design? [closed]

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 ...
2
votes
1answer
396 views

Developing a compiler for a self made CPU Architecture

Recently ive been consumed by creating my own simple CPU architecture that at some point could be easily implemented in hardware (No FPGA, but actual Logic Gate circuits). Naturally to fulfill this ...