<s>
In	O
computer	B-General_Concept
programming	I-General_Concept
,	O
assembly	O
language	O
(	O
alternatively	O
assembler	O
language	O
or	O
symbolic	O
machine	B-Language
code	I-Language
)	O
,	O
often	O
referred	O
to	O
simply	O
as	O
Assembly	O
and	O
commonly	O
abbreviated	O
as	O
ASM	O
or	O
asm	O
,	O
is	O
any	O
low-level	B-Language
programming	I-Language
language	I-Language
with	O
a	O
very	O
strong	O
correspondence	O
between	O
the	O
instructions	B-General_Concept
in	O
the	O
language	O
and	O
the	O
architecture	B-General_Concept
's	I-General_Concept
machine	B-Language
code	I-Language
instructions	B-General_Concept
.	O
</s>
<s>
Assembly	O
language	O
usually	O
has	O
one	O
statement	O
per	O
machine	B-Language
instruction	I-Language
(	O
1:1	O
)	O
,	O
but	O
constants	O
,	O
comments	O
,	O
assembler	O
directives	O
,	O
symbolic	O
labels	O
of	O
,	O
e.g.	O
,	O
memory	B-General_Concept
locations	I-General_Concept
,	O
registers	B-General_Concept
,	O
and	O
macros	O
are	O
generally	O
also	O
supported	O
.	O
</s>
<s>
The	O
first	O
assembly	O
code	O
in	O
which	O
a	O
language	O
is	O
used	O
to	O
represent	O
machine	B-Language
code	I-Language
instructions	B-General_Concept
is	O
found	O
in	O
Kathleen	O
and	O
Andrew	O
Donald	O
Booth	O
's	O
1947	O
work	O
,	O
Coding	O
for	O
C	B-Language
..	O
</s>
<s>
Assembly	O
code	O
is	O
converted	O
into	O
executable	O
machine	B-Language
code	I-Language
by	O
a	O
utility	B-Application
program	I-Application
referred	O
to	O
as	O
an	O
assembler	O
.	O
</s>
<s>
Because	O
assembly	O
depends	O
on	O
the	O
machine	B-Language
code	I-Language
instructions	B-General_Concept
,	O
each	O
assembly	O
language	O
is	O
specific	O
to	O
a	O
particular	O
computer	B-General_Concept
architecture	I-General_Concept
.	O
</s>
<s>
Sometimes	O
there	O
is	O
more	O
than	O
one	O
assembler	O
for	O
the	O
same	O
architecture	B-General_Concept
,	O
and	O
sometimes	O
an	O
assembler	O
is	O
specific	O
to	O
an	O
operating	B-General_Concept
system	I-General_Concept
or	O
to	O
particular	O
operating	B-General_Concept
systems	I-General_Concept
.	O
</s>
<s>
Most	O
assembly	O
languages	O
do	O
not	O
provide	O
specific	O
syntax	B-Application
for	O
operating	B-General_Concept
system	I-General_Concept
calls	O
,	O
and	O
most	O
assembly	O
languages	O
can	O
be	O
used	O
universally	O
with	O
any	O
operating	B-General_Concept
system	I-General_Concept
,	O
as	O
the	O
language	O
provides	O
access	O
to	O
all	O
the	O
real	O
capabilities	O
of	O
the	O
processor	O
,	O
upon	O
which	O
all	O
system	B-Operating_System
call	I-Operating_System
mechanisms	O
ultimately	O
rest	O
.	O
</s>
<s>
In	O
contrast	O
to	O
assembly	O
languages	O
,	O
most	O
high-level	B-Language
programming	I-Language
languages	I-Language
are	O
generally	O
portable	B-Architecture
across	O
multiple	O
architectures	O
but	O
require	O
interpreting	B-Application
or	O
compiling	B-Language
,	O
much	O
more	O
complicated	O
tasks	O
than	O
assembling	O
.	O
</s>
<s>
In	O
the	O
first	O
decades	O
of	O
computing	O
,	O
it	O
was	O
commonplace	O
for	O
both	O
systems	B-Application
programming	I-Application
and	O
application	B-General_Concept
programming	I-General_Concept
to	O
take	O
place	O
entirely	O
in	O
assembly	O
language	O
.	O
</s>
<s>
While	O
still	O
irreplaceable	O
for	O
some	O
purposes	O
,	O
the	O
majority	O
of	O
programming	O
is	O
now	O
conducted	O
in	O
higher-level	O
interpreted	B-Application
and	O
compiled	B-Language
languages	O
.	O
</s>
<s>
In	O
"	O
No	O
Silver	O
Bullet	O
"	O
,	O
Fred	O
Brooks	O
summarised	O
the	O
effects	O
of	O
the	O
switch	O
away	O
from	O
assembly	O
language	O
programming	O
:	O
"	O
Surely	O
the	O
most	O
powerful	O
stroke	O
for	O
software	O
productivity	O
,	O
reliability	O
,	O
and	O
simplicity	O
has	O
been	O
the	O
progressive	O
use	O
of	O
high-level	B-Language
languages	I-Language
for	O
programming	O
.	O
</s>
<s>
For	O
instance	O
,	O
just	O
under	O
2%	O
of	O
version	O
4.9	O
of	O
the	O
Linux	B-Operating_System
kernel	I-Operating_System
source	O
code	O
is	O
written	O
in	O
assembly	O
;	O
more	O
than	O
97%	O
is	O
written	O
in	O
C	B-Language
.	O
</s>
<s>
Assembly	O
language	O
uses	O
a	O
mnemonic	O
to	O
represent	O
,	O
e.g.	O
,	O
each	O
low-level	B-Language
machine	B-Language
instruction	I-Language
or	O
opcode	B-Language
,	O
each	O
directive	O
,	O
typically	O
also	O
each	O
architectural	O
register	B-General_Concept
,	O
flag	O
,	O
etc	O
.	O
</s>
<s>
Some	O
of	O
the	O
mnemonics	B-Device
may	O
be	O
built	O
in	O
and	O
some	O
user	O
defined	O
.	O
</s>
<s>
Most	O
assemblers	O
permit	O
named	O
constants	O
,	O
registers	B-General_Concept
,	O
and	O
labels	O
for	O
program	O
and	O
memory	B-General_Concept
locations	I-General_Concept
,	O
and	O
can	O
calculate	O
expressions	O
for	O
operands	O
.	O
</s>
<s>
Thus	O
,	O
programmers	B-General_Concept
are	O
freed	O
from	O
tedious	O
repetitive	O
calculations	O
and	O
assembler	O
programs	O
are	O
much	O
more	O
readable	O
than	O
machine	B-Language
code	I-Language
.	O
</s>
<s>
Depending	O
on	O
the	O
architecture	B-General_Concept
,	O
these	O
elements	O
may	O
also	O
be	O
combined	O
for	O
specific	O
instructions	B-General_Concept
or	O
addressing	B-Language
modes	I-Language
using	O
offsets	B-General_Concept
or	O
other	O
data	O
as	O
well	O
as	O
fixed	O
addresses	O
.	O
</s>
<s>
Some	O
are	O
column	O
oriented	O
,	O
with	O
specific	O
fields	O
in	O
specific	O
columns	O
;	O
this	O
was	O
very	O
common	O
for	O
machines	O
using	O
punched	B-Architecture
cards	I-Architecture
in	O
the	O
1950s	O
and	O
early	O
1960s	O
.	O
</s>
<s>
Some	O
assemblers	O
have	O
free-form	O
syntax	B-Application
,	O
with	O
fields	O
separated	O
by	O
delimiters	O
,	O
e.g.	O
,	O
punctuation	O
,	O
white	O
space	O
.	O
</s>
<s>
Some	O
assemblers	O
are	O
hybrid	O
,	O
with	O
,	O
e.g.	O
,	O
labels	O
,	O
in	O
a	O
specific	O
column	O
and	O
other	O
fields	O
separated	O
by	O
delimiters	O
;	O
this	O
became	O
more	O
common	O
than	O
column	O
oriented	O
syntax	B-Application
in	O
the	O
1960s	O
.	O
</s>
<s>
All	O
of	O
the	O
IBM	O
assemblers	O
for	O
System/360	B-Application
,	O
by	O
default	O
,	O
have	O
a	O
label	O
in	O
column	O
1	O
,	O
fields	O
separated	O
by	O
delimiters	O
in	O
columns	O
2-71	O
,	O
a	O
continuation	O
indicator	O
in	O
column	O
72	O
and	O
a	O
sequence	O
number	O
in	O
columns	O
73-80	O
.	O
</s>
<s>
The	O
delimiter	O
for	O
label	O
,	O
opcode	B-Language
,	O
operands	O
and	O
comments	O
is	O
spaces	O
,	O
while	O
individual	O
operands	O
are	O
separated	O
by	O
commas	O
and	O
parentheses	O
.	O
</s>
<s>
A	O
macro	B-Language
assembler	I-Language
is	O
an	O
assembler	O
that	O
includes	O
a	O
macroinstruction	O
facility	O
so	O
that	O
(	O
parameterized	O
)	O
assembly	O
language	O
text	O
can	O
be	O
represented	O
by	O
a	O
name	O
,	O
and	O
that	O
name	O
can	O
be	O
used	O
to	O
insert	O
the	O
expanded	O
text	O
into	O
other	O
code	O
.	O
</s>
<s>
A	O
cross	O
assembler	O
(	O
see	O
also	O
cross	B-Application
compiler	I-Application
)	O
is	O
an	O
assembler	O
that	O
is	O
run	O
on	O
a	O
computer	O
or	O
operating	B-General_Concept
system	I-General_Concept
(	O
the	O
host	O
system	O
)	O
of	O
a	O
different	O
type	O
from	O
the	O
system	O
on	O
which	O
the	O
resulting	O
code	O
is	O
to	O
run	O
(	O
the	O
target	O
system	O
)	O
.	O
</s>
<s>
Cross-assembling	O
facilitates	O
the	O
development	O
of	O
programs	O
for	O
systems	O
that	O
do	O
not	O
have	O
the	O
resources	O
to	O
support	O
software	O
development	O
,	O
such	O
as	O
an	O
embedded	B-Architecture
system	I-Architecture
or	O
a	O
microcontroller	B-Architecture
.	O
</s>
<s>
In	O
such	O
a	O
case	O
,	O
the	O
resulting	O
object	B-Language
code	I-Language
must	O
be	O
transferred	O
to	O
the	O
target	O
system	O
,	O
via	O
read-only	B-Device
memory	I-Device
(	O
ROM	B-Device
,	O
EPROM	B-General_Concept
,	O
etc	O
.	O
</s>
<s>
)	O
,	O
a	O
programmer	B-General_Concept
(	O
when	O
the	O
read-only	B-Device
memory	I-Device
is	O
integrated	O
in	O
the	O
device	O
,	O
as	O
in	O
microcontrollers	B-Architecture
)	O
,	O
or	O
a	O
data	O
link	O
using	O
either	O
an	O
exact	O
bit-by-bit	O
copy	O
of	O
the	O
object	B-Language
code	I-Language
or	O
a	O
text-based	O
representation	O
of	O
that	O
code	O
(	O
such	O
as	O
Intel	O
hex	O
or	O
Motorola	O
S-record	O
)	O
.	O
</s>
<s>
A	O
high-level	B-Application
assembler	I-Application
is	O
a	O
program	O
that	O
provides	O
language	O
abstractions	B-Application
more	O
often	O
associated	O
with	O
high-level	B-Language
languages	I-Language
,	O
such	O
as	O
advanced	O
control	O
structures	O
(	O
IF/THEN/ELSE	B-Language
,	O
DO	O
CASE	O
,	O
etc	O
.	O
)	O
</s>
<s>
A	O
microassembler	B-Application
is	O
a	O
program	O
that	O
helps	O
prepare	O
a	O
microprogram	B-Device
,	O
called	O
firmware	O
,	O
to	O
control	O
the	O
low	O
level	O
operation	O
of	O
a	O
computer	O
.	O
</s>
<s>
"	O
Meta-Symbol	O
"	O
assemblers	O
for	O
the	O
SDS	B-Device
9	I-Device
Series	I-Device
and	O
SDS	B-Device
Sigma	I-Device
series	I-Device
of	O
computers	O
are	O
meta-assemblers	O
.	O
</s>
<s>
Sperry	O
Univac	O
also	O
provided	O
a	O
Meta-Assembler	O
for	O
the	O
UNIVAC	B-Device
1100/2200	I-Device
series	I-Device
.	O
</s>
<s>
inline	B-Language
assembler	I-Language
(	O
or	O
embedded	O
assembler	O
)	O
is	O
assembler	O
code	O
contained	O
within	O
a	O
high-level	B-Language
language	I-Language
program	O
.	O
</s>
<s>
An	O
assembler	O
program	O
creates	O
object	B-Language
code	I-Language
by	O
translating	B-Application
combinations	O
of	O
mnemonics	B-Device
and	O
syntax	B-Application
for	O
operations	O
and	O
addressing	B-Language
modes	I-Language
into	O
their	O
numerical	O
equivalents	O
.	O
</s>
<s>
This	O
representation	O
typically	O
includes	O
an	O
operation	B-Language
code	I-Language
(	O
"	O
opcode	B-Language
"	O
)	O
as	O
well	O
as	O
other	O
control	O
bits	O
and	O
data	O
.	O
</s>
<s>
The	O
assembler	O
also	O
calculates	O
constant	O
expressions	O
and	O
resolves	O
symbolic	O
names	O
for	O
memory	B-General_Concept
locations	I-General_Concept
and	O
other	O
entities	O
.	O
</s>
<s>
Most	O
assemblers	O
also	O
include	O
macro	O
facilities	O
for	O
performing	O
textual	O
substitution	O
–	O
e.g.	O
,	O
to	O
generate	O
common	O
short	O
sequences	O
of	O
instructions	B-General_Concept
as	O
inline	O
,	O
instead	O
of	O
called	O
subroutines	O
.	O
</s>
<s>
One	O
concrete	O
example	O
of	O
this	O
may	O
be	O
the	O
ubiquitous	O
x86	B-Operating_System
assemblers	O
from	O
various	O
vendors	O
.	O
</s>
<s>
Others	O
may	O
even	O
do	O
simple	O
rearrangement	O
or	O
insertion	O
of	O
instructions	B-General_Concept
,	O
such	O
as	O
some	O
assemblers	O
for	O
RISC	B-Architecture
architectures	I-Architecture
that	O
can	O
help	O
optimize	O
a	O
sensible	O
instruction	O
scheduling	O
to	O
exploit	O
the	O
CPU	B-General_Concept
pipeline	I-General_Concept
as	O
efficiently	O
as	O
possible	O
.	O
</s>
<s>
Assemblers	O
have	O
been	O
available	O
since	O
the	O
1950s	O
,	O
as	O
the	O
first	O
step	O
above	O
machine	B-Language
language	I-Language
and	O
before	O
high-level	B-Language
programming	I-Language
languages	I-Language
such	O
as	O
Fortran	B-Application
,	O
Algol	B-Language
,	O
COBOL	B-Application
and	O
Lisp	B-Language
.	O
</s>
<s>
There	O
have	O
also	O
been	O
several	O
classes	O
of	O
translators	B-Application
and	O
semi-automatic	O
code	B-Application
generators	I-Application
with	O
properties	O
similar	O
to	O
both	O
assembly	O
and	O
high-level	B-Language
languages	I-Language
,	O
with	O
Speedcode	B-Language
as	O
perhaps	O
one	O
of	O
the	O
better-known	O
examples	O
.	O
</s>
<s>
There	O
may	O
be	O
several	O
assemblers	O
with	O
different	O
syntax	B-Application
for	O
a	O
particular	O
CPU	B-General_Concept
or	O
instruction	B-General_Concept
set	I-General_Concept
architecture	I-General_Concept
.	O
</s>
<s>
For	O
instance	O
,	O
an	O
instruction	O
to	O
add	O
memory	O
data	O
to	O
a	O
register	B-General_Concept
in	O
a	O
x86-family	O
processor	O
might	O
be	O
add	O
eax,[ebx],	O
in	O
original	O
Intel	O
syntax	B-Application
,	O
whereas	O
this	O
would	O
be	O
written	O
addl	O
( %ebx	O
)	O
,	O
%eax	O
in	O
the	O
AT&T	O
syntax	B-Application
used	O
by	O
the	O
GNU	B-Application
Assembler	I-Application
.	O
</s>
<s>
Despite	O
different	O
appearances	O
,	O
different	O
syntactic	O
forms	O
generally	O
generate	O
the	O
same	O
numeric	O
machine	B-Language
code	I-Language
.	O
</s>
<s>
A	O
single	O
assembler	O
may	O
also	O
have	O
different	O
modes	O
in	O
order	O
to	O
support	O
variations	O
in	O
syntactic	O
forms	O
as	O
well	O
as	O
their	O
exact	O
semantic	O
interpretations	O
(	O
such	O
as	O
FASM-syntax	O
,	O
TASM-syntax	O
,	O
ideal	O
mode	O
,	O
etc.	O
,	O
in	O
the	O
special	O
case	O
of	O
x86	B-Language
assembly	I-Language
programming	O
)	O
.	O
</s>
<s>
For	O
symbols	O
used	O
before	O
they	O
are	O
defined	O
,	O
the	O
assembler	O
will	O
emit	O
"	O
errata	O
"	O
after	O
the	O
eventual	O
definition	O
,	O
telling	O
the	O
linker	B-Application
or	O
the	O
loader	B-Operating_System
to	O
patch	O
the	O
locations	O
where	O
the	O
as	O
yet	O
undefined	O
symbols	O
had	O
been	O
used	O
.	O
</s>
<s>
"	O
no-operation	B-Language
"	O
instructions	B-General_Concept
in	O
a	O
later	O
pass	O
or	O
the	O
errata	O
.	O
</s>
<s>
In	O
an	O
assembler	O
with	O
peephole	O
optimization	B-Application
,	O
addresses	O
may	O
be	O
recalculated	O
between	O
passes	O
to	O
allow	O
replacing	O
pessimistic	O
code	O
with	O
code	O
tailored	O
to	O
the	O
exact	O
distance	O
from	O
the	O
target	O
.	O
</s>
<s>
The	O
original	O
reason	O
for	O
the	O
use	O
of	O
one-pass	O
assemblers	O
was	O
memory	O
size	O
and	O
speed	O
of	O
assembly	O
–	O
often	O
a	O
second	O
pass	O
would	O
require	O
storing	O
the	O
symbol	O
table	O
in	O
memory	O
(	O
to	O
handle	O
forward	O
references	O
)	O
,	O
rewinding	O
and	O
rereading	O
the	O
program	O
source	O
on	O
tape	B-Architecture
,	O
or	O
rereading	O
a	O
deck	O
of	O
cards	B-Architecture
or	O
punched	O
paper	O
tape	B-Architecture
.	O
</s>
<s>
The	O
advantage	O
of	O
the	O
multi-pass	O
assembler	O
is	O
that	O
the	O
absence	O
of	O
errata	O
makes	O
the	O
linking	B-Application
process	I-Application
(	O
or	O
the	O
program	B-Operating_System
load	I-Operating_System
if	O
the	O
assembler	O
directly	O
produces	O
executable	O
code	O
)	O
faster	O
.	O
</s>
<s>
More	O
sophisticated	O
high-level	B-Application
assemblers	I-Application
provide	O
language	O
abstractions	B-Application
such	O
as	O
:	O
</s>
<s>
A	O
program	O
written	O
in	O
assembly	O
language	O
consists	O
of	O
a	O
series	O
of	O
mnemonic	O
processor	O
instructions	B-General_Concept
and	O
meta-statements	O
(	O
known	O
variously	O
as	O
declarative	O
operations	O
,	O
directives	O
,	O
pseudo-instructions	O
,	O
pseudo-operations	O
and	O
pseudo-ops	O
)	O
,	O
comments	O
and	O
data	O
.	O
</s>
<s>
Assembly	O
language	O
instructions	B-General_Concept
usually	O
consist	O
of	O
an	O
opcode	B-Language
mnemonic	O
followed	O
by	O
an	O
operand	O
,	O
which	O
might	O
be	O
a	O
list	O
of	O
data	O
,	O
arguments	O
or	O
parameters	O
.	O
</s>
<s>
Some	O
instructions	B-General_Concept
may	O
be	O
"	O
implied	O
,	O
"	O
which	O
means	O
the	O
data	O
upon	O
which	O
the	O
instruction	O
operates	O
is	O
implicitly	O
defined	O
by	O
the	O
instruction	O
itself	O
—	O
such	O
an	O
instruction	O
does	O
not	O
take	O
an	O
operand	O
.	O
</s>
<s>
The	O
resulting	O
statement	O
is	O
translated	O
by	O
an	O
assembler	O
into	O
machine	B-Language
language	I-Language
instructions	B-General_Concept
that	O
can	O
be	O
loaded	O
into	O
memory	O
and	O
executed	O
.	O
</s>
<s>
For	O
example	O
,	O
the	O
instruction	O
below	O
tells	O
an	O
x86/IA	O
-32	O
processor	O
to	O
move	O
an	O
immediate	O
8-bit	O
value	O
into	O
a	O
register	B-General_Concept
.	O
</s>
<s>
The	O
binary	O
code	O
for	O
this	O
instruction	O
is	O
10110	O
followed	O
by	O
a	O
3-bit	O
identifier	O
for	O
which	O
register	B-General_Concept
to	O
use	O
.	O
</s>
<s>
The	O
identifier	O
for	O
the	O
AL	O
register	B-General_Concept
is	O
000	O
,	O
so	O
the	O
following	O
machine	B-Language
code	I-Language
loads	O
the	O
AL	O
register	B-General_Concept
with	O
the	O
data	O
01100001	O
.	O
</s>
<s>
Here	O
,	O
B0	O
means	O
'	O
Move	O
a	O
copy	O
of	O
the	O
following	O
value	O
into	O
AL	O
,	O
and	O
61	O
is	O
a	O
hexadecimal	O
representation	O
of	O
the	O
value	O
01100001	O
,	O
which	O
is	O
97	O
in	O
decimal	B-Application
.	O
</s>
<s>
Assembly	O
language	O
for	O
the	O
8086	O
family	O
provides	O
the	O
mnemonic	O
MOV	O
(	O
an	O
abbreviation	O
of	O
move	O
)	O
for	O
instructions	B-General_Concept
such	O
as	O
this	O
,	O
so	O
the	O
machine	B-Language
code	I-Language
above	O
can	O
be	O
written	O
as	O
follows	O
in	O
assembly	O
language	O
,	O
complete	O
with	O
an	O
explanatory	O
comment	O
if	O
required	O
,	O
after	O
the	O
semicolon	O
.	O
</s>
<s>
In	O
some	O
assembly	O
languages	O
(	O
including	O
this	O
one	O
)	O
the	O
same	O
mnemonic	O
,	O
such	O
as	O
MOV	O
,	O
may	O
be	O
used	O
for	O
a	O
family	O
of	O
related	O
instructions	B-General_Concept
for	O
loading	O
,	O
copying	O
and	O
moving	O
data	O
,	O
whether	O
these	O
are	O
immediate	O
values	O
,	O
values	O
in	O
registers	B-General_Concept
,	O
or	O
memory	B-General_Concept
locations	I-General_Concept
pointed	O
to	O
by	O
values	O
in	O
registers	B-General_Concept
or	O
by	O
immediate	O
(	O
a.k.a.	O
</s>
<s>
Other	O
assemblers	O
may	O
use	O
separate	O
opcode	B-Language
mnemonics	B-Device
such	O
as	O
L	O
for	O
"	O
move	O
memory	O
to	O
register	B-General_Concept
"	O
,	O
ST	O
for	O
"	O
move	O
register	B-General_Concept
to	O
memory	O
"	O
,	O
LR	O
for	O
"	O
move	O
register	B-General_Concept
to	O
register	B-General_Concept
"	O
,	O
MVI	O
for	O
"	O
move	O
immediate	O
operand	O
to	O
memory	O
"	O
,	O
etc	O
.	O
</s>
<s>
If	O
the	O
same	O
mnemonic	O
is	O
used	O
for	O
different	O
instructions	B-General_Concept
,	O
that	O
means	O
that	O
the	O
mnemonic	O
corresponds	O
to	O
several	O
different	O
binary	O
instruction	B-Language
codes	I-Language
,	O
excluding	O
data	O
(	O
e.g.	O
</s>
<s>
For	O
example	O
,	O
for	O
the	O
x86/IA	O
-32	O
CPUs	O
,	O
the	O
Intel	O
assembly	O
language	O
syntax	B-Application
MOV	O
AL	O
,	O
AH	O
represents	O
an	O
instruction	O
that	O
moves	O
the	O
contents	O
of	O
register	B-General_Concept
AH	O
into	O
register	B-General_Concept
AL	O
.	O
</s>
<s>
The	O
first	O
byte	O
,	O
88h	O
,	O
identifies	O
a	O
move	O
between	O
a	O
byte-sized	O
register	B-General_Concept
and	O
either	O
another	O
register	B-General_Concept
or	O
memory	O
,	O
and	O
the	O
second	O
byte	O
,	O
E0h	O
,	O
is	O
encoded	O
(	O
with	O
three	O
bit-fields	O
)	O
to	O
specify	O
that	O
both	O
operands	O
are	O
registers	B-General_Concept
,	O
the	O
source	O
is	O
AH	O
,	O
and	O
the	O
destination	O
is	O
AL	O
.	O
</s>
<s>
In	O
the	O
first	O
example	O
,	O
the	O
operand	O
61h	O
is	O
a	O
valid	O
hexadecimal	O
numeric	O
constant	O
and	O
is	O
not	O
a	O
valid	O
register	B-General_Concept
name	O
,	O
so	O
only	O
the	O
B0	O
instruction	O
can	O
be	O
applicable	O
.	O
</s>
<s>
In	O
the	O
second	O
example	O
,	O
the	O
operand	O
AH	O
is	O
a	O
valid	O
register	B-General_Concept
name	O
and	O
not	O
a	O
valid	O
numeric	O
constant	O
(	O
hexadecimal	O
,	O
decimal	B-Application
,	O
octal	O
,	O
or	O
binary	O
)	O
,	O
so	O
only	O
the	O
88	O
instruction	O
can	O
be	O
applicable	O
.	O
</s>
<s>
Assembly	O
languages	O
are	O
always	O
designed	O
so	O
that	O
this	O
sort	O
of	O
unambiguousness	O
is	O
universally	O
enforced	O
by	O
their	O
syntax	B-Application
.	O
</s>
<s>
For	O
example	O
,	O
in	O
the	O
Intel	B-Operating_System
x86	I-Operating_System
assembly	O
language	O
,	O
a	O
hexadecimal	O
constant	O
must	O
start	O
with	O
a	O
numeral	O
digit	O
,	O
so	O
that	O
the	O
hexadecimal	O
number	O
'	O
A	O
 '	O
(	O
equal	O
to	O
decimal	B-Application
ten	O
)	O
would	O
be	O
written	O
as	O
0Ah	O
or	O
0AH	O
,	O
not	O
AH	O
,	O
specifically	O
so	O
that	O
it	O
cannot	O
appear	O
to	O
be	O
the	O
name	O
of	O
register	B-General_Concept
AH	O
.	O
</s>
<s>
(	O
The	O
same	O
rule	O
also	O
prevents	O
ambiguity	O
with	O
the	O
names	O
of	O
registers	B-General_Concept
BH	O
,	O
CH	O
,	O
and	O
DH	O
,	O
as	O
well	O
as	O
with	O
any	O
user-defined	O
symbol	O
that	O
ends	O
with	O
the	O
letter	O
H	O
and	O
otherwise	O
contains	O
only	O
characters	O
that	O
are	O
hexadecimal	O
digits	O
,	O
such	O
as	O
the	O
word	O
"	O
BEACH	O
"	O
.	O
)	O
</s>
<s>
Returning	O
to	O
the	O
original	O
example	O
,	O
while	O
the	O
x86	B-Operating_System
opcode	B-Language
10110000	O
(	O
B0	O
)	O
copies	O
an	O
8-bit	O
value	O
into	O
the	O
AL	O
register	B-General_Concept
,	O
10110001	O
(	O
B1	O
)	O
moves	O
it	O
into	O
CL	O
and	O
10110010	O
(	O
B2	O
)	O
does	O
so	O
into	O
DL	O
.	O
</s>
<s>
The	O
syntax	B-Application
of	O
MOV	O
can	O
also	O
be	O
more	O
complex	O
as	O
the	O
following	O
examples	O
show	O
.	O
</s>
<s>
In	O
each	O
case	O
,	O
the	O
MOV	O
mnemonic	O
is	O
translated	O
directly	O
into	O
one	O
of	O
the	O
opcodes	B-Language
88-8C	O
,	O
8E	O
,	O
A0-A3	O
,	O
B0-BF	O
,	O
C6	O
or	O
C7	O
by	O
an	O
assembler	O
,	O
and	O
the	O
programmer	B-General_Concept
normally	O
does	O
not	O
have	O
to	O
know	O
or	O
remember	O
which	O
.	O
</s>
<s>
Transforming	O
assembly	O
language	O
into	O
machine	B-Language
code	I-Language
is	O
the	O
job	O
of	O
an	O
assembler	O
,	O
and	O
the	O
reverse	O
can	O
at	O
least	O
partially	O
be	O
achieved	O
by	O
a	O
disassembler	O
.	O
</s>
<s>
Unlike	O
high-level	B-Language
languages	I-Language
,	O
there	O
is	O
a	O
one-to-one	B-Algorithm
correspondence	I-Algorithm
between	O
many	O
simple	O
assembly	O
statements	O
and	O
machine	B-Language
language	I-Language
instructions	B-General_Concept
.	O
</s>
<s>
However	O
,	O
in	O
some	O
cases	O
,	O
an	O
assembler	O
may	O
provide	O
pseudoinstructions	O
(	O
essentially	O
macros	O
)	O
which	O
expand	O
into	O
several	O
machine	B-Language
language	I-Language
instructions	B-General_Concept
to	O
provide	O
commonly	O
needed	O
functionality	O
.	O
</s>
<s>
Most	O
full-featured	O
assemblers	O
also	O
provide	O
a	O
rich	O
macro	O
language	O
(	O
discussed	O
below	O
)	O
which	O
is	O
used	O
by	O
vendors	O
and	O
programmers	B-General_Concept
to	O
generate	O
more	O
complex	O
code	O
and	O
data	O
sequences	O
.	O
</s>
<s>
Since	O
the	O
information	O
about	O
pseudoinstructions	O
and	O
macros	O
defined	O
in	O
the	O
assembler	O
environment	O
is	O
not	O
present	O
in	O
the	O
object	O
program	O
,	O
a	O
disassembler	O
cannot	O
reconstruct	O
the	O
macro	O
and	O
pseudoinstruction	O
invocations	O
but	O
can	O
only	O
disassemble	O
the	O
actual	O
machine	B-Language
instructions	I-Language
that	O
the	O
assembler	O
generated	O
from	O
those	O
abstract	O
assembly-language	O
entities	O
.	O
</s>
<s>
Likewise	O
,	O
since	O
comments	O
in	O
the	O
assembly	O
language	O
source	O
file	O
are	O
ignored	O
by	O
the	O
assembler	O
and	O
have	O
no	O
effect	O
on	O
the	O
object	B-Language
code	I-Language
it	O
generates	O
,	O
a	O
disassembler	O
is	O
always	O
completely	O
unable	O
to	O
recover	O
source	O
comments	O
.	O
</s>
<s>
Each	O
computer	B-General_Concept
architecture	I-General_Concept
has	O
its	O
own	O
machine	B-Language
language	I-Language
.	O
</s>
<s>
Computers	O
differ	O
in	O
the	O
number	O
and	O
type	O
of	O
operations	O
they	O
support	O
,	O
in	O
the	O
different	O
sizes	O
and	O
numbers	O
of	O
registers	B-General_Concept
,	O
and	O
in	O
the	O
representations	O
of	O
data	O
in	O
storage	O
.	O
</s>
<s>
Multiple	O
sets	O
of	O
mnemonics	B-Device
or	O
assembly-language	O
syntax	B-Application
may	O
exist	O
for	O
a	O
single	O
instruction	B-General_Concept
set	I-General_Concept
,	O
typically	O
instantiated	O
in	O
different	O
assembler	O
programs	O
.	O
</s>
<s>
In	O
these	O
cases	O
,	O
the	O
most	O
popular	O
one	O
is	O
usually	O
that	O
supplied	O
by	O
the	O
CPU	B-General_Concept
manufacturer	O
and	O
used	O
in	O
its	O
documentation	O
.	O
</s>
<s>
Two	O
examples	O
of	O
CPUs	O
that	O
have	O
two	O
different	O
sets	O
of	O
mnemonics	B-Device
are	O
the	O
Intel	B-General_Concept
8080	I-General_Concept
family	O
and	O
the	O
Intel	O
8086/8088	O
.	O
</s>
<s>
Because	O
Intel	O
claimed	O
copyright	O
on	O
its	O
assembly	O
language	O
mnemonics	B-Device
(	O
on	O
each	O
page	O
of	O
their	O
documentation	O
published	O
in	O
the	O
1970s	O
and	O
early	O
1980s	O
,	O
at	O
least	O
)	O
,	O
some	O
companies	O
that	O
independently	O
produced	O
CPUs	O
compatible	O
with	O
Intel	O
instruction	B-General_Concept
sets	I-General_Concept
invented	O
their	O
own	O
mnemonics	B-Device
.	O
</s>
<s>
The	O
Zilog	B-General_Concept
Z80	I-General_Concept
CPU	B-General_Concept
,	O
an	O
enhancement	O
of	O
the	O
Intel	B-General_Concept
8080A	I-General_Concept
,	O
supports	O
all	O
the	O
8080A	B-General_Concept
instructions	B-General_Concept
plus	O
many	O
more	O
;	O
Zilog	O
invented	O
an	O
entirely	O
new	O
assembly	O
language	O
,	O
not	O
only	O
for	O
the	O
new	O
instructions	B-General_Concept
but	O
also	O
for	O
all	O
of	O
the	O
8080A	B-General_Concept
instructions	B-General_Concept
.	O
</s>
<s>
For	O
example	O
,	O
where	O
Intel	O
uses	O
the	O
mnemonics	B-Device
MOV	O
,	O
MVI	O
,	O
LDA	O
,	O
STA	O
,	O
LXI	O
,	O
LDAX	O
,	O
STAX	O
,	O
LHLD	O
,	O
and	O
SHLD	O
for	O
various	O
data	O
transfer	O
instructions	B-General_Concept
,	O
the	O
Z80	B-General_Concept
assembly	O
language	O
uses	O
the	O
mnemonic	O
LD	O
for	O
all	O
of	O
them	O
.	O
</s>
<s>
A	O
similar	O
case	O
is	O
the	O
NEC	B-Device
V20	I-Device
and	O
V30	B-Device
CPUs	O
,	O
enhanced	O
copies	O
of	O
the	O
Intel	O
8086	O
and	O
8088	O
,	O
respectively	O
.	O
</s>
<s>
Like	O
Zilog	O
with	O
the	O
Z80	B-General_Concept
,	O
NEC	O
invented	O
new	O
mnemonics	B-Device
for	O
all	O
of	O
the	O
8086	O
and	O
8088	O
instructions	B-General_Concept
,	O
to	O
avoid	O
accusations	O
of	O
infringement	O
of	O
Intel	O
's	O
copyright	O
.	O
</s>
<s>
(	O
It	O
is	O
questionable	O
whether	O
such	O
copyrights	O
can	O
be	O
valid	O
,	O
and	O
later	O
CPU	B-General_Concept
companies	O
such	O
as	O
AMD	O
and	O
Cyrix	O
republished	O
Intel	O
's	O
x86/IA	O
-32	O
instruction	O
mnemonics	B-Device
exactly	O
with	O
neither	O
permission	O
nor	O
legal	O
penalty	O
.	O
)	O
</s>
<s>
It	O
is	O
doubtful	O
whether	O
in	O
practice	O
many	O
people	O
who	O
programmed	O
the	O
V20	O
and	O
V30	B-Device
actually	O
wrote	O
in	O
NEC	O
's	O
assembly	O
language	O
rather	O
than	O
Intel	O
's	O
;	O
since	O
any	O
two	O
assembly	O
languages	O
for	O
the	O
same	O
instruction	B-General_Concept
set	I-General_Concept
architecture	I-General_Concept
are	O
isomorphic	O
(	O
somewhat	O
like	O
English	O
and	O
Pig	B-Language
Latin	I-Language
)	O
,	O
there	O
is	O
no	O
requirement	O
to	O
use	O
a	O
manufacturer	O
's	O
own	O
published	O
assembly	O
language	O
with	O
that	O
manufacturer	O
's	O
products	O
.	O
</s>
<s>
Instructions	B-General_Concept
(	O
statements	O
)	O
in	O
assembly	O
language	O
are	O
generally	O
very	O
simple	O
,	O
unlike	O
those	O
in	O
high-level	B-Language
languages	I-Language
.	O
</s>
<s>
Generally	O
,	O
a	O
mnemonic	O
is	O
a	O
symbolic	O
name	O
for	O
a	O
single	O
executable	O
machine	B-Language
language	I-Language
instruction	O
(	O
an	O
opcode	B-Language
)	O
,	O
and	O
there	O
is	O
at	O
least	O
one	O
opcode	B-Language
mnemonic	O
defined	O
for	O
each	O
machine	B-Language
language	I-Language
instruction	O
.	O
</s>
<s>
Each	O
instruction	O
typically	O
consists	O
of	O
an	O
operation	O
or	O
opcode	B-Language
plus	O
zero	O
or	O
more	O
operands	O
.	O
</s>
<s>
Most	O
instructions	B-General_Concept
refer	O
to	O
a	O
single	O
value	O
or	O
a	O
pair	O
of	O
values	O
.	O
</s>
<s>
Operands	O
can	O
be	O
immediate	O
(	O
value	O
coded	O
in	O
the	O
instruction	O
itself	O
)	O
,	O
registers	B-General_Concept
specified	O
in	O
the	O
instruction	O
or	O
implied	O
,	O
or	O
the	O
addresses	O
of	O
data	O
located	O
elsewhere	O
in	O
storage	O
.	O
</s>
<s>
This	O
is	O
determined	O
by	O
the	O
underlying	O
processor	O
architecture	B-General_Concept
:	O
the	O
assembler	O
merely	O
reflects	O
how	O
this	O
architecture	B-General_Concept
works	O
.	O
</s>
<s>
Extended	O
mnemonics	B-Device
are	O
often	O
used	O
to	O
specify	O
a	O
combination	O
of	O
an	O
opcode	B-Language
with	O
a	O
specific	O
operand	O
,	O
e.g.	O
,	O
the	O
System/360	B-Application
assemblers	O
use	O
as	O
an	O
extended	O
mnemonic	O
for	O
with	O
a	O
mask	O
of	O
15	O
and	O
(	O
"	O
NO	B-Language
OPeration	I-Language
"	O
–	O
do	O
nothing	O
for	O
one	O
step	O
)	O
for	O
with	O
a	O
mask	O
of	O
0	O
.	O
</s>
<s>
Extended	O
mnemonics	B-Device
are	O
often	O
used	O
to	O
support	O
specialized	O
uses	O
of	O
instructions	B-General_Concept
,	O
often	O
for	O
purposes	O
not	O
obvious	O
from	O
the	O
instruction	O
name	O
.	O
</s>
<s>
For	O
example	O
,	O
many	O
CPU	B-General_Concept
's	O
do	O
not	O
have	O
an	O
explicit	O
NOP	B-Language
instruction	O
,	O
but	O
do	O
have	O
instructions	B-General_Concept
that	O
can	O
be	O
used	O
for	O
the	O
purpose	O
.	O
</s>
<s>
In	O
8086	O
CPUs	O
the	O
instruction	O
is	O
used	O
for	O
,	O
with	O
being	O
a	O
pseudo-opcode	O
to	O
encode	O
the	O
instruction	O
.	O
</s>
<s>
Similarly	O
,	O
IBM	O
assemblers	O
for	O
System/360	B-Application
and	O
System/370	B-Device
use	O
the	O
extended	O
mnemonics	B-Device
and	O
for	O
and	O
with	O
zero	O
masks	O
.	O
</s>
<s>
For	O
the	O
SPARC	B-Architecture
architecture	B-General_Concept
,	O
these	O
are	O
known	O
as	O
synthetic	O
instructions	B-General_Concept
.	O
</s>
<s>
Some	O
assemblers	O
also	O
support	O
simple	O
built-in	O
macro-instructions	O
that	O
generate	O
two	O
or	O
more	O
machine	B-Language
instructions	I-Language
.	O
</s>
<s>
For	O
instance	O
,	O
with	O
some	O
Z80	B-General_Concept
assemblers	O
the	O
instruction	O
is	O
recognized	O
to	O
generate	O
followed	O
by	O
.	O
</s>
<s>
These	O
are	O
sometimes	O
known	O
as	O
pseudo-opcodes	O
.	O
</s>
<s>
Mnemonics	B-Device
are	O
arbitrary	O
symbols	O
;	O
in	O
1985	O
the	O
IEEE	O
published	O
Standard	O
694	O
for	O
a	O
uniform	O
set	O
of	O
mnemonics	B-Device
to	O
be	O
used	O
by	O
all	O
assemblers	O
.	O
</s>
<s>
There	O
are	O
instructions	B-General_Concept
used	O
to	O
define	O
data	O
elements	O
to	O
hold	O
data	O
and	O
variables	O
.	O
</s>
<s>
They	O
define	O
the	O
type	O
of	O
data	O
,	O
the	O
length	O
and	O
the	O
alignment	B-Application
of	O
data	O
.	O
</s>
<s>
These	O
instructions	B-General_Concept
can	O
also	O
define	O
whether	O
the	O
data	O
is	O
available	O
to	O
outside	O
programs	O
(	O
programs	O
assembled	O
separately	O
)	O
or	O
only	O
to	O
the	O
program	O
in	O
which	O
the	O
data	O
section	O
is	O
defined	O
.	O
</s>
<s>
Assembly	O
directives	O
,	O
also	O
called	O
pseudo-opcodes	O
,	O
pseudo-operations	O
or	O
pseudo-ops	O
,	O
are	O
commands	O
given	O
to	O
an	O
assembler	O
"	O
directing	O
it	O
to	O
perform	O
operations	O
other	O
than	O
assembling	O
instructions	B-General_Concept
"	O
.	O
</s>
<s>
Directives	O
affect	O
how	O
the	O
assembler	O
operates	O
and	O
"	O
may	O
affect	O
the	O
object	B-Language
code	I-Language
,	O
the	O
symbol	O
table	O
,	O
the	O
listing	O
file	O
,	O
and	O
the	O
values	O
of	O
internal	O
assembler	O
parameters	O
"	O
.	O
</s>
<s>
Sometimes	O
the	O
term	O
pseudo-opcode	O
is	O
reserved	O
for	O
directives	O
that	O
generate	O
object	B-Language
code	I-Language
,	O
such	O
as	O
those	O
that	O
generate	O
data	O
.	O
</s>
<s>
The	O
names	O
of	O
pseudo-ops	O
often	O
start	O
with	O
a	O
dot	O
to	O
distinguish	O
them	O
from	O
machine	B-Language
instructions	I-Language
.	O
</s>
<s>
Pseudo-ops	O
can	O
make	O
the	O
assembly	O
of	O
the	O
program	O
dependent	O
on	O
parameters	O
input	O
by	O
a	O
programmer	B-General_Concept
,	O
so	O
that	O
one	O
program	O
can	O
be	O
assembled	O
in	O
different	O
ways	O
,	O
perhaps	O
for	O
different	O
applications	O
.	O
</s>
<s>
Another	O
common	O
use	O
of	O
pseudo-ops	O
is	O
to	O
reserve	O
storage	O
areas	O
for	O
run-time	B-Device
data	O
and	O
optionally	O
initialize	O
their	O
contents	O
to	O
known	O
values	O
.	O
</s>
<s>
Symbolic	O
assemblers	O
let	O
programmers	B-General_Concept
associate	O
arbitrary	O
names	O
(	O
labels	O
or	O
symbols	O
)	O
with	O
memory	B-General_Concept
locations	I-General_Concept
and	O
various	O
constants	O
.	O
</s>
<s>
Usually	O
,	O
every	O
constant	O
and	O
variable	O
is	O
given	O
a	O
name	O
so	O
instructions	B-General_Concept
can	O
reference	O
those	O
locations	O
by	O
name	O
,	O
thus	O
promoting	O
self-documenting	O
code	O
.	O
</s>
<s>
Inside	O
subroutines	O
,	O
GOTO	B-Application
destinations	O
are	O
given	O
labels	O
.	O
</s>
<s>
Some	O
assemblers	O
support	O
local	O
symbols	O
which	O
are	O
often	O
lexically	O
distinct	O
from	O
normal	O
symbols	O
(	O
e.g.	O
,	O
the	O
use	O
of	O
"	O
10$	O
"	O
as	O
a	O
GOTO	B-Application
destination	O
)	O
.	O
</s>
<s>
Some	O
assemblers	O
,	O
such	O
as	O
NASM	B-Application
,	O
provide	O
flexible	O
symbol	O
management	O
,	O
letting	O
programmers	B-General_Concept
manage	O
different	O
namespaces	O
,	O
automatically	O
calculate	O
offsets	B-General_Concept
within	O
data	B-General_Concept
structures	I-General_Concept
,	O
and	O
assign	O
labels	O
that	O
refer	O
to	O
literal	O
values	O
or	O
the	O
result	O
of	O
simple	O
computations	O
performed	O
by	O
the	O
assembler	O
.	O
</s>
<s>
Judicious	O
commenting	O
is	O
essential	O
in	O
assembly	O
language	O
programs	O
,	O
as	O
the	O
meaning	O
and	O
purpose	O
of	O
a	O
sequence	O
of	O
binary	O
machine	B-Language
instructions	I-Language
can	O
be	O
difficult	O
to	O
determine	O
.	O
</s>
<s>
The	O
"	O
raw	O
"	O
(	O
uncommented	O
)	O
assembly	O
language	O
generated	O
by	O
compilers	B-Language
or	O
disassemblers	O
is	O
quite	O
difficult	O
to	O
read	O
when	O
changes	O
must	O
be	O
made	O
.	O
</s>
<s>
Many	O
assemblers	O
support	O
predefined	O
macros	O
,	O
and	O
others	O
support	O
programmer-defined	O
(	O
and	O
repeatedly	O
re-definable	O
)	O
macros	O
involving	O
sequences	O
of	O
text	O
lines	O
in	O
which	O
variables	O
and	O
constants	O
are	O
embedded	O
.	O
</s>
<s>
The	O
macro	O
definition	O
is	O
most	O
commonly	O
a	O
mixture	O
of	O
assembler	O
statements	O
,	O
e.g.	O
,	O
directives	O
,	O
symbolic	O
machine	B-Language
instructions	I-Language
,	O
and	O
templates	O
for	O
assembler	O
statements	O
.	O
</s>
<s>
This	O
sequence	O
of	O
text	O
lines	O
may	O
include	O
opcodes	B-Language
or	O
directives	O
.	O
</s>
<s>
Macros	O
in	O
this	O
sense	O
date	O
to	O
IBM	B-Device
autocoders	I-Device
of	O
the	O
1950s	O
.	O
</s>
<s>
Macro	B-Language
assemblers	I-Language
typically	O
have	O
directives	O
to	O
,	O
e.g.	O
,	O
define	O
macros	O
,	O
define	O
variables	O
,	O
set	O
variables	O
to	O
the	O
result	O
of	O
an	O
arithmetic	O
,	O
logical	O
or	O
string	O
expression	O
,	O
iterate	O
,	O
conditionally	O
generate	O
code	O
.	O
</s>
<s>
Some	O
of	O
those	O
directives	O
may	O
be	O
restricted	O
to	O
use	O
within	O
a	O
macro	O
definition	O
,	O
e.g.	O
,	O
MEXIT	O
in	O
HLASM	B-Device
,	O
while	O
others	O
may	O
be	O
permitted	O
within	O
open	O
code	O
(	O
outside	O
macro	O
definitions	O
)	O
,	O
e.g.	O
,	O
AIF	O
and	O
COPY	O
in	O
HLASM	B-Device
.	O
</s>
<s>
In	O
assembly	O
language	O
,	O
the	O
term	O
"	O
macro	O
"	O
represents	O
a	O
more	O
comprehensive	O
concept	O
than	O
it	O
does	O
in	O
some	O
other	O
contexts	O
,	O
such	O
as	O
the	O
pre-processor	B-Application
in	O
the	O
C	B-Language
programming	I-Language
language	I-Language
,	O
where	O
its	O
#define	O
directive	O
typically	O
is	O
used	O
to	O
create	O
short	O
single	O
line	O
macros	O
.	O
</s>
<s>
Assembler	O
macro	O
instructions	B-General_Concept
,	O
like	O
macros	O
in	O
PL/I	B-Language
and	O
some	O
other	O
languages	O
,	O
can	O
be	O
lengthy	O
"	O
programs	O
"	O
by	O
themselves	O
,	O
executed	O
by	O
interpretation	O
by	O
the	O
assembler	O
during	O
assembly	O
.	O
</s>
<s>
Macro	B-Language
assemblers	I-Language
often	O
allow	O
macros	O
to	O
take	O
parameters	O
.	O
</s>
<s>
Some	O
assemblers	O
include	O
quite	O
sophisticated	O
macro	O
languages	O
,	O
incorporating	O
such	O
high-level	B-Language
language	I-Language
elements	O
as	O
optional	O
parameters	O
,	O
symbolic	O
variables	O
,	O
conditionals	B-Language
,	O
string	O
manipulation	O
,	O
and	O
arithmetic	O
operations	O
,	O
all	O
usable	O
during	O
the	O
execution	O
of	O
a	O
given	O
macro	O
,	O
and	O
allowing	O
macros	O
to	O
save	O
context	O
or	O
exchange	O
information	O
.	O
</s>
<s>
Thus	O
a	O
macro	O
might	O
generate	O
numerous	O
assembly	O
language	O
instructions	B-General_Concept
or	O
data	O
definitions	O
,	O
based	O
on	O
the	O
macro	O
arguments	O
.	O
</s>
<s>
This	O
could	O
be	O
used	O
to	O
generate	O
record-style	O
data	B-General_Concept
structures	I-General_Concept
or	O
"	O
unrolled	B-Operating_System
"	O
loops	O
,	O
for	O
example	O
,	O
or	O
could	O
generate	O
entire	O
algorithms	O
based	O
on	O
complex	O
parameters	O
.	O
</s>
<s>
For	O
instance	O
,	O
a	O
"	O
sort	O
"	O
macro	O
could	O
accept	O
the	O
specification	O
of	O
a	O
complex	O
sort	O
key	O
and	O
generate	O
code	O
crafted	O
for	O
that	O
specific	O
key	O
,	O
not	O
needing	O
the	O
run-time	B-Device
tests	O
that	O
would	O
be	O
required	O
for	O
a	O
general	O
procedure	O
interpreting	B-Application
the	O
specification	O
.	O
</s>
<s>
An	O
organization	O
using	O
assembly	O
language	O
that	O
has	O
been	O
heavily	O
extended	O
using	O
such	O
a	O
macro	O
suite	O
can	O
be	O
considered	O
to	O
be	O
working	O
in	O
a	O
higher-level	O
language	O
since	O
such	O
programmers	B-General_Concept
are	O
not	O
working	O
with	O
a	O
computer	O
's	O
lowest-level	O
conceptual	O
elements	O
.	O
</s>
<s>
Underlining	O
this	O
point	O
,	O
macros	O
were	O
used	O
to	O
implement	O
an	O
early	O
virtual	B-Architecture
machine	I-Architecture
in	O
SNOBOL4	B-Application
(	O
1967	O
)	O
,	O
which	O
was	O
written	O
in	O
the	O
SNOBOL	B-Application
Implementation	O
Language	O
(	O
SIL	O
)	O
,	O
an	O
assembly	O
language	O
for	O
a	O
virtual	B-Architecture
machine	I-Architecture
.	O
</s>
<s>
The	O
target	O
machine	O
would	O
translate	O
this	O
to	O
its	O
native	B-Language
code	I-Language
using	O
a	O
macro	B-Language
assembler	I-Language
.	O
</s>
<s>
This	O
allowed	O
a	O
high	O
degree	O
of	O
portability	B-Architecture
for	O
the	O
time	O
.	O
</s>
<s>
Macros	O
were	O
used	O
to	O
customize	O
large	O
scale	O
software	O
systems	O
for	O
specific	O
customers	O
in	O
the	O
mainframe	O
era	O
and	O
were	O
also	O
used	O
by	O
customer	O
personnel	O
to	O
satisfy	O
their	O
employers	O
 '	O
needs	O
by	O
making	O
specific	O
versions	O
of	O
manufacturer	O
operating	B-General_Concept
systems	I-General_Concept
.	O
</s>
<s>
This	O
was	O
done	O
,	O
for	O
example	O
,	O
by	O
systems	B-Application
programmers	I-Application
working	O
with	O
IBM	O
's	O
Conversational	O
Monitor	O
System	O
/	O
Virtual	B-Architecture
Machine	I-Architecture
(	O
VM/CMS	B-Application
)	O
and	O
with	O
IBM	O
's	O
"	O
real	O
time	O
transaction	O
processing	O
"	O
add-ons	O
,	O
Customer	B-Application
Information	I-Application
Control	I-Application
System	I-Application
CICS	B-Application
,	O
and	O
ACP/TPF	O
,	O
the	O
airline/financial	O
system	O
that	O
began	O
in	O
the	O
1970s	O
and	O
still	O
runs	O
many	O
large	O
computer	B-Application
reservation	I-Application
systems	I-Application
(	O
CRS	O
)	O
and	O
credit	O
card	O
systems	O
today	O
.	O
</s>
<s>
It	O
is	O
also	O
possible	O
to	O
use	O
solely	O
the	O
macro	O
processing	O
abilities	O
of	O
an	O
assembler	O
to	O
generate	O
code	O
written	O
in	O
completely	O
different	O
languages	O
,	O
for	O
example	O
,	O
to	O
generate	O
a	O
version	O
of	O
a	O
program	O
in	O
COBOL	B-Application
using	O
a	O
pure	O
macro	B-Language
assembler	I-Language
program	O
containing	O
lines	O
of	O
COBOL	B-Application
code	O
inside	O
assembly	O
time	O
operators	O
instructing	O
the	O
assembler	O
to	O
generate	O
arbitrary	O
code	O
.	O
</s>
<s>
IBM	B-Application
OS/360	I-Application
uses	O
macros	O
to	O
perform	O
system	B-Application
generation	I-Application
.	O
</s>
<s>
Assembling	O
these	O
macros	O
generates	O
a	O
job	B-Application
stream	I-Application
to	O
build	O
the	O
system	O
,	O
including	O
job	B-Application
control	I-Application
language	I-Application
and	O
utility	B-Application
control	O
statements	O
.	O
</s>
<s>
This	O
is	O
because	O
,	O
as	O
was	O
realized	O
in	O
the	O
1960s	O
,	O
the	O
concept	O
of	O
"	O
macro	O
processing	O
"	O
is	O
independent	O
of	O
the	O
concept	O
of	O
"	O
assembly	O
"	O
,	O
the	O
former	O
being	O
in	O
modern	O
terms	O
more	O
word	O
processing	O
,	O
text	O
processing	O
,	O
than	O
generating	O
object	B-Language
code	I-Language
.	O
</s>
<s>
The	O
concept	O
of	O
macro	O
processing	O
appeared	O
,	O
and	O
appears	O
,	O
in	O
the	O
C	B-Language
programming	I-Language
language	I-Language
,	O
which	O
supports	O
"	O
preprocessor	B-Application
instructions	B-General_Concept
"	O
to	O
set	O
variables	O
,	O
and	O
make	O
conditional	B-Language
tests	O
on	O
their	O
values	O
.	O
</s>
<s>
Unlike	O
certain	O
previous	O
macro	O
processors	O
inside	O
assemblers	O
,	O
the	O
C	B-Language
preprocessor	B-Application
is	O
not	O
Turing-complete	O
because	O
it	O
lacks	O
the	O
ability	O
to	O
either	O
loop	O
or	O
"	O
go	O
to	O
"	O
,	O
the	O
latter	O
allowing	O
programs	O
to	O
loop	O
.	O
</s>
<s>
Despite	O
the	O
power	O
of	O
macro	O
processing	O
,	O
it	O
fell	O
into	O
disuse	O
in	O
many	O
high	B-Language
level	I-Language
languages	I-Language
(	O
major	O
exceptions	O
being	O
C	B-Language
,	O
C++	B-Language
and	O
PL/I	B-Language
)	O
while	O
remaining	O
a	O
perennial	O
for	O
assemblers	O
.	O
</s>
<s>
If	O
foo	O
is	O
called	O
with	O
the	O
parameter	O
a-c	O
,	O
the	O
macro	O
expansion	O
of	O
load	O
a-c*b	O
occurs	O
.	O
</s>
<s>
Packages	O
of	O
macros	O
have	O
been	O
written	O
providing	O
structured	B-Language
programming	I-Language
elements	O
to	O
encode	O
execution	O
flow	O
.	O
</s>
<s>
The	O
earliest	O
example	O
of	O
this	O
approach	O
was	O
in	O
the	O
Concept-14	O
macro	O
set	O
,	O
originally	O
proposed	O
by	O
Harlan	O
Mills	O
(	O
March	O
1970	O
)	O
,	O
and	O
implemented	O
by	O
Marvin	O
Kessler	O
at	O
IBM	O
's	O
Federal	O
Systems	O
Division	O
,	O
which	O
provided	O
IF/ELSE/ENDIF	O
and	O
similar	O
control	O
flow	O
blocks	O
for	O
OS/360	B-Application
assembler	O
programs	O
.	O
</s>
<s>
This	O
was	O
a	O
way	O
to	O
reduce	O
or	O
eliminate	O
the	O
use	O
of	O
GOTO	B-Application
operations	O
in	O
assembly	O
code	O
,	O
one	O
of	O
the	O
main	O
factors	O
causing	O
spaghetti	O
code	O
in	O
assembly	O
language	O
.	O
</s>
<s>
IBM	O
's	O
High	B-Application
Level	I-Application
Assembler	I-Application
Toolkit	O
includes	O
such	O
a	O
macro	O
package	O
.	O
</s>
<s>
A	O
curious	O
design	O
was	O
A-Natural	O
,	O
a	O
"	O
stream-oriented	O
"	O
assembler	O
for	O
8080/Z80	O
,	O
processors	O
from	O
Whitesmiths	O
Ltd	O
.	O
(	O
developers	O
of	O
the	O
Unix-like	O
Idris	B-Operating_System
operating	B-General_Concept
system	I-General_Concept
,	O
and	O
what	O
was	O
reported	O
to	O
be	O
the	O
first	O
commercial	O
C	B-Language
compiler	B-Language
)	O
.	O
</s>
<s>
The	O
language	O
was	O
classified	O
as	O
an	O
assembler	O
because	O
it	O
worked	O
with	O
raw	O
machine	O
elements	O
such	O
as	O
opcodes	B-Language
,	O
registers	B-General_Concept
,	O
and	O
memory	O
references	O
;	O
but	O
it	O
incorporated	O
an	O
expression	O
syntax	B-Application
to	O
indicate	O
execution	O
order	O
.	O
</s>
<s>
Parentheses	O
and	O
other	O
special	O
symbols	O
,	O
along	O
with	O
block-oriented	O
structured	B-Language
programming	I-Language
constructs	O
,	O
controlled	O
the	O
sequence	O
of	O
the	O
generated	O
instructions	B-General_Concept
.	O
</s>
<s>
A-natural	O
was	O
built	O
as	O
the	O
object	O
language	O
of	O
a	O
C	B-Language
compiler	B-Language
,	O
rather	O
than	O
for	O
hand-coding	O
,	O
but	O
its	O
logical	O
syntax	B-Application
won	O
some	O
fans	O
.	O
</s>
<s>
In	O
spite	O
of	O
that	O
,	O
they	O
are	O
still	O
being	O
developed	O
and	O
applied	O
in	O
cases	O
where	O
resource	O
constraints	O
or	O
peculiarities	O
in	O
the	O
target	O
system	O
's	O
architecture	B-General_Concept
prevent	O
the	O
effective	O
use	O
of	O
higher-level	O
languages	O
.	O
</s>
<s>
Assemblers	O
with	O
a	O
strong	O
macro	O
engine	O
allow	O
structured	B-Language
programming	I-Language
via	O
macros	O
,	O
such	O
as	O
the	O
switch	O
macro	O
provided	O
with	O
the	O
Masm32	O
package	O
(	O
this	O
code	O
is	O
a	O
complete	O
program	O
)	O
:	O
</s>
<s>
Kathleen	O
Booth	O
"	O
is	O
credited	O
with	O
inventing	O
assembly	O
language	O
"	O
based	O
on	O
theoretical	O
work	O
she	O
began	O
in	O
1947	O
,	O
while	O
working	O
on	O
the	O
ARC2	B-Device
at	O
Birkbeck	O
,	O
University	O
of	O
London	O
following	O
consultation	O
by	O
Andrew	O
Booth	O
(	O
later	O
her	O
husband	O
)	O
with	O
mathematician	O
John	O
von	O
Neumann	O
and	O
physicist	O
Herman	O
Goldstine	O
at	O
the	O
Institute	O
for	O
Advanced	O
Study	O
.	O
</s>
<s>
In	O
late	O
1948	O
,	O
the	O
Electronic	B-Device
Delay	I-Device
Storage	I-Device
Automatic	I-Device
Calculator	I-Device
(	O
EDSAC	B-Device
)	O
had	O
an	O
assembler	O
(	O
named	O
"	O
initial	O
orders	O
"	O
)	O
integrated	O
into	O
its	O
bootstrap	B-Operating_System
program	I-Operating_System
.	O
</s>
<s>
It	O
used	O
one-letter	O
mnemonics	B-Device
developed	O
by	O
David	O
Wheeler	O
,	O
who	O
is	O
credited	O
by	O
the	O
IEEE	O
Computer	O
Society	O
as	O
the	O
creator	O
of	O
the	O
first	O
"	O
assembler	O
"	O
.	O
</s>
<s>
Reports	O
on	O
the	O
EDSAC	B-Device
introduced	O
the	O
term	O
"	O
assembly	O
"	O
for	O
the	O
process	O
of	O
combining	O
fields	O
into	O
an	O
instruction	B-Language
word	I-Language
.	O
</s>
<s>
SOAP	O
(	O
Symbolic	B-Application
Optimal	I-Application
Assembly	I-Application
Program	I-Application
)	O
was	O
an	O
assembly	O
language	O
for	O
the	O
IBM	B-Device
650	I-Device
computer	O
written	O
by	O
Stan	O
Poley	O
in	O
1955	O
.	O
</s>
<s>
Assembly	O
languages	O
eliminate	O
much	O
of	O
the	O
error-prone	O
,	O
tedious	O
,	O
and	O
time-consuming	O
first-generation	O
programming	O
needed	O
with	O
the	O
earliest	O
computers	O
,	O
freeing	O
programmers	B-General_Concept
from	O
tedium	O
such	O
as	O
remembering	O
numeric	O
codes	O
and	O
calculating	O
addresses	O
.	O
</s>
<s>
Today	O
,	O
assembly	O
language	O
is	O
still	O
used	O
for	O
direct	O
hardware	O
manipulation	O
,	O
access	O
to	O
specialized	O
processor	O
instructions	B-General_Concept
,	O
or	O
to	O
address	O
critical	O
performance	O
issues	O
.	O
</s>
<s>
Typical	O
uses	O
are	O
device	B-Application
drivers	I-Application
,	O
low-level	B-Language
embedded	B-Architecture
systems	I-Architecture
,	O
and	O
real-time	B-General_Concept
systems	I-General_Concept
(	O
see	O
)	O
.	O
</s>
<s>
The	O
Burroughs	B-Application
MCP	I-Application
(	O
1961	O
)	O
was	O
the	O
first	O
computer	O
for	O
which	O
an	O
operating	B-General_Concept
system	I-General_Concept
was	O
not	O
developed	O
entirely	O
in	O
assembly	O
language	O
;	O
it	O
was	O
written	O
in	O
Executive	B-Language
Systems	I-Language
Problem	I-Language
Oriented	I-Language
Language	I-Language
(	O
ESPOL	B-Language
)	O
,	O
an	O
Algol	B-Language
dialect	O
.	O
</s>
<s>
Many	O
commercial	O
applications	O
were	O
written	O
in	O
assembly	O
language	O
as	O
well	O
,	O
including	O
a	O
large	O
amount	O
of	O
the	O
IBM	B-Device
mainframe	I-Device
software	O
written	O
by	O
large	O
corporations	O
.	O
</s>
<s>
COBOL	B-Application
,	O
FORTRAN	B-Application
and	O
some	O
PL/I	B-Language
eventually	O
displaced	O
much	O
of	O
this	O
work	O
,	O
although	O
a	O
number	O
of	O
large	O
organizations	O
retained	O
assembly-language	O
application	O
infrastructures	O
well	O
into	O
the	O
1990s	O
.	O
</s>
<s>
Assembly	O
language	O
has	O
long	O
been	O
the	O
primary	O
development	O
language	O
for	O
8-bit	O
home	O
computers	O
such	O
Atari	B-Device
8-bit	I-Device
family	I-Device
,	O
Apple	B-Device
II	I-Device
,	O
MSX	B-Operating_System
,	O
ZX	B-Operating_System
Spectrum	I-Operating_System
,	O
and	O
Commodore	O
64	O
.	O
</s>
<s>
Interpreted	B-Application
BASIC	O
dialects	O
on	O
these	O
systems	O
offer	O
insufficient	O
execution	O
speed	O
and	O
insufficient	O
facilities	O
to	O
take	O
full	O
advantage	O
of	O
the	O
available	O
hardware	O
.	O
</s>
<s>
There	O
are	O
also	O
few	O
high-level	B-Language
language	I-Language
compilers	B-Language
suitable	O
for	O
microcomputer	O
use	O
.	O
</s>
<s>
Similarly	O
,	O
assembly	O
language	O
is	O
the	O
default	O
choice	O
for	O
8-bit	O
consoles	O
such	O
as	O
the	O
Atari	B-General_Concept
2600	I-General_Concept
and	O
Nintendo	O
Entertainment	O
System	O
.	O
</s>
<s>
Key	O
software	O
for	O
IBM	O
PC	B-Device
compatibles	O
was	O
written	O
in	O
assembly	O
language	O
,	O
such	O
as	O
MS-DOS	B-Application
,	O
Turbo	B-Application
Pascal	I-Application
,	O
and	O
the	O
Lotus	B-Application
1-2-3	I-Application
spreadsheet	O
.	O
</s>
<s>
As	O
computer	O
speed	O
grew	O
exponentially	O
,	O
assembly	O
language	O
became	O
a	O
tool	O
for	O
speeding	O
up	O
parts	O
of	O
programs	O
,	O
such	O
as	O
the	O
rendering	O
of	O
Doom	B-Application
,	O
rather	O
than	O
a	O
dominant	O
development	O
language	O
.	O
</s>
<s>
In	O
the	O
1990s	O
,	O
assembly	O
language	O
was	O
used	O
to	O
get	O
performance	O
out	O
of	O
systems	O
such	O
as	O
the	O
Sega	B-Device
Saturn	I-Device
and	O
as	O
the	O
primary	O
language	O
for	O
arcade	O
hardware	O
based	O
on	O
the	O
TMS34010	B-General_Concept
integrated	O
CPU/GPU	O
such	O
as	O
Mortal	B-Application
Kombat	I-Application
and	O
NBA	B-Application
Jam	I-Application
.	O
</s>
<s>
There	O
has	O
been	O
debate	O
over	O
the	O
usefulness	O
and	O
performance	O
of	O
assembly	O
language	O
relative	O
to	O
high-level	B-Language
languages	I-Language
.	O
</s>
<s>
Although	O
assembly	O
language	O
has	O
specific	O
niche	O
uses	O
where	O
it	O
is	O
important	O
(	O
see	O
below	O
)	O
,	O
there	O
are	O
other	O
tools	O
for	O
optimization	B-Application
.	O
</s>
<s>
,	O
the	O
TIOBE	O
index	O
of	O
programming	O
language	O
popularity	O
ranks	O
assembly	O
language	O
at	O
11	O
,	O
ahead	O
of	O
Visual	B-Language
Basic	I-Language
,	O
for	O
example	O
.	O
</s>
<s>
In	O
the	O
case	O
of	O
speed	O
optimization	B-Application
,	O
modern	O
optimizing	B-Application
compilers	I-Application
are	O
claimed	O
to	O
render	O
high-level	B-Language
languages	I-Language
into	O
code	O
that	O
can	O
run	O
as	O
fast	O
as	O
hand-written	O
assembly	O
,	O
despite	O
the	O
counter-examples	O
that	O
can	O
be	O
found	O
.	O
</s>
<s>
The	O
complexity	O
of	O
modern	O
processors	O
and	O
memory	O
sub-systems	O
makes	O
effective	O
optimization	B-Application
increasingly	O
difficult	O
for	O
compilers	B-Language
,	O
as	O
well	O
as	O
for	O
assembly	O
programmers	B-General_Concept
.	O
</s>
<s>
Moreover	O
,	O
increasing	O
processor	O
performance	O
has	O
meant	O
that	O
most	O
CPUs	O
sit	O
idle	O
most	O
of	O
the	O
time	O
,	O
with	O
delays	O
caused	O
by	O
predictable	O
bottlenecks	O
such	O
as	O
cache	O
misses	O
,	O
I/O	B-General_Concept
operations	I-General_Concept
and	O
paging	B-Architecture
.	O
</s>
<s>
This	O
has	O
made	O
raw	O
code	O
execution	O
speed	O
a	O
non-issue	O
for	O
many	O
programmers	B-General_Concept
.	O
</s>
<s>
Writing	O
code	O
for	O
systems	O
with	O
that	O
have	O
limited	O
high-level	B-Language
language	I-Language
options	O
such	O
as	O
the	O
Atari	B-General_Concept
2600	I-General_Concept
,	O
Commodore	O
64	O
,	O
and	O
graphing	B-Application
calculators	I-Application
.	O
</s>
<s>
Code	O
that	O
must	O
interact	O
directly	O
with	O
the	O
hardware	O
,	O
for	O
example	O
in	O
device	B-Application
drivers	I-Application
and	O
interrupt	B-General_Concept
handlers	I-General_Concept
.	O
</s>
<s>
In	O
an	O
embedded	B-Architecture
processor	I-Architecture
or	O
DSP	O
,	O
high-repetition	O
interrupts	B-Application
require	O
the	O
shortest	O
number	O
of	O
cycles	O
per	O
interrupt	B-Application
,	O
such	O
as	O
an	O
interrupt	B-Application
that	O
occurs	O
1000	O
or	O
10000	O
times	O
a	O
second	O
.	O
</s>
<s>
Programs	O
that	O
need	O
to	O
use	O
processor-specific	O
instructions	B-General_Concept
not	O
implemented	O
in	O
a	O
compiler	B-Language
.	O
</s>
<s>
A	O
common	O
example	O
is	O
the	O
bitwise	B-Algorithm
rotation	I-Algorithm
instruction	O
at	O
the	O
core	O
of	O
many	O
encryption	O
algorithms	O
,	O
as	O
well	O
as	O
querying	O
the	O
parity	O
of	O
a	O
byte	O
or	O
the	O
4-bit	O
carry	O
of	O
an	O
addition	O
.	O
</s>
<s>
A	O
stand-alone	O
executable	O
of	O
compact	O
size	O
is	O
required	O
that	O
must	O
execute	O
without	O
recourse	O
to	O
the	O
run-time	B-Device
components	O
or	O
libraries	B-Library
associated	O
with	O
a	O
high-level	B-Language
language	I-Language
.	O
</s>
<s>
Programs	O
with	O
performance-sensitive	O
inner	O
loops	O
,	O
where	O
assembly	O
language	O
provides	O
optimization	B-Application
opportunities	O
that	O
are	O
difficult	O
to	O
achieve	O
in	O
a	O
high-level	B-Language
language	I-Language
.	O
</s>
<s>
For	O
example	O
,	O
linear	B-Language
algebra	I-Language
with	O
BLAS	B-Application
or	O
discrete	B-General_Concept
cosine	I-General_Concept
transformation	I-General_Concept
(	O
e.g.	O
</s>
<s>
SIMD	B-Device
assembly	O
version	O
from	O
x264	B-Language
)	O
.	O
</s>
<s>
Programs	O
that	O
create	O
vectorized	O
functions	O
for	O
programs	O
in	O
higher-level	O
languages	O
such	O
as	O
C	B-Language
.	O
In	O
the	O
higher-level	O
language	O
this	O
is	O
sometimes	O
aided	O
by	O
compiler	B-Language
intrinsic	B-Application
functions	I-Application
which	O
map	O
directly	O
to	O
SIMD	B-Device
mnemonics	B-Device
,	O
but	O
nevertheless	O
result	O
in	O
a	O
one-to-one	O
assembly	O
conversion	O
specific	O
for	O
the	O
given	O
vector	O
processor	O
.	O
</s>
<s>
Real-time	B-General_Concept
programs	O
such	O
as	O
simulations	O
,	O
flight	O
navigation	O
systems	O
,	O
and	O
medical	O
equipment	O
.	O
</s>
<s>
For	O
example	O
,	O
in	O
a	O
fly-by-wire	O
system	O
,	O
telemetry	O
must	O
be	O
interpreted	B-Application
and	O
acted	O
upon	O
within	O
strict	O
time	O
constraints	O
.	O
</s>
<s>
Such	O
systems	O
must	O
eliminate	O
sources	O
of	O
unpredictable	O
delays	O
,	O
which	O
may	O
be	O
created	O
by	O
(	O
some	O
)	O
interpreted	B-Application
languages	I-Application
,	O
automatic	B-General_Concept
garbage	I-General_Concept
collection	I-General_Concept
,	O
paging	B-Architecture
operations	O
,	O
or	O
preemptive	O
multitasking	O
.	O
</s>
<s>
However	O
,	O
some	O
higher-level	O
languages	O
incorporate	O
run-time	B-Device
components	O
and	O
operating	B-General_Concept
system	I-General_Concept
interfaces	O
that	O
can	O
introduce	O
such	O
delays	O
.	O
</s>
<s>
Choosing	O
assembly	O
or	O
lower	B-Language
level	I-Language
languages	I-Language
for	O
such	O
systems	O
gives	O
programmers	B-General_Concept
greater	O
visibility	O
and	O
control	O
over	O
processing	O
details	O
.	O
</s>
<s>
Video	O
encoders	O
and	O
decoders	O
such	O
as	O
rav1e	O
(	O
an	O
encoder	O
for	O
AV1	B-Application
)	O
and	O
dav1d	O
(	O
the	O
reference	O
decoder	O
for	O
AV1	B-Application
)	O
contain	O
assembly	O
to	O
leverage	O
AVX2	O
and	O
ARM	O
Neon	O
instructions	B-General_Concept
when	O
available	O
.	O
</s>
<s>
Modify	O
and	O
extend	O
legacy	O
code	O
written	O
for	O
IBM	B-Device
mainframe	I-Device
computers	O
.	O
</s>
<s>
Computer	O
viruses	O
,	O
bootloaders	B-Application
,	O
certain	O
device	B-Application
drivers	I-Application
,	O
or	O
other	O
items	O
very	O
close	O
to	O
the	O
hardware	O
or	O
low-level	B-Language
operating	B-General_Concept
system	I-General_Concept
.	O
</s>
<s>
Instruction	B-Application
set	I-Application
simulators	I-Application
for	O
monitoring	O
,	O
tracing	O
and	O
debugging	O
where	O
additional	O
overhead	O
is	O
kept	O
to	O
a	O
minimum	O
.	O
</s>
<s>
Situations	O
where	O
no	O
high-level	B-Language
language	I-Language
exists	O
,	O
on	O
a	O
new	O
or	O
specialized	O
processor	O
for	O
which	O
no	O
cross	B-Application
compiler	I-Application
is	O
available	O
.	O
</s>
<s>
existing	O
binaries	O
that	O
may	O
or	O
may	O
not	O
have	O
originally	O
been	O
written	O
in	O
a	O
high-level	B-Language
language	I-Language
,	O
for	O
example	O
when	O
trying	O
to	O
recreate	O
programs	O
for	O
which	O
source	O
code	O
is	O
not	O
available	O
or	O
has	O
been	O
lost	O
,	O
or	O
cracking	O
copy	O
protection	O
of	O
proprietary	O
software	O
.	O
</s>
<s>
Video	O
games	O
(	O
also	O
termed	O
ROM	B-Device
hacking	O
)	O
,	O
which	O
is	O
possible	O
via	O
several	O
methods	O
.	O
</s>
<s>
Assembly	O
language	O
is	O
still	O
taught	O
in	O
most	O
computer	B-General_Concept
science	I-General_Concept
and	O
electronic	O
engineering	O
programs	O
.	O
</s>
<s>
Although	O
few	O
programmers	B-General_Concept
today	O
regularly	O
work	O
with	O
assembly	O
language	O
as	O
a	O
tool	O
,	O
the	O
underlying	O
concepts	O
remain	O
important	O
.	O
</s>
<s>
Such	O
fundamental	O
topics	O
as	O
binary	O
arithmetic	O
,	O
memory	B-General_Concept
allocation	I-General_Concept
,	O
stack	B-Application
processing	I-Application
,	O
character	B-General_Concept
set	I-General_Concept
encoding	O
,	O
interrupt	B-Application
processing	O
,	O
and	O
compiler	B-Language
design	O
would	O
be	O
hard	O
to	O
study	O
in	O
detail	O
without	O
a	O
grasp	O
of	O
how	O
a	O
computer	O
operates	O
at	O
the	O
hardware	O
level	O
.	O
</s>
<s>
Since	O
a	O
computer	O
's	O
behavior	O
is	O
fundamentally	O
defined	O
by	O
its	O
instruction	B-General_Concept
set	I-General_Concept
,	O
the	O
logical	O
way	O
to	O
learn	O
such	O
concepts	O
is	O
to	O
study	O
an	O
assembly	O
language	O
.	O
</s>
<s>
Most	O
modern	O
computers	O
have	O
similar	O
instruction	B-General_Concept
sets	I-General_Concept
.	O
</s>
<s>
Therefore	O
,	O
studying	O
a	O
single	O
assembly	O
language	O
is	O
sufficient	O
to	O
learn	O
:	O
I	O
)	O
the	O
basic	O
concepts	O
;	O
II	O
)	O
to	O
recognize	O
situations	O
where	O
the	O
use	O
of	O
assembly	O
language	O
might	O
be	O
appropriate	O
;	O
and	O
III	O
)	O
to	O
see	O
how	O
efficient	O
executable	O
code	O
can	O
be	O
created	O
from	O
high-level	B-Language
languages	I-Language
.	O
</s>
<s>
Assembly	O
language	O
is	O
typically	O
used	O
in	O
a	O
system	O
's	O
boot	B-Operating_System
code	O
,	O
the	O
low-level	B-Language
code	O
that	O
initializes	O
and	O
tests	O
the	O
system	O
hardware	O
prior	O
to	O
booting	B-Operating_System
the	O
operating	B-General_Concept
system	I-General_Concept
and	O
is	O
often	O
stored	O
in	O
ROM	B-Device
.	O
</s>
<s>
(	O
BIOS	B-Operating_System
on	O
IBM-compatible	O
PC	B-Device
systems	O
and	O
CP/M	B-Application
is	O
an	O
example	O
.	O
)	O
</s>
<s>
Assembly	O
language	O
is	O
often	O
used	O
for	O
low-level	B-Language
code	O
,	O
for	O
instance	O
for	O
operating	B-Operating_System
system	I-Operating_System
kernels	I-Operating_System
,	O
which	O
cannot	O
rely	O
on	O
the	O
availability	O
of	O
pre-existing	O
system	B-Operating_System
calls	I-Operating_System
and	O
must	O
indeed	O
implement	O
them	O
for	O
the	O
particular	O
processor	O
architecture	B-General_Concept
on	O
which	O
the	O
system	O
will	O
be	O
running	O
.	O
</s>
<s>
Some	O
compilers	B-Language
translate	O
high-level	B-Language
languages	I-Language
into	O
assembly	O
first	O
before	O
fully	O
compiling	B-Language
,	O
allowing	O
the	O
assembly	O
code	O
to	O
be	O
viewed	O
for	O
debugging	O
and	O
optimization	B-Application
purposes	O
.	O
</s>
<s>
Some	O
compilers	B-Language
for	O
relatively	O
low-level	B-Language
languages	I-Language
,	O
such	O
as	O
Pascal	B-Application
or	O
C	B-Language
,	O
allow	O
the	O
programmer	B-General_Concept
to	O
embed	O
assembly	O
language	O
directly	O
in	O
the	O
source	O
code	O
(	O
so	O
called	O
inline	B-Language
assembly	I-Language
)	O
.	O
</s>
<s>
Programs	O
using	O
such	O
facilities	O
can	O
then	O
construct	O
abstractions	B-Application
using	O
different	O
assembly	O
language	O
on	O
each	O
hardware	O
platform	O
.	O
</s>
<s>
The	O
system	O
's	O
portable	B-Architecture
code	O
can	O
then	O
use	O
these	O
processor-specific	O
components	O
through	O
a	O
uniform	O
interface	O
.	O
</s>
<s>
Many	O
programs	O
are	O
distributed	O
only	O
in	O
machine	B-Language
code	I-Language
form	O
which	O
is	O
straightforward	O
to	O
translate	O
into	O
assembly	O
language	O
by	O
a	O
disassembler	O
,	O
but	O
more	O
difficult	O
to	O
translate	O
into	O
a	O
higher-level	O
language	O
through	O
a	O
decompiler	B-Application
.	O
</s>
<s>
Tools	O
such	O
as	O
the	O
Interactive	B-Application
Disassembler	I-Application
make	O
extensive	O
use	O
of	O
disassembly	O
for	O
such	O
a	O
purpose	O
.	O
</s>
<s>
Assembly	O
language	O
is	O
used	O
to	O
enhance	O
speed	O
of	O
execution	O
,	O
especially	O
in	O
early	O
personal	B-Device
computers	I-Device
with	O
limited	O
processing	O
power	O
and	O
RAM	O
.	O
</s>
<s>
Assemblers	O
can	O
be	O
used	O
to	O
generate	O
blocks	O
of	O
data	O
,	O
with	O
no	O
high-level	B-Language
language	I-Language
overhead	O
,	O
from	O
formatted	O
and	O
commented	O
source	O
code	O
,	O
to	O
be	O
used	O
by	O
other	O
code	O
.	O
</s>
