• Out-of-Stock
Between the assembler and C. The basics of software
search
  • Between the assembler and C. The basics of software
ID: 32826
Daniel W. Lewis
Delivery date unknown
 

Free shipping

free shipping in Poland for all orders over 500 PLN

 

Same day shipping

If your payment will be credited to our account by 11:00

 

14 days for return

Each consumer can return the purchased goods within 14 days

Author: Daniel W. Lewis

ISBN: 83-7243-412-3
Format: B5, 300 pages
Includes CD-ROM
Publisher: RM

Original edition:
Fundamentals of Embedded Software: Where C and Assembly Meet
Prentice Hall
About the book
This book is a great alternative to traditional university texts on computer organization and programming in assembler language. Assembler appears in it as it is most often used in practice - as a tool to implement small, fast and specialized procedures called from a main program written in a high level language, such as C. Based on embedded software, the book introduces multithreaded programming techniques, systems with expropriation and expropriation, shared resources and scheduling, thus providing a solid foundation for further learning of operating systems, real-time systems and microprocessor-based design.

The book should help:
  • Understand the often overlooked consequences and limitations of binary representation.
  • implement fast real-time operations using fixed-point arithmetic instead of floating-point arithmetic.
  • better understand range, parameter transfer, recursion and memory allocation.
  • use C functions (such as bit operations or variant access) commonly used in embedded software.
  • write assembler functions for the protected Intel x86 processor mode, called from the C language level
  • estimate maximum data speed and delay for different input / output programming styles
  • manage multiple threads, shared resources and critical sections.
  • develop programming techniques avoiding prioritization, deadlocks and shared memory problems.
The book comes with a CD-ROM containing all the administrative tools needed to build simple stand-alone applications embedded in a regular Pentium PC computer: C compiler, assembler, consolidator, loader, library and real-time kernels with expropriation as well as without expropriation. In addition, large portions of the source code are included in many of the sample programs found in the appendices to the book.


Table of Contents

Preface

Chapter 1 Introduction
1.1 What is a built-in system?
1.2 What makes embedded software stand out?
1.3 What does the "real-time system" mean?
1.4 What does "multitasking" mean?
1.5 What is the power of embedded processors?
1.6 Which programming languages are used?
1.7 What is the "real-time core"?
1.8 What is the uniqueness of creating a built-in application?
1.9. How large are typical embedded programs?
1.10 Software used in this book
Works

Chapter 2 Data representation
2.1 Binary numbers with constant precision
2.1.1 Positional number systems
2.1.2 Conversion of binary to decimal notation
2.1.3 Conversion of decimal notation to binary
2.1.4 Counting
2.1.5 Constant precision and range exceeding
2.1.6. Hexadecimal representation
2.2. Two-digit representation of integers
2.2.1. Total numbers with a sign
2.2.2 Positive and negative representation of the same absolute value
2.2.3 Interpreting the complement value of a binary number
2.2.4 More about the scope and excess
2.2.5 Binary addition and hardware complexity
2.3 Binary representation of real numbers
2.3.1 Fixed-point representation
2.3.2 Fixed-point recording using the 16.16 universal format
2.3.3 Fixed-point recording using the universal 32.32 format
2.3.4 Floating point representation
2.4. Text representation using ASCII code
2.5 Binary decimal digits (BCD)
Works

Chapter 3 Maximum use of C
3.1. Total types
3.2 Mixed data types
3.3 Helpful typedef and define statements
3.4 Bitwise operation in memory
3.4.1 Checking bits
3.4.2 Setting, resetting and inversion of bits
3.4.3 Extracting bits
3.4.4 Inserting bits
3.5 Bitwise operation in I / O ports
3.5.1 I / O ports for writing only
3.5.2 Port division due to writing and reading
3.5.3 Port allocation due to sequential access
3.5.4 Port division due to bits in the recorded data
3.6 Access to memory-mapped I / O devices
3.6.1 Access to data using the indicator
3.6.2 Boards, indicators and operator "address"
3.7 Structures
3.7.1 Compressed structures
3.7.2 Bit fields
3.8 Variant access
3.8.1 Projecting the address of the object
3.8.2 Using the union
Works

Chapter 4 The programmer's view on building a computer
4.1 Memory
4.2. Central processing unit (CPU)
4.2.1 Arithmetic and logic unit (ALU)
4.2.2. Other registers
4.2.3. Control unit
4.3. Input / output (I / O)
4.4 Introduction to Intel's architecture
4.4.1 Formats of instructions
4.4.2 Arguments of the instruction
4.4.3 Limitations on arguments
4.4.4 Registers
4.4.5 Stack
4.5 Real-mode architecture of Intel processors
4.5.1 Segmental addressing
4.5.2 Addressing modes
4.6 The architecture of the protected Intel processor mode
4.6.1 Segment registers and Global descriptor table
4.6.2 A flat memory model
4.6.3 Addressing modes
4.7. Prefixes overriding address arguments and size
4.8. Intel processor instructions for data processing
4.8.1 Data Transfer Instructions, Stack Instructions and I / O Instructions
4.8.2 Arithmetic instructions
4.8.3. Instructions acting on bits
4.8.4 Bit shift instructions
Works

