What is Assembly language: Definition and 50 Discussions

In computer programming, assembly language (or assembler language), sometimes abbreviated asm, is any low-level programming language in which there is a very strong correspondence between the instructions in the language and the architecture's machine code instructions. Because assembly depends on the machine code instructions, every assembly language is designed for exactly one specific computer architecture. Assembly language may also be called symbolic machine code.Assembly code is converted into executable machine code by a utility program referred to as an assembler. The conversion process is referred to as assembly, as in assembling the source code. Assembly language usually has one statement per machine instruction (1:1), but constants, comments, assembler directives, symbolic labels of program and memory locations, and macros are generally also supported.
The term "assembler" is generally attributed to Wilkes, Wheeler and Gill in their 1951 book The Preparation of Programs for an Electronic Digital Computer, who, however, used the term to mean "a program that assembles another program consisting of several sections into a single program".Each assembly language is specific to a particular computer architecture and sometimes to an operating system. However, some assembly languages do not provide specific syntax for operating system calls, and most assembly languages can be used universally with any operating system, as the language provides access to all the real capabilities of the processor, upon which all system call mechanisms ultimately rest. In contrast to assembly languages, most high-level programming languages are generally portable across multiple architectures but require interpreting or compiling, a much more complicated task than assembling.
The computational step when an assembler is processing a program is called assembly time.

