The C Programming Language Define Macros

The C Programming Language Define Macros

e UNISYS BTOS C Compiler Programming Reference Manual Copyright © 1988 Unisys Corporation All Rights Reserved Unisys is a trademark of Unisys Corporation Relative to Release September 1988 Level 1.1 Distribution Code SA Printed in U S America Priced Item 5029879 The names, places and/or events used in this publication are not intended to correspond to any individual, group, or association existing, living or otherwise. Any similarity or likeness of the names, placest and/or events with the names of any individual living or otherwise, or that of any group or association is purely coincidental and unintentional. NO WARRANTIES OF ANY NATURE ARE EXTENDED BY THE DOCUMENT. Any product and related material disclosed herein are only furnished pursuant and subject to the terms and conditions of a duly executed Program Product License or Agreement to purchase or lease equipment. The only warranties made by Unisys, if any, with respect to the products described in this document are set forth in such License or Agreement. Unisys cannot accept any financial or other responsibi1ity that may be the result of your use of the information in this document or software material, including direct, indirect, special or consequential damages. You should be very careful to ensure that the use of this information and/or software material complies with the laws, rules, and regulations of the jurisdictions with respect to which it is used. The information contained herein is subject to change without notice. Revisions may be issued to advise of such changes and/or additions. Comments or suggestions regarding this document should be submitted on a User Communication Form (UCF) with the CLASS specified as 3 (Applic. :Application Software), the Type specified as 3, and the product specified as the 7-digit form number of the manual. v About This Manual This manual contains procedures and reference information on how to install and use the BTOS C Compiler, and then link the object code into an executable run file. Who Should Use This Manual This manual is designed for users who have a working knowledge of the C programming language; it is not intended to teach a user how to write a program in C. The procedures are easier to perform if you are familiar with BTOS operations. However, the necessary information on how to install and operate the C Compiler, supplemented with references to your BTOS documentation, is included. How to Use This Manual If you are using the BTOS C Compiler for the first time, you should read section 1. It provides a brief overview of the product capabilities and features. If you scan the table of contents and review the topics before you start, you may find this manual easier to t1se. For definitions of terms used in this manual or related to this software, refer to the glossary. To locate specific information, use the index. This manual contains seven sections, three appendixes, a glossary, and an index. 5029879 vi About This Manual Conventions The following conventions apply throughout this manual: o The term BTOS refers to BTOS II in this manual. o Information you enter at your keyboard appears in boldface. o Executive commands appear in uppercase. o When two keys are used together for an operation, their names are hyphenated. For example, ACTION-GO means you hold down ACTION and press GO. Related Product Information For information on the Operating System (BTOS), refer to the BTOS II System Reference Manual. For more information about BTOS II system calls and structures, refer to the BTOS II System Procedural Interface Reference Manual. For information on system status codes, refer to the BTOS II System Status Codes Reference Manual. For information on Executive level commands, refer to the BTOS II Standard Software Operations Guide. For information on the Editor, refer to the BTOS II Editor Operations Guide. For information on BTOS Context Manager TM II, refer to the BTOS Context/Window Manager Installation and Configuration Guide. In addition, the following manuals are related to the BTOS C Compiler: o BTOS II Language Development Programming Guide (information and procedures for using the LINK, BIND, and LIBRARIAN commands) o BTOS II Debugger Programming Guide (information and procedures for debugging programs) Context Manager is a trademark of Convergent, Inc. vii Contents About This Manual. .................................. v Who Should Use This Manual ........................... v How to Use This Manual ............................... v How This Manual is Arranged ......•....•................ v Conventions ........................................... VI. Related Product Information ........................... VI Section 1: Overview ................................... 1-1 Using the C Compiler ..................................... 1-1 Features ............................................... 1-2 Memory Requirements ................................... 1·2 Section 2: BTOS C Compiler Installation ............ 2 .. 1 Installing C Compiler Software .............••••.•••..... 2-1 Installing C Compiler Software on a BTOS Workstation ••.••.. 2-1 Installing C Compiler Software on an XE520 Master .••••.... 2-2 Configuring BTOS Context Manager II to Run This Application .............................................. 2-3 Section 3: Using the C Compiler .................... 3-1 Memory Utilization .•......•............................ 3-1 Command Line Syntax ................................... 3-2 Frequently Used Command Line Options ...•............... 3-2 Controlling Compilation Activity Options ................. 3-3 Specifying Memory Model Options ........................ 3-3 Preprocessor Control Options ............................ 3-5 Disk Usage Options .................................... 3-5 Comment Control Option ............................... 3-5 Message Control Option ..•......................•...... 3-6 Adva need 0 pt ions ...•....•..........•....•.............. 3-6 8086 Support ....................................... 3-6 8087 Support ......................................... 3-7 Optimization Options ................••.•.•.............. 3-7 LINT and Warning Message Options •.......•.............. 3-9 Debugging Options ....................................... 3-13 Com pati bi lity Options ...•.•.............................. 3-13 Fast Calling Sequence Option ...•..•.......•...........•.. 3-14 Segment Naming Options ................................ 3-16 Overlay Support Options .......•.........•............•.. 3-17 CCompiler. CFG ....................•.................... 3-17 Linking a Program .........•..•..................•...... 3-19 LINT Source Fiie Comments ............................. 3·20 /* ARGSUSED *I ....................................... 3-21 /*LI NTLI BRA RY*/ ....................................... 3-21 /*NOSTRICT· I ........................................ 3-21 I* N0 TR EA c HE D*I. .... I • • • • • • • • • • •••• - • - • 3-22 5029879 viii Contents /*VARARGSn* I ..... • • • • • • • 3-22 Compiler Operation .. • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • 3-23 Temporary Files ..... • • • • • • • • • • . 3-23 Section 4: Runtime Environment. • • • • • • • • • 4-1 Pro1ram Execution ............... • • • • • • • • • • • • • • • • • • • • • 4-1 Memory Organization •....•....•.••. • • • • • • • • • • • • • • • • • • • • • 4 .. 3 Pointer Arithmetic ...•..•......•.•.. • • • • • • • • • • • • • • • • • • 4-4 Section 5: Assembly Language Interface. • • • • • • • 5·1 External Variable Names ......•....... ... 5-1 The C and PL/M Calling Sequences ............... • • • • • • • 5-2 Function Arguments • • • • • • • • • • • • . 5-2 Calling Functions .........•.•.••.•.••...•....••.• • • • • • • • 5-4 Passing Return Values .....•.•..•.•.. 5-5 Assembly Language Fiie Structure ............... 5-6 Defining Functions .•••...••••..•.••.•.•.••...•••. ••••••• 5-7 Defining Data Constants ......................... 5-7 Globa I Data .......•.......•.... • • • • • • • ••••••• 5-8 Sample Assembly Language Modules ............. ••••••• 5-8 Small Model Version ••.•.......................... • • • • • • • 5-9 Medium. Large, and Huge Model Version ... 5-9 Section 6: Library Reference .. 6-1 library Overview ...................................... 6-1 Runtime Support ......•....... • • . 6-1 1/0 Operations .... • • • • • • • • • • . 6-1 UNIX Compatible 1/0. • • • . 6-2 Standard 1/0 ....... 6-2 BTOS I/0 Services .............. • • • . 6-3 Mathematical Functions ........... • • • • • • • • • • . .. 6-3 Header Files .......................................... 6-4 ASSERT.H .. 6-4 CT:xxx.H •• I. I I ••• I •••• I ................................. 6-4 CTYPE. H •••..••••••••••••••••••••..•••..•••.••••••.•.•• 6-5 ERRNO.H .. 6-5 FLOAT.H •••..•...•..•.•.•••..•.....••..•..•...••••..... 6-5 18086.H ..... • • • • • • • • • • • • • • • • • • • • • • • . 6 .. 5 LIMITS.H •••..•••••....•.••...•....... • • • • • . 6-6 MATH. H •••..•••••....•...••.•..•..•••....•.•.•.••....• 6 .. 6 SETJMP.H ...•..•.....•.•....•......•... 6-6 SIGNAL.H .•..•••••..•.•.•....•..•.. 6-7 STDARG.H ••• 6-7 STDDEF.H ....•.......... ... • • • • • • • • • • ••• 6-7 STOLi B. H .•••••••••••••••••••••.•••.•••••.•.••••.•••••• 6-7 STDIO.H. • • • • . 6-7 STRING.H .•..•.•....•.•..•.••...•.....••..•..•.•....... 6-7 TIME.H ........ • • • • • • • • • • • • 6-8 Library C Functions. 6-8 Contents ix abs ...........•.•..............•............•......... 5 .. 9 assert ................................................. 6-10 atof, atoi, atol, strtod, strtol ............................ 6-11

View Full Text

Details

  • File Type
    pdf
  • Upload Time
    -
  • Content Languages
    English
  • Upload User
    Anonymous/Not logged-in
  • File Pages
    284 Page
  • File Size
    -

Download

Channel Download Status
Express Download Enable

Copyright

We respect the copyrights and intellectual property rights of all users. All uploaded documents are either original works of the uploader or authorized works of the rightful owners.

  • Not to be reproduced or distributed without explicit permission.
  • Not used for commercial purposes outside of approved use cases.
  • Not used to infringe on the rights of the original creators.
  • If you believe any content infringes your copyright, please contact us immediately.

Support

For help with questions, suggestions, or problems, please contact us