Chapter 5 Combining C language and assembly language
5.1 Programming in assembler
5.2 Conventions of using registers
5.3. Typical use of addressing options
5.3.1 Access to data whose address is a constant
5.3.2 Access to data whose address is variable
5.4 Instructions for selecting the order
5.4.1 Compound conditions
5.4.2 If-then-else statements
5.4.3 Building a loop
5.4.4 Faster loops using string instructions
5.5 Calling up procedures and returning
5.6 Parameter transfer
5.7 Downloading parameters
5.8 Everything is passed by value
5.9 Temporary variables
Works

Chapter 6 Programming the input / output
6.1 I / O instructions for Intel processors
6.2. Synchronization, transmission speed and delay
6.3 Pending loops with interrogation
6.4 I / O controlled by interruptions
6.4.1 Hardware reaction
6.4.2 Interrupt service procedure
6.4.3 Programmable interrupt controllers
6.4.4 Buffers and queues
6.4.5 Writing the interrupt handling procedures in assembler
6.4.6 Writing interrupt handlers in C
6.4.7 Intrusion impossible to mask
6.4.8 Software breaks
6.4.9 Exceptions
6.5 DMA - direct access to memory
6.5.1 Double buffering
6.6 Comparison of methods
Works

Chapter 7 Concurrent software
7.1 Multi-level systems
7.1.1 Thread state and serialization
7.1.2 Delay management
7.1.3. Prevention of interrupt overflow
7.1.4 Transferring activities to the background
7.2 Multithreaded programming
7.2.1 Concurrent execution of independent threads
7.2.2 Switching context
7.2.3 Multitasking without expropriation (cooperative)
7.2.4 Multitasking with expropriation
7.3. Shared resources and critical sections
7.3.1 Deactivating interrupts
7.3.2 Turning off task switching
7.3.3 Rotating locks
7.3.4 Mutexes
7.3.5 Semaphores
Works

Chapter 8 Sorting tasks
8.1 Thread states
8.2. Waiting threads
8.3 Switching the context
8.4. Task scheduling
8.5. Priority based scheduling
8.5.1 Inversion of priorities
8.5.2 PIP protocol
8.5.3 PCP protocol
8.6 Assigning priorities
8.6.1. Scheduled scheduling
8.6.2. Sorting based on RMA
8.7 Deadlock
8.8 Checking clock counters
Works

Chapter 9 Memory management
9.1 Objects in C language
9.2 Range
9.2.1. Improving local coverage
9.2.2. Improving the global coverage
9.3. Life time
9.4 Automatic allocation
9.4.1 Memory class "Register"
9.5 Static allocation
9.6 Three programs to help distinguish between static and automatic allocation
9.6.1 Creating an object
9.6.2 Initializing the object
9.6.3 Deleting an object
9.7 Dynamic allocation
9.7.1 Fragmentation
9.7.2. Allocation pools
9.8 Automatic allocation of variable size (alloca)
9.8.1 Variable size boards
9.9 Recursive functions and memory allocation
Works

Chapter 10 Shared memory
10.1 Identifying shared objects
10.1.1 Shared global data
10.1.2. Shared private data
10.1.3 Shared functions
10.2. Multi-purpose functions
10.3 "Read-only" data
10.3.1. "Const" qualifier
10.4 The methods of coding advised against
10.4.1 Functions that maintain the internal state of local static objects
10.4.2 Functions returning the address of the local static object
10.5 Access to shared memory
10.5.1 Consequences of the word size of the processor
10.5.2 "Read-only" and "only write-only" access
10.5.3. "Volatile" type qualifier
Works

Chapter 11 System initialization
11.1. Organization of memory
11.2 Central processor
11.2.1 Setting the flat memory model
11.2.2 Changing the mode to protected
11.3 C runtime environment
11.3.1 Copying from ROM to RAM
11.3.2 Resetting non-initialized static data
11.3.3 Configuring the stack
11.4 System clock
11.4.1 Clock 0: clock clock
11.4.2 Clock 1: refresh memory
11.4.3 Clock 2: speaker frequency
11.5 Interrupt system
11.5.1 IDT initialization
11.5.2 Initialization of PIC 8259 devices
11.5.3 Installing a new interrupt handler (ISR)

Appendix A Contents of the CD-ROM

Appendix B Compiler C / C ++ DJGPP
Installation
Compilation
Online documentation

Appendix C NASM Assembler
Installation
Running NASM

Appendix D Program designs
CD files required by all applications
CD files required for multithreaded applications without expropriation
Compilation and assembly of the embedded application
Linking the embedded application
Starting the embedded application
Program 1: Getting to know the DJGPP compiler tools
Program 2: Using fixed-point real numbers
Program 3: Using macros and packed arguments
Program 4: using the "makefile" files
Program 5: Coding in multiplicity assemblies with increased precision
Program 6: Enhanced division encoding in assembler
Program 7: Pending loop with interrogation and interrupt-driven input / output
Program 8: Simple multithreaded application without expropriation
Program 9: Kernel with expropriation and shared resources
Program 10: Avoiding unlimited inversion of priorities
Program 11: Avoiding deadlocks

Appendix E libepc library
Memory organization and initialization
Screen functions (display.c)
Window functions (window.c)
Keyboard functions (keyboard.c)
Speaker functions (speaker.c)
Clock functions (timer.c, cycles.asm)
Access functions to the interrupt vector (init-idt.c)
Dynamic memory allocation functions (heap.c)
Fixed-point functions (fixedpt.asm)
Jumping between functions (setjmp.asm)
Other functions (init-crt.c)

Appendix F Pre-loading program

Index
32826

Other products in the same category (16)