Zilog Z80380 User Manual
380 c-compiler user’s manual
Table of contents
Document Outline
- Introduction 1-1
- Minimum Requirements 1-3
- Installing the 380 C-compiler 1-4
- Installing ZDS 1-5
- Sample Session 1-6
- Compiling and Downloading 1-19
- Technical Support 1-21
- Overview 2-1
- Language Extensions 2-2
- Default Memory Qualifiers 2-2
- pointers 2-3
- I/O ADDRESS SPACES 2-3
- INTERRUPT FUNCTIONS 2-5
- Optimization Levels 2-9
- Understanding errors 2-11
- Included Files 2-12
- Predefined Names 2-12
- Generated Assembly File 2-12
- Object Sizes 2-13
- Section Names 2-13
- Incorporating Assembly with C 2-14
- Incorporating C with assembly 2-14
- Introduction 3-1
- Using the Linker with the C-compiler 3-3
- Invoking the Linker 3-4
- Linker symbols 3-6
- Linker Command File 3-7
- Linker Command Line 3-10
- Using the Librarian 3-13
- Function Calls 4-1
- Using the Run-Time Library 4-3
- Library Functions 4-5
- _asm function 4-5
- abs function 4-5
- atof, atoi, atol functions 4-6
- div function 4-7
- labs function 4-9
- memchr function 4-10
- memcmp function 4-10
- memcpy function 4-11
- memmove function 4-11
- memset function 4-12
- rand function 4-12
- srand function 4-13
- strcat function 4-13
- strchr function 4-14
- strcmp function 4-15
- strcpy function 4-16
- strcspn function 4-16
- strlen function 4-17
- strncat function 4-17
- strncmp function 4-18
- strncpy function 4-19
- strrchr function 4-20
- strspn function 4-20
- strstr function 4-21
- strtok function 4-21
- strtod, strtol, strtoul functions 4-22
- tolower, toupper functions 4-24
- va_arg, va_end, va_start functions 4-25
- Initialization File A-1
- Link file A-3
- Chapter 1 Introduction
- Introduction
- ZDS Environment
- Run-time model
- Minimum Requirements
- Installing the 380 C-compiler
- Registry Keys
- Installing ZDS
- Sample Session
- Create a project and Select a Processor
- Configuring the Compiler using the Wizard
- Create a File
- Manually Configuring the Compiler
- Configure Settings
- Configure Settings
- General Configuration
- Configuring Warnings
- Configuring Optimization Levels
- Defining Preprocessor Symbols
- Code Generation Configuration
- Compiling and Downloading
- Compile a Project
- Downloading a compiled file
- Open the Terminal
- Download a HEX file
- Technical Support
- Chapter 2 C-Compiler Overview
- Overview
- Language Extensions
- Assigning Types
- Default Memory Qualifiers
- pointers
- I/O ADDRESS SPACES
- Acccesing I/O Address Space
- INTERRUPT FUNCTIONS
- USING THE DOS COMMAND LINE
- Command line format
- Command line switches
- Command Line Examples
- Compiling
- Assembling
- Linking
- Optimization Levels
- Debugging Code after Optimization
- Level 1 Optimizations
- Constant Folding
- Dead Object Removal
- Simple Jump Optimization
- Level 2 Optimizations
- Constant Propagation
- Copy Propagation
- Dead Code Elimination
- Common Sub Expression Elimination
- Jump to Jump Optimization
- Loop Invariant Code Motion
- Constant Condition Evaluation
- Constant Evaluation and Expression Simplification
- Level 3 Optimizations
- Level 4 Optimizations
- Understanding errors
- Enabling Warning Messages
- Included Files
- Predefined Names
- Generated Assembly File
- Object Sizes
- Section Names
- Incorporating Assembly with C
- Incorporating C with assembly
- Example
- Chapter 3 Linking Files
- Introduction
- What the Linker Does
- Linkage Editing
- Resolving External References
- Relocating Addresses
- Debugging Support
- Creating Map Files
- Outputting OMF Files
- Using the Linker with the C-compiler
- Run Time Initialization File
- Installed files
- Invoking the Linker
- Using the Linker in ZDS
- Configuring the Linker with ZDS
- Using the linker with the command line
- Linker Command Line example
- Linker symbols
- Linker Command File
- Linker Command ASSIGN
- Linker Command COPY
- Linker Command DEFINE
- Linker Command GROUP
- Linker command LOCATE
- Linker Command ORDER
- Linker Command RANGE
- Linker Command Line
- Command Line Specifications
- Linker Command Line Options
- Symbol File In Zilog Symbol Format
- Using the Librarian
- Command Line Options
- Chapter 4 Run Time Environment
- Function Calls
- Function Call Steps
- Responsibilities of a Called Function
- Special cases for a called function
- Returning a structure
- Not allocating a local frame
- Using the Run-Time Library
- Installed files
- Library Functions
- _asm function
- abs function
- atof, atoi, atol functions
- div function
- labs function
- memchr function
- memcmp function
- memcpy function
- memmove function
- memset function
- rand function
- srand function
- strcat function
- strchr function
- strcmp function
- strcpy function
- strcspn function
- strlen function
- strncat function
- strncmp function
- strncpy function
- strrchr function
- strspn function
- strstr function
- strtok function
- strtod, strtol, strtoul functions
- tolower, toupper functions
- va_arg, va_end, va_start functions
- Appendix A Initialization and Link Files
- Appendix B ASCII Character Set
- Appendix C Problem/Suggestion Report Form
- Glossary
- Index