View More On Wikipedia.org
  1. S

    2’s Complement Hexadecimal Addition

    The solution (green arrow) states that for example : 0xD + 0x9 = 0x16 Details : 0xD = 13, 0x9 = 9, 13 + 9 = 22, 22 = 0x16 Where does the 0x16 come from? I do get to add D + 9 = 13 + 19 = 22 so how come 22 is equal to 16 (assuming D + 9 = 16 is correct) How am I suppose this solution?
  2. C

    Help with this emu8086 assembly language problem please

    Summary:: my code has been successfully showing the right decrement of the letter. however, i tried to put space in between the letter output but its output became repititive letters. this is the original output when i try to put space it become like this i want to put spaces on the output...
  3. Margarita0076

    Engineering MIPS - Fibonacci Series: Main and fib function

    Write and test the fib function in two linked files (Fib.asm, fib_main.asm). Your solution must be made up of a function called fib(N, &array) to store the first N elements of the Fibonacci sequence into an array in memory. The value N is passed in $a0, and the address of the array is passed in...
  4. Margarita0076

    Engineering Assembly Programming (MIPS): Convert BCD to Decimal

    I have this code which convert decimal number to binary number, but I do not understand how representation 8762 like 1000 0111 0110 0010. 8 7 6 2 1000 0111 0110 0010 .data strmsg: .asciiz "please Enter a decimal number: " .text #main method .globl main #main function main...
  5. P

    Comp Sci MIPS assembly language homework

    All I have is li $t0, 0xaaaaaaaa li $t1, 0x24924924 move $s0, $t0 Because I think it is best to hardcode them in.
  6. S

    Which resources are best for learning assembly language as a beginner?

    So I made it one of my projects to learn assembly language. Hoo boy. Started looking through online pdfs and some are extremely advanced jumping into like 5 different developing environments and others assume I'm dumb as a nut and don't even know binary representations of numbers or simple logic...
  7. hapypy_09

    How to write a program to transfer any number to hexadecimal?

    Summary:: I have a homework " Write a program to input a number from the keyboard, printing the above screen on base 16 (hexadecimal) system". But I don't know how it works. I find it on the Internet but it only have convert from base system 10 to base system 16. And it is written in assembly...
  8. david2

    Is assembly language still being used?

    You guys still use assembly when programming these days?
  9. E

    Trouble with Extended Multiplication in LC-3 Assembly

    Homework Statement So basically, I have to implement the algorithm given in the relevant equations section. Homework Equations The Attempt at a Solution First and foremost, my code. Some bits that weren't directly relevant to the problem I'm having were removed for readability's sake...
  10. E

    Moving LC-3 P.C. more than 256 Hex addresses down? [Binary]

    Homework Statement I'm writing a program in binary on the LC-3. The program counts the occurrences of a specific character in a file. Relevant excerpts from the assignment instructions: 1) Download the source code for Figure 5.17 from the textbook webpage as code1.bin. Code x3000 as the...
  11. ChrisVer

    Assembly language programming vs Other programming languages

    I was having a morning look into assembly language videos and stuff and I was wondering: how much faster is assembly compared to some higher-level programming languages (like C or C++ or python)? And also why is it faster than those languages? I mean a general C++ source code should be...
  12. phinds

    Insights Computer Language Primer - Part 1 - Comments

    phinds submitted a new PF Insights post Computer Langauge Primer - Part 1 Continue reading the Original PF Insights Post.
  13. J

    Assembly Language Textbooks - OPCodes, Registers & Tables

    hi everyone, i was wondering if you guys had any textbook recommendations on the subject of assembly language (8088 and 8086) that focuses more on opcodes, register status tables, etc rather than programming in assembly. I have been using kip irvine assembly textbook but that focuses more on...
  14. T

    I have some problems with LC -3 assembly language

    Hi guys, I'm new to this language. When studying I'm really confused and don't know where to start, even with a simple example. I have read the book Introduction to Computing System but it doesn't help much. Can you show me some ways or books that can help me ?
  15. Khaled Kord

    Assembly language problem [repost using template :D]

    Homework Statement given that f,g,h,i and j are assigned to registers s0,s1,s2,s3 and s4 and the base addresses for the arrays A,B are in s6,s7 convert this C statement to assemply language: B[8] = A[i-j]; Homework Equations none The Attempt at a Solution image attachedi attached both...
  16. M

    Adding 2 and 3 digit capacity for assembly program

    I have the following program. I cannot figure out how to Add two-digit input and three-digit output capacity to it though. ; This program is designed to demonstrate the use of subroutines in ; programming. ; This file is phase 3 and introduces a multiply subroutine. ; Current support...
  17. A

    Write PEP8 Code: Display Full Name & Major

    Homework Statement You are to write a program that will display your full name and your major (First Name, Middle name and Last Name) on the Terminal Input/output (I/O) screen.[/B] Homework EquationsThe Attempt at a Solution I was trying to get the screen to say "What's your first name?"...
  18. thankz

    What is the best 64 bit assembly book for beginners on a budget?

    I need a good 64 bit assembly book for beginners, can you recommend one, I'm kinda short on cash so I can only afford one. I have a few 32 bit books like -Linux assembly, high level assembly, and peter nortons assembly but I got to admit they aren't very good. I want to play around with...
  19. JJBladester

    Assembly Language: Determining an effective address

    Homework Statement If EAX contains 00000200H, EBX contains 00000003H, and the data segment contains 1000H, what is the effective address generated by this instruction? MOV ECX,[ESI][EDI] The Attempt at a Solution I know that an effective address is created by adding the data segment...
  20. A

    Assembly Language Programming under Mac OS X

    I want to start with assembly language programming after some years with C, cause I think it's a good way to learn how a computer actually works. But how I can compile assembly code under Mac OS X? I went to a library, and I had found out that many books are outdated, and no book covers...
  21. T

    Transferring memory/bytes in assembly language

    Hi Everyone, Trying to write some assembly code by just first working out some pseudo to get a basis down for a program which transfers N bytes from m amount different sources, whose sizes are N bytes to m amount different destinations. So far, I've been trying to simplify what it wants...
  22. L

    I want to learn Assembly Language ?

    I want to learn Assembly Langauge ... ? Hi. I want to learn Assembly language. My goal is to eventually be able to program fluently in Assembly language. I know this will take a lot of work, but that's fine with me. Currently, I know the basics of how a CPU reads strings of...
  23. M

    Assembly Language homework help

    Homework Statement I'm having hard time appreciating this topic since they're not discussed well and, as of now, I still don't have resources or sample programs. We're required to display Az By Cx . . . Yb Za including spaces using DOS debug. Homework Equations The Attempt at a Solution...
  24. M

    Assembly Language: How to make a loop skip the first line?

    Hello, so i have a problem with my assembly code. I want to clear the screen of the DOS and display the string input in the first line. I decided to make a loop that will run 2000 times and fill the space with [20H, which is the ascii for space bar] however, It clears out my message as well and...
  25. R

    Arrays and recursion in mips assembly language

    Homework Statement Write a MIPS assembly language program that accomplishes the following tasks: 1. The program will prompt the user to enter an Integer between 1 and 10. If the entered number doesn’t satisfy the above condition, use a loop and prompt the user for a new entry (until a valid...
  26. C

    Assembly language program for PIC16F84: for a specific function.

    I'm using a PIC16F684.. Can someone help me write an assembly language program that switches on LEDs 0 to 7 in binary. There has to be a delay of 1 second between the change. Thanks,
  27. reddvoid

    Should I Learn Assembly Language or C for New Atmega328 Board?

    I got new atmega328 board should i learn assembly language first or jump directly to programming with C ? is knowing inside architecture necessary for programming micro controller using embedded c ?
  28. pairofstrings

    Optimizing Code for Domain-Specific Connections and Data Structures

    Hello everyone. I have lot of extra time. So, I thought why don't I do some pure assembly language programming. So, basically, first I want to target 80x86 architecture processor. And get solid idea and understanding on programming through pure Assembly language. I don't want to learn assembly...
  29. E

    PIC18F4550, A/D Interrupts, Assembly Language

    1. What I am trying to do I am attempting to make a PIC18F4550 use A/D interrupts to blink an LED at RA1. [Interrupt LED] The frequency of the blinking LED is determined by a potentiometer linked to RA0. To gauge when the loop is outside of the interrupt routine, I have added an LED at RA2...
  30. I

    How do I write a program in Assembly Language?

    Please help me to write the following program:
  31. K

    Programming in Assembly Language

    Hi, I've never programmed before but I recently downloaded the book "Programming from the Ground Up" and I plan to start studying it in 2012. I've heard that many programmers who learn to program in Assembly don't see a need to use anything else besides this programming language. Is this...
  32. M

    Pc based digital clock via parallel port using assembly language in tasm

    hi, i have this project and we already have a code and the circuit but it is not working.. it's supposed to display the hours and minutes the problems are: 1. the hour display is not displaying anything 2. the minute displays but it is advanced by one minute so here's the code: TITLE CLOCK.ASM...
  33. S

    Help in assembly language study

    hi i wish everyone in good health this semester I am studying Assembly language .. and our lecturer in my university is not good at teaching .. so i hope some one helps me to online ppt lectures or videos or any website .. that i can study assembly language step by step ... thanx alot
  34. pairofstrings

    Assembling & Running a Program in DOS: MASM/NASM/TASM

    How to write assembly language program in DOS environment? I want to type my assembly language program in some interface and compile and link and execute it. How do I do that? Should I use one of those Masm/Nasm/Tasm assemblers or what?
  35. I

    Computer Science: Assembly Language Program

    Write an assembly language program that uses ten memory locations (variables) filled with 0, starting at Address 30, and that stores the values 2, 4, 6, 8, 10, 12, 14, 16, 18, 20, and 22 in them. Your program will store 2 at Address 30, 4 at address 31, 6 at address 32, etc. Your program must...
  36. C

    How to Compare Array Elements with a Constant in Assembly Language

    Hi, I want to ask.. suppose I have an array and a constant called threshold in my data segments array db 1,2,3,4,5,6 threshold equ 5 I want to compare my array elements with the constant, and only display/print the number which is less that the threshold, if there are none, display the...
  37. M

    Programming pic microcontrollers using assembly language

    i need a good reference or book that teaches programming pic microcontrollers using assembly language, any help?
  38. M

    Assembly language question

    when outputing data to the parallel port, after the execution of the program, and when it terminates, what happens to the data that was at the parallel port's pins? do they still the same, or do they change immediatley? and inside the program, does changing the data in AL, changes the output...
  39. M

    Understanding Assembly Language: Solving AX Contents with MOV Command

    DS = 1342, SI = 0111. I'm trying to figure out the contents of AX after this command? MOV AX, [SI] Can someone point me in the right direction?
  40. K

    Assembly language. conversion.

    Assembly language. how to change the 80h in my register to 50h? that goes to others to. like 45h to 2Dh. basically, i came up with a sequence to change the user's double digit decimal input to hex value. i.e. when i enter 45, AL = 45h how do i change it to 2Dh?? ; al = 45h. how to...
  41. D

    MSP430 Assembly Language Pythagorean Theorem HELP

    The problem statement given is this: Write a PUBLIC function in MSP430 assembly that implements the Pythagorean theorem A^2 + B^2 = C^2. Make A and B 16bit integers. What size should you make C? Your function must use the HW multiplier's multiply and accumulate feature. Also write a brief...
  42. K

    Assembly language: Why wouldnt my code work the way i want it to?

    this is my code to convert lower case strings to upper case. i want to ask the user whether to continue or not. but no matter what i type, the prog keeps stoping. try to copy paste this code to ur emulator and u'll know what I am saying. also, how should i replace the include 'emu8086.inc'...
  43. N

    Solving ARM Project Manager Problem with 54 Integers Array

    Alright I have a problem where I have no idea how to do it. It uses ARM Project Manager to perform the program. Here it is: A sequentially numbered array of 54 integers has to be defined. The array should be initialized with some values in a loop, incorporated in a separate subroutine...
  44. M

    Learn Assembly Language on Microprocessors Fast

    Hey guys I am in the process of learning assembly language on microprocessors and I am progressing slowly.So please if there is anyone, anyone who can recommend something to speed up the process, I am running out of time. I ask for links textbooks or anything that can help. thank you in...
  45. C

    Need help programing in assembly language

    *****need help programing in assembly language***** Hi there everyone. I am really new to this assembly language and i don't know how to code this simple programe.. Please help me with this. I would very much appreciate it.. here is the question.. Need to design assembly language...
  46. J

    Assembly Language for electrical engineering

    I am an undergraduate student and I believe that I will probably major in electrical engineering. So my question is should I take the time to learn x86 assembly? I already know how to program in C++ well enough, but I really haven't done much with asm. I would like to get a microcontroller and...
  47. B

    Assembly language coding problems .

    Assembly language coding problems... Homework Statement I am an electrical engineering student and have some HW problems. On the IAS system, what would machine code instruction look like to load the contents of memory address 2?? I came up with 00001001. Does this look correct?? Also...
  48. A

    Assembly language time delay

    I need to write a program that will create a constant time delay in x86 assembly, can anybody help?
  49. C

    Where to Find Comprehensive Turbo Assembly Language Resources?

    Can anyone show me how to get good reference materials for Turbo Assembly language for DOS applications? Any complete reference tutorial websites or reference books woul be sufficient. I have been googling and yahooing but still cannot find one good reference. Thanks.
  50. M

    Assembly language programming?

    I'm working on a project that I believe should be pretty simple to do if I actually knew assembly language. For my program I'm suppose to start at data memory location 0x30 and perform the increment, decrement, complement, and clear operations. The operations are all performed on location...
Back
Top