Let's Assembly !
Tags: programming, watercooler, codenewbie, beginners
Published: 2022-10-02 12:35:49

Hey my DEV friends 🙋‍♂️ - Hope you're doing well and staying safe.

Assembly language is a low-level programming language designed to simplify the instructions fed into a computer's Central Processing Unit - for short CPU - We can say now that it's a human-readable
abstraction on top of machine code so you as a programmer don't have to count the ones and zeroes.

On my channel, I have a quick tutorial that shows you how to write a "Hello World" program - you can check it out.
I am also planning to create a series of assembly language tutorials that explains everything in assembly like memory segments, registers, etc..
{% youtube j--zbDv_2QQ %}

You have to know that the first assembly language was created by _**Kathleen Booth**_, she also designed the assembler and autocode for the first computer systems at Birkbeck College at the London University.

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/p1bs3jdrgn4b83m2f5ha.jpg)

Assembly language was used in 1947 for the all-purpose electronic computer, and over the next decade it evolved into many different formats to power the super computers of the day like the IBM 7090 which had a 20 million dollar price tag in today's dollars writing code. What's interesting here is that *Assembly* was standard until the emergence of high level languages like **fortran** a few years later however Assembly is still used today for direct
access to the bare metal hardware and to address low-level performance issues on device drivers and embedded systems.
Assembly also is used to run native software in a web browser via
WebAssembly.
You have to be aware of one important thing and that is: **each assembly language only works on a specific SCPU Architecture like ARM for apple silicon and Raspberry pi or x86 for intel chips.** 

You can check out my video 🙂, but just to tell how you can write a simple assembly program, you will need:

1- _An assembler_ : i.e The net wide assembler for X86 chips.
2- _An assembly program_, which is divided into three sections:
    a- **|the text section|** Contains the actual logic for the 
       program, it contains an entry point called start which is 
       where the code will start executing.
    b- **|the block starting symbol section|** Contains variables 
       that might change throughout the lifecycle of the app. 
    c- **|the data section|** This is where we can initialize
       constants or data that does not change to declare a constant 
       like a string. 

we start with a label then use DB for **D**efined **B**yte to place the _hello world_ string into memory by itself it doesn't do anything and to print it to the standard output we will also need it to length we can use equate to convert a symbol into a constant. The $ dollar sign will subtract the current position from the hello label providing the length of the string and now these constants can be referenced from the start label in the main program.

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/iv6mp88hxh7iyq5nizhp.png)

Each line of code contains an instruction along with one or more operands and there are hundreds of instructions built into the language.

Thank you for reading - maybe and watching - and I will see you in the next blog post.✌️🙂
Over and Out 👊- Bek.