Introduction

  • Assembly language programming is the first step to improving the programming structure.
  • As we know that machine language is very difficult to understand when a program or instruction is written in machine language. Therefore, each manufacturer of a microprocessor has developed a symbolic code for each education called a MNEMONIC.

Definition

  • When an instruction is written in the form of mnemonics and specifies the operations to be performed is called the Assembly Language.

Characteristics

  • The set of symbols and letters forms the Assembly Language.
  • A translator program is required to translate the Assembly Language to machine language is called an assembler.
  • Assembly language programming is considered to be a second-generation language.

Advantages

  • The symbolic programming of Assembly Language is easier to understand and saves a lot of time and effort for the programmer than machine language programming.
  • It is easier to correct errors and modify program instructions.
  • Assembly Language has the same efficiency of execution as machine-level language. Because this is a one-to-one translator between an assembly language program and its corresponding machine language program.

Disadvantages

  • One of the major disadvantages is that assembly language is machine dependent i.e., a program written for one computer might not run in other computers with different hardware configurations.

Software Requirements for Assembly Language

  • When working with assembly language, we’ll need a set of software tools to write, assemble, and test your code. The specific requirements can vary depending on the target architecture and the assembly language you are using (x86, ARM, MIPS, etc.).
  • Some common software requirements for working with assembly language are:-
    • Text Editor or Integrated Development Environment (IDE):
      • A text editor or an IDE is necessary to write the assembly code.
      • Popular text editor includes Visual Studio Code, Sublime Text, Notepad++, or specialized IDEs like NASM (Netwide Assembler, free), and IDE.
    • Assembler:
      • An assembler is a program that translates assembly language code into machine code or object code.
      • The choice of assembler depends on the target architecture.
      • For x86 assembly, NASM (Netwide Assembler) and MASM (Microsoft Macro Assembler) TASM(Borland Turbo Assembler), EMU 8086, GAS(GNU Assembler), etc. are popular assembler choices.
    • Compiler (Optional):
      • In some cases, we might use assembly language in combination with higher-level languages. In such cases, we may need a C or C++ compiler to compile the high-level code to link with our assembly code.
    • Debugger:
      • A debugger allows us to step through our assembly code, inspect registers and memory, and track down issues during program execution.
      • Many IDEs come with built-in debuggers, or we can use stand-alone debuggers like GDB (GNU Debugger) for Unix-like systems or WinDbg for Windows.
    • Emulator or Simulator:
      • Depending on the target architecture and hardware, we might need an emulator or simulator to test our code.
      • For example, if we’re writing code for an embedded system, we could use QEMU or SimulIDE.
    • Operating System and Hardware:
      • We’ll need a computer with the appropriate operating system and hardware for the target architecture we’re working on.
      • For example, if we’re writing x86 assembly code, we’ll need a compatible x86-based computer.
    • Documentation and Manuals:
      • Assembly languages often have specific instructions and conventions, so we’ll need access to documentation and manuals for the target architecture and assembler we are using.
      • Online resources, official manuals, and community forums can be helpful in this regard.

How to run/execute the Assembly program using TASM Assembler

Step 1: Install the TASM assembler software on the computer first(say in C drive as a TASM folder).

Step 2: Write the assembly code or program in any editor applications(such as Notepad or VS code). 

Step 3: Save the program with a certain name with .asm extension (say program1.asm) and store the file inside the TASM folder of the C drive that was created during installation.

Step 4: Open DOS/Command line(start-run-cmd-ok) and use cd\ to set C-prompt(C:\>).

Step 5: Now at, C:\> cd TASM (Enter).

Step 6: C:\TASM>

Step 7: C:\TASM> tasm program1.asm (Enter).

(If an error message has appeared with its listing, remove it first and save it again, and then re-run the program otherwise go to next step 8).

Step 8: C:\TASM> tlink program1.obj (Enter).

(Now single line optional message appears).

Step 9: C:\TASM> program1.exe (Enter).

(Now an output has appeared).

Loading


0 Comments

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.