Assembly is the lowest level human-readable programming language. Today, it is used for precise control over the CPU and memory on the bare metal hardware of a computer. Learn the basics Assembly with NASM in 100 Seconds. 

#compsci #programming #100SecondsOfCode

🔗 Resources

NASM Assembler https://www.nasm.us/
x86 Assembly Guide https://www.cs.virginia.edu/~evans/cs216/guides/x86.html
How a CPU Works https://youtu.be/vqs_0W-MSB0
WASM in 100 Seconds https://youtu.be/cbB3QEwWMlA

📚 Chapters

🔥 Get More Content - Upgrade to PRO

Upgrade to Fireship PRO at https://fireship.io/pro
Use code lORhwXd2 for 25% off your first payment. 

🎨 My Editor Settings

- Atom One Dark 
- vscode-icons
- Fira Code Font

🔖 Topics Covered

- What is Assembly Language?
- What are registers on a CPU?
- Assembly language basics tutorial
- How to say hello world in assembly
- Who invented assembly language?
- Assembly vs Machine Code
- x86 vs ARM architecture
2024-02-04T05:28:44.562Z
nova-2
2-general-nova
2024-01-09.29447
30089e05-99d1-4376-b32e-c263170674af
4206cfa5-2681-47f5-b16d-bae9b95092b4
da185e9c65bd0a8437d5ba379e804b79a9d39e4601ebad349ae986ca1d6a96bd
67875a7f-c9c4-48a0-aa55-5bdb8a91c34a
deprecated
Assembly, a low level programming language designed to simplify the instructions fed into a computer's CPU.
In other words, it's a human readable abstraction on top of machine code, so programmers don't have to manually count ones and zeros.
The first assembly language was created by Kathleen Booth in 1947 for the all purpose electronic computer.
Over the next decade, it evolved into many different formats to power the supercomputers of the day, like the IBM 7090, which had a $20,000,000 price tag in today's dollars.
Writing code in 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, often on device drivers and embedded systems, and it's also used to run native software in a web browser via web assembly.
What's tricky is that each assembly language only works on a specific the CPU architecture, like ARM for Apple Silicon and Raspberry Pi, or X86 for Intel Chips.
To get started, you'll first need an assembler, like the Net White assembler for X86 Chips.
An assembly program is divided into 3 sections.
The text section contains the actual logic for the program.
By convention, it contains an entry point called start, which is where the code will start executing.
Next, we have the block starting symbol section, which contains variables that might change throughout the life cycle of the app.
And finally, the data section 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 d for define byte 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 its 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 reference from the start label.
In the main program, each line of code contains an instruction along with 1 or more operands, and there are hundreds of instructions built into the language.
Now to perform machines.
Quickly, the CPU has a limited number of registers, which are like 64 bit chunks of memory built directly into the CPU instead of the RAM.
We can insert data into a register with with the move instruction by providing operands for the register name and the data to store there.
In this case, number 1 is used because it corresponds to the machine's system write on Linux.
Next, we need to tell the system where to write, in which case we'll move 1 into the r d I register, which corresponds to the standard output in terminal.
The next register stores the message to write along with its length.
Now execute the code stored in the CPU by calling the operating system kernel.
Almost machine's done, but we'll get a segmentation fault if we try to run it at this point.
Update the racks register with 60 for system exit and provide an error code of 0 for success.
Chess.
Now use the assembler to compile or assemble your code into an object file, then use the linker to convert it into the final executable.
This has been assembly language in 100 seconds.
If a machine.
If you wanna see more short videos like this, hit the like button and subscribe.
Thanks for watching, and I will see you in the next one.

Speaker 0: Assembly, a low level programming language designed to simplify the instructions fed into a computer's CPU. In other words, it's a human readable abstraction on top of machine code, so programmers don't have to manually count ones and zeros. The first assembly language was created by Kathleen Booth in 1947 for the all purpose electronic computer. Over the next decade, it evolved into many different formats to power the supercomputers of the day, like the IBM 7090, which had a $20,000,000 price tag in today's dollars. Writing code in 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, often on device drivers and embedded systems, and it's also used to run native software in a web browser via web assembly. What's tricky is that each assembly language only works on a specific the CPU architecture, like ARM for Apple Silicon and Raspberry Pi, or X86 for Intel Chips. To get started, you'll first need an assembler, like the Net White assembler for X86 Chips. An assembly program is divided into 3 sections. The text section contains the actual logic for the program.

