Asamblea De Lenguajes

Páginas: 90 (22379 palabras) Publicado: 4 de marzo de 2013
PC Assembly Language
Paul A. Carter
March 20, 2005

Copyright c 2001, 2002, 2003, 2004 by Paul Carter
This may be reproduced and distributed in its entirety (including this authorship, copyright and permission notice), provided that no charge is made
for the document itself, without the author’s consent. This includes “fair
use” excerpts like reviews and advertising, and derivative workslike translations.
Note that this restriction is not intended to prohibit charging for the service
of printing or copying the document.
Instructors are encouraged to use this document as a class resource; however,
the author would appreciate being notified in this case.

Contents
Preface

v

1 Introduction
1.1 Number Systems . . . . . . . . . . . . . . . .
1.1.1 Decimal . . . . . . .. . . . . . . . . .
1.1.2 Binary . . . . . . . . . . . . . . . . . .
1.1.3 Hexadecimal . . . . . . . . . . . . . .
1.2 Computer Organization . . . . . . . . . . . .
1.2.1 Memory . . . . . . . . . . . . . . . . .
1.2.2 The CPU . . . . . . . . . . . . . . . .
1.2.3 The 80x86 family of CPUs . . . . . . .
1.2.4 8086 16-bit Registers . . . . . . . . . .
1.2.5 80386 32-bit registers . . . . . .. . .
1.2.6 Real Mode . . . . . . . . . . . . . . .
1.2.7 16-bit Protected Mode . . . . . . . .
1.2.8 32-bit Protected Mode . . . . . . . . .
1.2.9 Interrupts . . . . . . . . . . . . . . . .
1.3 Assembly Language . . . . . . . . . . . . . .
1.3.1 Machine language . . . . . . . . . . .
1.3.2 Assembly language . . . . . . . . . . .
1.3.3 Instruction operands . . . . . . . . . .
1.3.4 Basicinstructions . . . . . . . . . . .
1.3.5 Directives . . . . . . . . . . . . . . . .
1.3.6 Input and Output . . . . . . . . . . .
1.3.7 Debugging . . . . . . . . . . . . . . . .
1.4 Creating a Program . . . . . . . . . . . . . .
1.4.1 First program . . . . . . . . . . . . . .
1.4.2 Compiler dependencies . . . . . . . . .
1.4.3 Assembling the code . . . . . . . . . .
1.4.4 Compiling the Ccode . . . . . . . . .
1.4.5 Linking the object files . . . . . . . .
1.4.6 Understanding an assembly listing file
i

.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.

.
.
.
.
..
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
..
.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.

1
1
1
1
3
4
4
5
6
7
7
8
9
10
10
11
11
11
12
12
13
16
16
18
18
22
22
23
23
23

ii

CONTENTS
1.5

Skeleton File . . . . . . . . . . . . . . . . . . . . . . . . . . .

2 Basic Assembly Language
2.1 Working with Integers . . . . . . . . . .2.1.1 Integer representation . . . . . .
2.1.2 Sign extension . . . . . . . . . .
2.1.3 Two’s complement arithmetic .
2.1.4 Example program . . . . . . . .
2.1.5 Extended precision arithmetic .
2.2 Control Structures . . . . . . . . . . . .
2.2.1 Comparisons . . . . . . . . . . .
2.2.2 Branch instructions . . . . . . .
2.2.3 The loop instructions . . . . . .
2.3 Translating Standard ControlStructures
2.3.1 If statements . . . . . . . . . . .
2.3.2 While loops . . . . . . . . . . .
2.3.3 Do while loops . . . . . . . . . .
2.4 Example: Finding Prime Numbers . . .

.
.
.
.
.
.
.
.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.
....
Leer documento completo

Regístrate para leer el documento completo.

Estos documentos también te pueden resultar útiles

  • Asamblea
  • ASAMBLEA
  • ASAMBLEA
  • asamblea
  • Asamblea
  • asamblea
  • asamblea
  • asamblea

Conviértase en miembro formal de Buenas Tareas

INSCRÍBETE - ES GRATIS