search for books and compare prices
Tables of Contents for Sparc Architecture, Assembly Language Programming, and C
Chapter/Section Title
Page #
Page Count
Preface
xi
 
List of Figures
xvii
 
The Computer
1
50
Introduction
1
1
Calculators
1
8
Stack Calculators
2
2
The Use of Registers
4
2
Programmable Calculators
6
2
Machine Language Programming
8
1
m4: The Macro Processor
9
8
Macros with Arguments
10
3
Memory Location
13
1
Conditionals and Branching
14
3
The von Neumann Machine
17
1
The Stack Machine
17
3
The Java Virtual Machine
20
10
Accumulator Machines
30
3
Load/Store Machines
33
6
Assemblers
39
5
Summary
44
2
Exercises
46
5
Sparc Architecture
51
46
Introduction
51
1
Registers
51
1
SPARC Assembly Language Programming
52
3
An Example
55
1
Pipelining
56
5
The Example Continued
61
2
The Debugger gdb
63
4
Filling Delay Slots
67
3
Branching
70
7
Testing
70
1
Branches
71
6
Control Statements
77
11
While
78
2
Do
80
2
For
82
1
If Then
83
2
If Else
85
3
Annulled Unconditional Branch
88
1
Summary
88
2
Exercises
90
7
Digital Logic and Binary Numbers
97
18
Binary Hardware Devices
97
2
Decimal and Binary Number Systems
99
6
Octal and Hexadecimal Numbers
100
2
Converting from Decimal to Binary
102
2
Converting from Binary to Decimal
104
1
ASCII Representation of Characters
105
1
Bitwise Logical Operations
105
6
Synthetic Instructions Using %g0
109
2
Flags
111
1
Summary
111
1
Exercises
112
3
Binary Arithmetic
115
36
Introduction
115
1
Binary Numbers and Addition
115
2
Half and Full Adders
117
1
Modulus Arithmetic
117
2
Subtraction
119
3
Two's Complement Number Branching Conditions
122
2
Shifting
123
1
Unsigned Arithmetic
124
1
Unsigned Number Branching Conditions
124
1
Condition Code Tests
125
1
Multiplication
125
9
SPARC mulscc Instruction
131
3
Division
134
5
Extended Precision Arithmetic
139
3
Addition of Extended Precision Numbers
139
1
Subtraction of Extended Precision Numbers
139
2
Multiplication of Extended Precision Numbers
141
1
Summary
142
1
Exercises
143
8
The Stack
151
30
Memory
151
1
The Stack
152
3
The Frame Pointer
154
1
Addressing Stack Variables
155
2
Load Instructions
156
1
Store Instructions
157
1
Defining Stack Variable Offsets
157
3
An Example
160
7
One-Dimensional Arrays
167
6
Improvements to the Code
173
4
Summary
177
1
Exercises
177
4
Data Structures
181
22
Introduction
181
1
Array Storage and Addressing
181
1
Multidimensional Arrays
182
5
Lower Bounds Different from Zero
183
2
Array Bound Checking
185
2
Address Arithmetic
187
3
Structures
190
3
Structures as Automatic Variables
193
4
Nested Structures
194
3
Summary
197
1
Exercises
198
5
Subroutines
203
28
Introduction
203
1
Open Subroutines
204
1
Register Saving
204
4
Subroutine Linkage
208
1
Arguments to Subroutines
209
6
Examples
215
2
Return Values
217
3
Subroutines with Many Arguments
220
1
Leaf Subroutines
221
3
Pointers as Arguments to Subroutines
224
1
Summary
225
1
Exercises
226
5
Machine Instructions
231
16
Introduction
231
1
Instruction Decode
231
1
Format Three Instructions
232
5
Format One Instruction: The call Instruction
237
1
Format Two Instructions
237
6
Branch Instructions
238
4
Loading 32-Bit Constants
242
1
Summary
243
1
Exercises
244
3
External Data and Text
247
24
Introduction
247
1
External Variables
247
1
The text Section
248
1
The data Section
248
5
ASCII Data
252
1
Pointers
253
1
The .bss Section
254
1
The switch Statement
255
2
Relocation and Linking with Other Code
257
4
Makefiles
261
1
C Command Line Arguments
262
3
Summary
265
1
Exercises
265
6
Input/Output
271
12
Introduction
271
1
Memory Mapped I/O
271
1
Character Devices
272
1
Programmed I/O
272
3
Interrupt-Driven I/O
275
2
Block Devices
277
1
Directory Devices
277
1
Input/Output Processors
278
1
System I/O
278
4
Summary
282
1
Exercises
282
1
Floating-Point
283
46
Introduction
283
1
Fixed Binary Point Numbers
284
1
Scientific Notation
285
4
Floating-Point
289
1
The Floating-Point Processor
290
3
A Floating-Point Program
293
6
Debugging Single Presision Floating-Point Code
295
1
An Improved Version of the Code
296
3
Floating NaNs
299
1
Subnormal Numbers
299
1
Extended Precision Floating-Point
300
4
Debugging Floating Double Programs
304
5
Floating Quad Format
309
1
Function Calls
310
2
Tagged Arithmetic
312
8
Lisp
313
5
Tagged Arithmetic Instructions
318
2
Summary
320
1
Exercises
321
8
Traps and Exceptions
329
18
Introduction
329
1
Processor State Registers
330
3
Processor State Register
331
1
Window Invalid Mask Register
331
1
Trap Base Register
332
1
Floating-Point Processor State Register
332
1
Traps
333
4
Window Traps
337
8
Summary
345
2
Memory Management
347
12
Introduction
347
1
Virtual Memory and Paging
348
7
Page Descriptor Cache
355
1
Cache Memory
356
1
Context Switching
357
1
Summary
358
1
Other Architectures
359
20
Introduction
359
1
The PDP-11
360
6
The VAX-11
366
7
The MIPS Architecture
373
3
Summary
376
1
Exercises
377
2
Ultra Sparc
379
16
Introduction
379
1
64-Bit Virtual Memory Addresses
379
3
Superscalar Execution
382
9
Branch Prediction
384
1
Branch on Integer Register
385
1
Multiple Floating-Point Condition Codes
386
1
Move Register on Condition
387
4
Instruction and Data Prefetching
391
1
Nonfaulting Loads
391
2
Changes to Supervisor Mode
393
1
Summary
394
1
A MACRO DEFINITIONS
395
4
B REGISTER NAME MACRO DEFINITIONS
399
2
C. MULTIPLICATION BY CONSTANTS
401
8
C.1 Introduction
401
1
C.2 m4 Built-in Macros
401
2
C.3 Conversion to Binary
403
2
C.4 Conversion to a Base 31 Number
405
1
C.5 Instruction Generation
406
3
D. USER MODE MACHINE INSTRUCTIONS
409
64
D.1 Syntax
409
1
D.2 Arithmetic Instructions
410
8
D.3 Logical Instructions
418
6
D.4 Shift Instructions
424
1
D.5 Load Instructions
425
2
D.6 Store Instructions
427
2
D.7 Integer Branch Instructions
429
9
D.8 Trap Instructions
438
9
D.9 Control Instructions
447
3
D.10 Floating-Point Instructions
450
15
D.11 Floating-Point Branch Instructions
465
8
E SYNTHETIC INSTRUCTIONS AND PSEUDO-OPS
473
6
F INSTRUCTIONS SORTED ALPHABETICALLY
479
4
G POWERS OF 2
483
2
H MACRO LANGUAGE PROCESSOR m4
485
4
Bibliography
489
4
Index
493