Muutke küpsiste eelistusi

E-raamat: Some Assembly Required: Assembly Language Programming with the AVR Microcontroller [Taylor & Francis e-raamat]

(The University of Akron, Ohio, USA)
  • Formaat: 644 pages, 57 Tables, black and white; 128 Illustrations, black and white
  • Ilmumisaeg: 05-Aug-2011
  • Kirjastus: CRC Press Inc
  • ISBN-13: 9780429086175
  • Taylor & Francis e-raamat
  • Hind: 156,95 €*
  • * hind, mis tagab piiramatu üheaegsete kasutajate arvuga ligipääsu piiramatuks ajaks
  • Tavahind: 224,21 €
  • Säästad 30%
  • Formaat: 644 pages, 57 Tables, black and white; 128 Illustrations, black and white
  • Ilmumisaeg: 05-Aug-2011
  • Kirjastus: CRC Press Inc
  • ISBN-13: 9780429086175
"A family of internationally popular microcontrollers, the Atmel AVR microcontroller series is a low-cost hardware development platform suitable for an educational environment. Until now, no text focused on the assembly language programming of these microcontrollers. Through detailed coverage of assembly language programming principles and techniques, Some Assembly Required: Assembly Language Programming with the AVR Microcontroller teaches the basic system capabilities of 8-bit AVR microcontrollers.The text illustrates fundamental computer architecture and programming structures using AVR assembly language. It employs the core AVR 8-bit RISC microcontroller architecture and a limited collection of external devices, such as push buttons, LEDs, and serialcommunications, to describe control structures, memory use and allocation, stacks, and I/O. Each chapter contains numerous examples and exercises, including programming problems.By studying assembly languages, computer scientists gain an understanding ofthe functionality of basic processors and how their capabilities support high level languages and applications. Exploring this connection between hardware and software, this book provides a foundation for understanding compilers, linkers, loaders, and operating systems in addition to the processors themselves"--

"Introduction What is Assembly Language? The functionality of every computer system is centered on a processor. The processor is responsible for controlling most aspects of the computer system. Its name indicates its function; processing data, performingarithmetic and logical operations, storing and retrieving information, and communicating with or controlling peripheral devices. Every processor has its own native language, called machine language. These are the processing instructions that are unique to each processor. Machine language instructions are simply binary codes that are interpreted by the processor's hardware and converted to a sequence of electrical signals that alter the state of the computer system. Machine language programming is accomplished by carefully devising sequences of bits, usually organized into bytes or words that need to be placed in appropriate memory locations before execution begins. Programming at the machine language level requires knowledge of what is called the Instruction Set Architecture of the processor. This level of the processor's design is realized by an even lower level, called the microarchitecture. In some cases, the microarchitecture level is implemented using even more primitive instructions called microcode. The Instruction Set Architecture of a processor includes its instruction set and the system components the instructions directly or indirectly affect. These components include registers, memory, addressing, interrupts, exceptions, and even the primitive data types that can be manipulated by the instructions. For each particular machine language, an Assembly Language can be designed to aid a programmer in the process of writing a machine language program. Assembly Language is a plain text expression of a machine"--