By convention, it contains an entry point called start, which is where the code will start executing. Next, we have the block starting symbol section, which contains variables that might change throughout the life cycle of the app. And finally, the data section 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 d for define byte 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 its 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 reference from the start label. In the main program, each line of code contains an instruction along with 1 or more operands, and there are hundreds of instructions built into the language. Now to perform machines.

Quickly, the CPU has a limited number of registers, which are like 64 bit chunks of memory built directly into the CPU instead of the RAM. We can insert data into a register with with the move instruction by providing operands for the register name and the data to store there. In this case, number 1 is used because it corresponds to the machine's system write on Linux. Next, we need to tell the system where to write, in which case we'll move 1 into the r d I register, which corresponds to the standard output in terminal. The next register stores the message to write along with its length.

Now execute the code stored in the CPU by calling the operating system kernel. Almost machine's done, but we'll get a segmentation fault if we try to run it at this point. Update the racks register with 60 for system exit and provide an error code of 0 for success. Chess. Now use the assembler to compile or assemble your code into an object file, then use the linker to convert it into the final executable.

This has been assembly language in 100 seconds. If a machine. If you wanna see more short videos like this, hit the like button and subscribe. Thanks for watching, and I will see you in the next one.
Assembly, a low level programming language designed to simplify the instructions fed into a computer's CPU. In other words, it's a human readable abstraction on top of machine code, so programmers don't have to manually count ones and zeros. The first assembly language was created by Kathleen Booth in 1947 for the all purpose electronic computer. Over the next decade, it evolved into many different formats to power the supercomputers of the day, like the IBM 7090, which had a $20,000,000 price tag in today's dollars. Writing code in 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, often on device drivers and embedded systems, and it's also used to run native software in a web browser via web assembly. What's tricky is that each assembly language only works on a specific the CPU architecture, like ARM for Apple Silicon and Raspberry Pi, or X86 for Intel Chips. To get started, you'll first need an assembler, like the Net White assembler for X86 Chips. An assembly program is divided into 3 sections. The text section contains the actual logic for the program. By convention, it contains an entry point called start, which is where the code will start executing.
programming
computer science
ibm
computers
languages
Next, we have the block starting symbol section, which contains variables that might change throughout the life cycle of the app. And finally, the data section 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 d for define byte 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 its 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 reference from the start label. In the main program, each line of code contains an instruction along with 1 or more operands, and there are hundreds of instructions built into the language. Now to perform machines. Quickly, the CPU has a limited number of registers, which are like 64 bit chunks of memory built directly into the CPU instead of the RAM. We can insert data into a register with with the move instruction by providing operands for the register name and the data to store there. In this case, number 1 is used because it corresponds to the machine's system write on Linux. Next, we need to tell the system where to write, in which case we'll move 1 into the r d I register, which corresponds to the standard output in terminal. The next register stores the message to write along with its length.
programming
computers
data
systems
Now execute the code stored in the CPU by calling the operating system kernel. Almost machine's done, but we'll get a segmentation fault if we try to run it at this point. Update the racks register with 60 for system exit and provide an error code of 0 for success.
Chess. Now use the assembler to compile or assemble your code into an object file, then use the linker to convert it into the final executable. This has been assembly language in 100 seconds. If a machine. If you wanna see more short videos like this, hit the like button and subscribe. Thanks for watching, and I will see you in the next one.
software development
multimedia
programming
audio
Assembly, a low level programming language designed to simplify the instructions fed into a computer's CPU. In other words, it's a human readable abstraction on top of machine code, so programmers don't have to manually count ones and zeros. The first assembly language was created by Kathleen Booth in 1947 for the all purpose electronic computer. Over the next decade, it evolved into many different formats to power the supercomputers of the day, like the IBM 7090, which had a $20,000,000 price tag in today's dollars. Writing code in 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, often on device drivers and embedded systems, and it's also used to run native software in a web browser via web assembly. What's tricky is that each assembly language only works on a specific the CPU architecture, like ARM for Apple Silicon and Raspberry Pi, or X86 for Intel Chips. To get started, you'll first need an assembler, like the Net White assembler for X86 Chips. An assembly program is divided into 3 sections. The text section contains the actual logic for the program. By convention, it contains an entry point called start, which is where the code will start executing. Next, we have the block starting symbol section, which contains variables that might change throughout the life cycle of the app. And finally, the data section 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 d for define byte 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 its 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 reference from the start label. In the main program, each line of code contains an instruction along with 1 or more operands, and there are hundreds of instructions built into the language. Now to perform machines. Quickly, the CPU has a limited number of registers, which are like 64 bit chunks of memory built directly into the CPU instead of the RAM. We can insert data into a register with with the move instruction by providing operands for the register name and the data to store there. In this case, number 1 is used because it corresponds to the machine's system write on Linux. Next, we need to tell the system where to write, in which case we'll move 1 into the r d I register, which corresponds to the standard output in terminal. The next register stores the message to write along with its length. Now execute the code stored in the CPU by calling the operating system kernel. Almost machine's done, but we'll get a segmentation fault if we try to run it at this point. Update the racks register with 60 for system exit and provide an error code of 0 for success. Chess. Now use the assembler to compile or assemble your code into an object file, then use the linker to convert it into the final executable. This has been assembly language in 100 seconds. If a machine. If you wanna see more short videos like this, hit the like button and subscribe. Thanks for watching, and I will see you in the next one.
Assembly,
assembly
a
a
low
low
level
level
programming
programming
language
language
designed
designed
to
to
simplify
simplify
the
the
instructions
instructions
fed
fed
into
into
a
a
computer's
computer's
CPU.
cpu
In
in
other
other
words,
words
it's
it's
a
a
human
human
readable
readable
abstraction
abstraction
on
on
top
top
of
of
machine
machine
code,
code
so
so
programmers
programmers
don't
don't
have
have
to
to
manually
manually
count
count
ones
ones
and
and
zeros.
zeros
The
the
first
first
assembly
assembly
language
language
was
was
created
created
by
by
Kathleen
kathleen
Booth
booth
in
in
1947
1947
for
for
the
the
all
all
purpose
purpose
electronic
electronic
computer.
computer
Over
over
the
the
next
next
decade,
decade
it
it
evolved
evolved
into
into
many
many
different
different
formats
formats
to
to
power
power
the
the
supercomputers
supercomputers
of
of
the
the
day,
day
like
like
the
the
IBM
ibm
7090,
7090
which
which
had
had
a
a
$20,000,000
$20,000,000
price
price
tag
tag
in
in
today's
today's
dollars.
dollars
Writing
writing
code
code
in
in
assembly
assembly
was
was
standard
standard
until
until
the
the
emergence
emergence
of
of
high
high
level
level
languages
languages
like
like
Fortran
fortran
a
a
few
few
years
years
later.
later
However,
however
Assembly
assembly
is
is
still
still
used
used
today
today
for
for
direct
direct
access
access
to
to
the
the
bare
bare
metal
metal
hardware
hardware
and
and
to
to
address
address
low
low
level
level
performance
performance
issues,
issues
often
often
on
on
device
device
drivers
drivers
and
and
embedded
embedded
systems,
systems
and
and
it's
it's
also
also
used
used
to
to
run
run
native
native
software
software
in
in
a
a
web
web
browser
browser
via
via
web
web
assembly.
assembly
What's
what's
tricky
tricky
is
is
that
that
each
each
assembly
assembly
language
language
only
only
works
works
on
on
a
a
specific
specific
the
the
CPU
cpu
architecture,
architecture
like
like
ARM
arm
for
for
Apple
apple
Silicon
silicon
and
and
Raspberry
raspberry
Pi,
pi
or
or
X86
x86
for
for
Intel
intel
Chips.
chips
To
to
get
get
started,
started
you'll
you'll
first
first
need
need
an
an
assembler,
assembler
like
like
the
the
Net
net
White
white
assembler
assembler
for
for
X86
x86
Chips.
chips
An
an
assembly
assembly
program
program
is
is
divided
divided
into
into
3
3
sections.
sections
The
the
text
text
section
section
contains
contains
the
the
actual
actual
logic
logic
for
for
the
the
program.
program
By
by
convention,
convention
it
it
contains
contains
an
an
entry
entry
point
point
called
called
start,
start
which
which
is
is
where
where
the
the
code
code
will
will
start
start
executing.
executing
Next,
next
we
we
have
have
the
the
block
block
starting
starting
symbol
symbol
section,
section
which
which
contains
contains
variables
variables
that
that
might
might
change
change
throughout
throughout
the
the
life
life
cycle
cycle
of
of
the
the
app.
app
And
and
finally,
finally
the
the
data
data
section
section
is
is
where
where
we
we
can
can
initialize
initialize
constants,
constants
or
or
data
data
that
that
does
does
not
not
change.
change
To
to
declare
declare
a
a
constant
constant
like
like
a
a
string,
string
we
we
start
start
with
with
a
a
label,
label
then
then
use
use
d
d
for
for
define
define
byte
byte
to
to
place
place
the
the
hello
hello
world
world
string
string
into
into
memory.
memory
By
by
itself,
itself
it
it
doesn't
doesn't
do
do
anything,
anything
and
and
to
to
print
print
it
it
to
to
the
the
standard
standard
output,
output
we
we
will
will
Also
also
need
need
its
its
length.
length
We
we
can
can
use
use
equate
equate
to
to
convert
convert
a
a
symbol
symbol
into
into
a
a
constant.
constant
The
the
dollar
dollar
sign
sign
will
will
subtract
subtract
the
the
current
current
position
position
from
from
the
the
hello
hello
label,
label
providing
providing
the
the
length
length
of
of
the
the
string.
string
And
and
now
now
these
these
constants
constants
can
can
be
be
reference
reference
from
from
the
the
start
start
label.
label
In
in
the
the
main
main
program,
program
each
each
line
line
of
of
code
code
contains
contains
an
an
instruction
instruction
along
along
with
with
1
1
or
or
more
more
operands,
operands
and
and
there
there
are
are
hundreds
hundreds
of
of
instructions
instructions
built
built
into
into
the
the
language.
language
Now
now
to
to
perform
perform
machines.
machines
Quickly,
quickly
the
the
CPU
cpu
has
has
a
a
limited
limited
number
number
of
of
registers,
registers
which
which
are
are
like
like
64
64
bit
bit
chunks
chunks
of
of
memory
memory
built
built
directly
directly
into
into
the
the
CPU
cpu
instead
instead
of
of
the
the
RAM.
ram
We
we
can
can
insert
insert
data
data
into
into
a
a
register
register
with
with
with
with
the
the
move
move
instruction
instruction
by
by
providing
providing
operands
operands
for
for
the
the
register
register
name
name
and
and
the
the
data
data
to
to
store
store
there.
there
In
in
this
this
case,
case
number
number
1
1
is
is
used
used
because
because
it
it
corresponds
corresponds
to
to
the
the
machine's
machine's
system
system
write
write
on
on
Linux.
linux
Next,
next
we
we
need
need
to
to
tell
tell
the
the
system
system
where
where
to
to
write,
write
in
in
which
which
case
case
we'll
we'll
move
move
1
1
into
into
the
the
r
r
d
d
I
i
register,
register
which
which
corresponds
corresponds
to
to
the
the
standard
standard
output
output
in
in
terminal.
terminal
The
the
next
next
register
register
stores
stores
the
the
message
message
to
to
write
write
along
along
with
with
its
its
length.
length
Now
now
execute
execute
the
the
code
code
stored
stored
in
in
the
the
CPU
cpu
by
by
calling
calling
the
the
operating
operating
system
system
kernel.
kernel
Almost
almost
machine's
machine's
done,
done
but
but
we'll
we'll
get
get
a
a
segmentation
segmentation
fault
fault
if
if
we
we
try
try
to
to
run
run
it
it
at
at
this
this
point.
point
Update
update
the
the
racks
racks
register
register
with
with
60
60
for
for
system
system
exit
exit
and
and
provide
provide
an
an
error
error
code
code
of
of
0
0
for
for
success.
success
Chess.
chess
Now
now
use
use
the
the
assembler
assembler
to
to
compile
compile
or
or
assemble
assemble
your
your
code
code
into
into
an
an
object
object
file,
file
then
then
use
use
the
the
linker
linker
to
to
convert
convert
it
it
into
into
the
the
final
final
executable.
executable
This
this
has
has
been
been
assembly
assembly
language
language
in
in
100
100
seconds.
seconds
If
if
a
a
machine.
machine
If
if
you
you
wanna
wanna
see
see
more
more
short
short
videos
videos
like
like
this,
this
hit
hit
the
the
like
like
button
button
and
and
subscribe.
subscribe
Thanks
thanks
for
for
watching,
watching
and
and
I
i
will
will
see
see
you
you
in
in
the
the
next
next
one.
one
success
The transcript discusses the assembly language, which is designed to simplify instructions for developers on machines. It includes a brief overview of the language, including its three sections, instructional code, block start, and data sections. Each segment includes a number of variables and instructions, and machines can perform machines by executing certain code. The language is used for building machines and sharing short videos for viewers to watch.
Assembly Language in 100 Seconds
Assembly, a low level programming language designed to simplify the instructions fed into a computer's CPU. In other words, it's a human readable abstraction on top of machine code, so programmers don't have to manually count ones and zeros. The first assembly language was created by Kathleen Booth in 1947 for the all purpose electronic computer. Over the next decade, it evolved into many different formats to power the supercomputers of the day, like the IBM 7090, which had a $20,000,000 price tag in today's dollars. Writing code in 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, often on device drivers and embedded systems, and it's also used to run native software in a web browser via web assembly. What's tricky is that each assembly language only works on a specific the CPU architecture, like ARM for Apple Silicon and Raspberry Pi, or X86 for Intel Chips. To get started, you'll first need an assembler, like the Net White assembler for X86 Chips. An assembly program is divided into 3 sections. The text section contains the actual logic for the program. By convention, it contains an entry point called start, which is where the code will start executing. Next, we have the block starting symbol section, which contains variables that might change throughout the life cycle of the app. And finally, the data section 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 d for define byte 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 its 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 reference from the start label. In the main program, each line of code contains an instruction along with 1 or more operands, and there are hundreds of instructions built into the language. Now to perform machines. Quickly, the CPU has a limited number of registers, which are like 64 bit chunks of memory built directly into the CPU instead of the RAM. We can insert data into a register with with the move instruction by providing operands for the register name and the data to store there. In this case, number 1 is used because it corresponds to the machine's system write on Linux. Next, we need to tell the system where to write, in which case we'll move 1 into the r d I register, which corresponds to the standard output in terminal. The next register stores the message to write along with its length. Now execute the code stored in the CPU by calling the operating system kernel. Almost machine's done, but we'll get a segmentation fault if we try to run it at this point. Update the racks register with 60 for system exit and provide an error code of 0 for success. Chess. Now use the assembler to compile or assemble your code into an object file, then use the linker to convert it into the final executable. This has been assembly language in 100 seconds. If a machine. If you wanna see more short videos like this, hit the like button and subscribe. Thanks for watching, and I will see you in the next one.
The transcript discusses the assembly language, which is designed to simplify instructions for developers on machines. It includes a brief overview of the language, including its three sections, instructional code, block start, and data sections. Each segment includes a number of variables and instructions, and machines can perform machines by executing certain code. The language is used for building machines and sharing short videos for viewers to watch.

        [INST]
        You are youtuber called Fireship you make engaging high-intensity and entertaining coding tutorials and tech news. 
        you covers a wide range of topics relevant to programmers, aiming to help them learn and improve their skills quickly.
        
        Given the title of the video : Assembly Language in 100 Seconds 
        and a small summary : The transcript discusses the assembly language, which is designed to simplify instructions for developers on machines. It includes a brief overview of the language, including its three sections, instructional code, block start, and data sections. Each segment includes a number of variables and instructions, and machines can perform machines by executing certain code. The language is used for building machines and sharing short videos for viewers to watch.
        [/INST]
        
        Generate the video : Assembly, a low level programming language designed to simplify the instructions fed into a computer's CPU. In other words, it's a human readable abstraction on top of machine code, so programmers don't have to manually count ones and zeros. The first assembly language was created by Kathleen Booth in 1947 for the all purpose electronic computer. Over the next decade, it evolved into many different formats to power the supercomputers of the day, like the IBM 7090, which had a $20,000,000 price tag in today's dollars. Writing code in 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, often on device drivers and embedded systems, and it's also used to run native software in a web browser via web assembly. What's tricky is that each assembly language only works on a specific the CPU architecture, like ARM for Apple Silicon and Raspberry Pi, or X86 for Intel Chips. To get started, you'll first need an assembler, like the Net White assembler for X86 Chips. An assembly program is divided into 3 sections. The text section contains the actual logic for the program. By convention, it contains an entry point called start, which is where the code will start executing. Next, we have the block starting symbol section, which contains variables that might change throughout the life cycle of the app. And finally, the data section 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 d for define byte 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 its 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 reference from the start label. In the main program, each line of code contains an instruction along with 1 or more operands, and there are hundreds of instructions built into the language. Now to perform machines. Quickly, the CPU has a limited number of registers, which are like 64 bit chunks of memory built directly into the CPU instead of the RAM. We can insert data into a register with with the move instruction by providing operands for the register name and the data to store there. In this case, number 1 is used because it corresponds to the machine's system write on Linux. Next, we need to tell the system where to write, in which case we'll move 1 into the r d I register, which corresponds to the standard output in terminal. The next register stores the message to write along with its length. Now execute the code stored in the CPU by calling the operating system kernel. Almost machine's done, but we'll get a segmentation fault if we try to run it at this point. Update the racks register with 60 for system exit and provide an error code of 0 for success. Chess. Now use the assembler to compile or assemble your code into an object file, then use the linker to convert it into the final executable. This has been assembly language in 100 seconds. If a machine. If you wanna see more short videos like this, hit the like button and subscribe. Thanks for watching, and I will see you in the next one.
        