Skip to main content

Posts

Showing posts from January, 2024

How to use assembly language (tutorial up to hello world only)

  How to set up assembly language  Local Environment Setup Assembly language is dependent upon the instruction set and the architecture of the processor. In this tutorial, we focus on Intel-32 processors like Pentium. To follow this tutorial, you will need − An IBM PC or any equivalent compatible computer A copy of the Linux operating system A copy of the NASM assembler program There are many good assembler programs, such as − Microsoft Assembler (MASM) Borland Turbo Assembler (TASM) The GNU assembler (GAS) We will use the NASM assembler, as it is − Free. You can download it from various web sources. Well documented and you will get lots of information on the net. Could be used on both Linux and Windows. Installing NASM If you select "Development Tools" while installing Linux, you may get NASM installed along with the Linux operating system and you do not need to download and install it separately. To check whether you already have NASM installed, take the following steps − O...

How did lower level programming evolved into high level programming

  Were high compilers using lower-level language in the present day? In the past, writing compilers was done in the language being compiled, but nowadays, we usually use C or C++. Often, the initial development of a language is done in an existing programming language. Once the first compiler is relatively stable, it may be rewritten into the language that is being compiled . The process Assembly Language The Assembly Language, also known as assembler, was a language where programmers wrote mnemonics to represent machine code. This meant that they used more human-readable symbols to represent binary codes. The relationship between the instruction symbols and process was one-to-one from machine code to assembler. When the code was executed, the assembler converted it into machine code, which consisted of binary digits of 1s and 0s. To illustrate this, let’s use the example of computing the addition of two numbers represented by A = B + C, where the numbers (data) for B and C are sto...

How can we use lower level programming language in the present day

  Nowadays, a good compiler can produce faster and more space-efficient executable code than assembler code written by someone who lacks familiarity with the CPU's ultimate details. To generate optimal low-level code, the members of the compiler writing group responsible for code generation must be familiar with these details. Therefore, low-level programming remains relevant. Additionally, low-level programming is vital for devices with limited hardware resources. Each type of low-level programming language has a use such as  There are three types of low-level programming languages. The first one is the well-known Binary Code. It's the most basic type of language and is used in all information systems. It's very easy to use and you've likely seen it before. Binary code only uses the numbers 0 and 1 to form the code. The number 1 represents "everything" while the number 0 represents "nothing". The second type of low-level programming language is call...