Provided by publisher.
Acknowledgments xxi
Author xxiii
Introduction xxv
Chapter 1 Computer Systems
1(26)
Basic Processor Architecture
1(1)
Components Of A Computer System
2(3)
Central Processing Unit
2(1)
Storage
3(1)
Input and Output
4(1)
Classification Of Processors
5(2)
CISC versus RISC
5(1)
Functionality
5(2)
Architecture
7(1)
Numeration Systems
7(9)
The Nature of Data
8(2)
Binary, Octal, Hexadecimal, Decimal
10(2)
Conversions
12(2)
Repeated Division Algorithm
14(1)
Polynomial Evaluation Algorithm
14(1)
Horner's Algorithm
14(2)
Boolean Data
16(7)
Boolean Operations
17(1)
Applications of Boolean Operations
18(2)
Mask Out, Clear, Zero
20(1)
Set and Union
20(1)
Toggle
21(1)
Shifting and Rotating Bits
22(1)
Exercises
23(4)
Chapter 2 The Atmel AVR Microcontroller Family
27(46)
The AVR Core
27(3)
Instructions
28(1)
Registers
28(1)
Clock
29(1)
Machine Language For The Avr Microcontroller
30(12)
One Plus One Equals?
30(1)
Load Immediate
31(3)
Add
34(2)
Expanding Opcodes
36(1)
Execution Trace
37(2)
Jump
39(3)
AVR Studio
42(8)
New Project
42(1)
Editor
43(1)
Assembling
43(1)
Debugger
44(4)
Mnemonics
48(2)
AVR Development Platforms
50(3)
STK-500 Development Kit
50(2)
The Atavrxplain Demonstration Kit
52(1)
Introduction To AVR Assembly Language
53(2)
Assembly Language Source Files
53(1)
Line Format
54(1)
Additional Features
54(1)
Sample AVR Assembly Language Program
55(11)
A Counting Program
56(1)
Explanation of the Statements
57(1)
Assembling the Program
58(1)
Obtaining a Listing File
58(1)
The Map File
59(1)
Simulating Execution
59(1)
Downloading to the AVR Processor
60(4)
Adjusting the Clock Speed
64(2)
Exercises
66(2)
Programming Exercises
68(1)
Alternate Programs For The Xplain Demonstration Kit
69(4)
Program 2.2a: Counter
69(4)
Chapter 3 Assembly Language
73(36)
Directives
75(4)
The Assembler's Location Counters
75(4)
Expressions
79(3)
Symbols And Literals
80(2)
Data Definition Directives
82(5)
Operators Used In Expressions
83(3)
Functions Used In Expressions
86(1)
Instructions
87(3)
Zero-Operand Instructions
89(1)
One-Operand Instructions
90(1)
Two-Operand Instructions
90(1)
The Toggler Program: Sample I/O
90(9)
Avr Digital I/O Ports And Stk-500/Xplain Leds
92(2)
Avr Digital I/O Ports And Stk-500/Xplain Pushbuttons
94(1)
The Toggler Program
95(4)
Exercises
99(3)
Programming Exercises
102(1)
Alternate Programs For The Xplain Demonstration Kit
103(6)
Program 3.1A Toggler
103(3)
Program Notes
106(3)
Chapter 4 Integer Data Representation
109(36)
Unsigned Integer Data
109(6)
Character Data
115(1)
Signed Integer Data
116(7)
Two's Complement
116(5)
One's Complement
121(1)
Sign And Magnitude
121(1)
Excess-N
122(1)
Binary Coded Decimal
123(1)
Data Values In Programs
124(4)
Define Byte, Word, And Others
124(1)
Data Encoding
125(3)
Assignment Statements
128(7)
Simple Variables
128(2)
Assignment
130(2)
Register-Based Variables
132(2)
Evaluating Expressions
134(1)
Branch Instructions
135(2)
Exercises
137(5)
Programming Exercises
142(3)
Chapter 5 Avr Core: Startup, Reset, And Memories
145(44)
AVR Reset Signal
147(3)
Interrupt Jump Table
148(2)
Basic System Organization
150(4)
Program Memory
150(1)
General Purpose Registers
150(1)
I/O Registers And Data Space
150(1)
Stack
151(3)
EEPROM Storage
154(1)
Program Memory
154(4)
Program Indirect Addressing
154(4)
Data Space
158(5)
Data Direct Addressing
158(2)
I/O Direct Addressing
160(1)
Data Indirect Addressing
160(1)
Data Indirect Addressing With Postincrement Or Predecrement
161(1)
Data Indirect Addressing With Displacement
162(1)
EEPROM
163(10)
The Standard Include File
166(1)
EEPROM Read
167(1)
Defining EEPROM Data
167(1)
Using EEPROM Data In The Avr Simulator
168(3)
Downloading EEPROM Data To The Microcontroller
171(1)
Writing Data To EEPROM
172(1)
Exercises
173(3)
Programming Exercises
176(1)
Alternate Programs For The Xplain Demonstration Kit
177(12)
Program 5.1A: Led Patterns
177(3)
The Standard Include File
180(1)
EEPROM Read
181(1)
Defining EEPROM Data
182(1)
Using EEPROM Data In The Avr Simulator 2
183(1)
Downloading EEPROM Data
184(1)
Writing Data To EEPROM
185(4)
Chapter 6 The Stack And Function Calls
189(52)
Stack
189(2)
Stack Pointer
190(1)
Push And Pop
190(1)
Functions
191(5)
Defining A Function
192(1)
Function Call Instructions
193(2)
Return Address And Ret Instructions
195(1)
Arguments, Parameters, And Return Values
196(1)
Return Values
196(15)
Arguments And Parameters: Call By Value/Call By Reference
199(1)
Memory Allocation For Parameters
200(1)
Register Parameters
201(3)
Stack Parameters
204(3)
Inline Parameters
207(4)
Local Storage
211(13)
Parameter And Local Storage Access In Stack Frames
215(1)
Fibonacci Numbers Example
215(3)
Stack Frame Naming Conventions
218(1)
Function Fibonacci Continued
219(2)
Stack Cleanup: Automatic Parameter Removal
221(1)
Preprocessor Macros
222(2)
Auxiliary Data Stack (Software Stack)
224(6)
Macros For The Data Stack
226(2)
Fibonacci With Data Stack
228(2)
Call By Reference Example
230(3)
Exercises
233(5)
Programming Exercises
238(3)
Chapter 7 Serial Communications Using The Universal Synchronous And Asynchronous Serial Receiver And Transmitter
241(34)
Rs-232
241(2)
Serial Communication Basics
243(3)
Mark And Space
244(1)
Serial Data Frame
244(2)
AVR Usart Configuration
246(9)
Baud Rate
246(2)
Data, Parity, And Stop Bits
248(3)
Physical Connections
251(2)
Terminal Programs
253(1)
Xplain Programming Notes
254(1)
AVR Usart Transmit And Receive
255(5)
Enabling The Transmitter And Receiver
255(1)
Transmitting Data
256(3)
Receiving Data
259(1)
Disabling The Transmitter Or Receiver
259(1)
Serial Transmission Errors
260(2)
Detecting Errors
260(2)
Polled I/O
262(1)
Serial Communications Example
262(4)
Transmit Time
266(1)
Exercises
266(2)
Programming Exercises
268(2)
Alternate Programs For The Xplain Demonstration Kit
270(5)
Program 7.1A Serial Echo
270(5)
Chapter 8 Logical Operations
275(30)
Bitwise Logical Operations
275(3)
Status Flags
276(2)
Uses Of Logical Instructions
278(4)
Clearing, Setting, And Toggling
280(1)
Masks
281(1)
Shift And Rotate
282(5)
Arithmetic Shifting
284(1)
Other Applications Of Shift And Rotate
285(2)
Special Bitwise Operations
287(1)
AVR Timer/Counter
288(7)
Timer/Counter 1 Configuration: Atmega16A
289(1)
Timer/Counter 1 Compare Match (Atmega16A)
290(2)
Timer/Counter Configuration: Atxmegal28A1
292(1)
Timer/Counter Period: Atxmega128A1
293(2)
Timer/Counter Example: Led Blinker
295(2)
Exercises
297(2)
Programming Exercises
299(2)
Alternate Programs For The Xplain Demonstration Kit
301(4)
Program 8.1A Led Blinker
301(4)
Chapter 9 Control Structures
305(50)
Altering The Flow Of Control
306(2)
Jump
306(1)
Call And Return
307(1)
Conditional Branch
307(1)
Jump And Conditional Branch Instructions
308(3)
Comparisons
310(1)
Conditional Skip Instructions
311(1)
Selection
311(9)
If Else
312(1)
Compound Conditions
312(6)
Multiway Selection Structure
318(1)
Computed Goto
319(1)
Looping
320(6)
While, For, And Do Until
321(5)
Pseudocode Development: A Checksum Program
326(12)
Exercises
338(4)
Programming Exercises
342(2)
Alternate Programs For The Xplain Demonstration Kit
344(11)
Chapter 10 Interrupts
355(56)
Interrupt Processing
355(7)
Interrupt Vector Table
357(1)
Interrupt Signals
358(2)
Global Interrupt Flag
360(1)
Interrupts And The Sreg
361(1)
General External Interrupts
362(6)
External Interrupt Behavior
363(1)
External Interrupt Control Registers (Atmega16A)
364(2)
External Interrupt Control Registers (Xmega Series)
366(1)
Other External Interrupts
367(1)
Interrupt-Controlled Up/Down Counter
368(4)
Timer Counter Interrupts
372(5)
AVR Timer/Counters Interrupts
373(3)
Prescaler Units
376(1)
Interrupt-Based Switch Bounce Elimination
377(8)
Usart Interrupts
385(7)
Exercises
392(3)
Programming Exercises
395(3)
Alternate Programs For The Xplain Demonstration Kit
398(13)
Chapter 11 Arithmetic Operations
411(66)
Addition And Subtraction
411(7)
Half-Adder
411(1)
Full-Adder
412(1)
Ripple Carry Adder
412(2)
Example: An 8-Bit Ripple Carry Addition
414(2)
Status Flags
416(1)
Addition
416(1)
Subtraction
417(1)
Subtraction Using Addition
418(1)
AVR Addition And Subtraction
418(11)
16-Bit Addition And Subtraction
419(2)
Immediate Data
421(2)
Comparisons
423(1)
16-Bit Support
424(1)
Increment And Decrement
425(3)
Negation
428(1)
Widening And Narrowing Conversions
429(1)
BCD Addition And Subtraction
429(2)
Binary/Bcd Conversion
431(2)
Multiplication And Division
433(10)
8-Bit Multiplication
433(1)
Extended Precision Multiplication
434(2)
Multiplication Algorithm
436(3)
Division Algorithm
439(4)
Numeric I/O And Type Conversions
443(3)
Unsigned To Ascii
443(2)
Ascii To Unsigned
445(1)
Sieve Of Eratosthenes
446(13)
Exercises
459(3)
Programming Exercises
462(2)
Alternate Programs For The Xplain Demonstration Kit
464(13)
Chapter 12 Arrays
477(40)
Declaring And Using Arrays
477(3)
Element Access
478(1)
Array Traversals
479(1)
Multidimensional Arrays
480(5)
Array Sizes
483(2)
Strings
485(3)
Fixed-Length Strings
485(1)
Variable Length Strings
485(3)
Storage Allocation
488(4)
Dynamic Memory Allocation
488(1)
String Constants And String Initialization
489(2)
String Operations
491(1)
Dynamic Memory Allocation
492(11)
A Heap For Strings
493(10)
Structures
503(5)
Linked Lists
506(2)
A Better Heap
508(3)
Exercises
511(4)
Programming Exercises
515(2)
Chapter 13 Real Numbers
517(22)
IEEE Floating Point Representation
517(8)
Range And Precision
518(1)
Decoding Ieee Single Precision Codes
519(1)
Encoding Ieee Single Precision Codes
520(2)
Denormalized Form
522(1)
Infinity And Nan
523(1)
Single Precision Range And Precision
524(1)
Addition And Subtraction Of Ieee Floating Point Numbers
525(3)
Addition
525(1)
Subtraction
526(1)
Comparison Of Floating Point Numbers
527(1)
Multiplication And Division Of Floating Point Numbers
528(2)
Multiplication
529(1)
Division
530(1)
Fixed Point Arithmetic
530(5)
Encoding And Decoding Fixed Point Representations
531(1)
Fixed Point Addition And Subtraction
531(1)
Fixed Point Multiplication And Division
532(1)
Fixed Point Notation
533(1)
AVR Fmul, Fmuls, And Fmulsu Instructions
534(1)
Summary
535(1)
Exercises
535(2)
Programming Exercises
537(2)
Chapter 14 Programming The AVR In C
539(46)
Object Files And Linkers
540(2)
Standard Functions
541(1)
Executables
542(1)
Anatomy Of A C Program
542(9)
Main Function
542(1)
Sample AVR Gcc Project
543(8)
Fundamentals Of C Programming
551(26)
Comments
551(1)
Include Files
551(2)
Functions
553(1)
Variables
554(1)
Allocation Classes
554(1)
Scope
555(3)
Special Types
558(1)
Gcc Compiler And Variable Allocation
558(6)
Arrays And Pointers
564(2)
Typedef And Struct
566(1)
Literals, Characters, And Strings
567(1)
String Functions
567(1)
Control Structures
568(1)
Arguments And Parameters
569(2)
Avr-Specific Syntax
571(2)
Function Conventions
573(1)
Program Memory
574(2)
Delay Library
576(1)
Math Library
576(1)
Assembly Language And C
577(3)
Exercises
580(3)
Programming Exercises
583(2)
Appendix A Getting Started With The Xplain Evaluation Kit 585(8)
Index 593
Timothy S. Margush, Ph.D., was an associate professor of computer science at the University of Akron. For over 30 years, he taught courses in mathematics and computer science, including many on assembly language programming using a variety of hardware platforms.