Microware C Compiler User's Guide for OS-9 Microware C Compiler User's Guide: for OS-9 Copyright © 1983 Microware Systems Corporation

Total Page:16

File Type:pdf, Size:1020Kb

Microware C Compiler User's Guide for OS-9 Microware C Compiler User's Guide: for OS-9 Copyright © 1983 Microware Systems Corporation Microware C Compiler User's Guide for OS-9 Microware C Compiler User's Guide: for OS-9 Copyright © 1983 Microware Systems Corporation. All rights reserved. Reproduction of this document, in part or whole, by any means, electrical or otherwise, is prohibited, except by written permission from Microware Systems Corporation. The information contained herein is believed to be accurate as of the date of publication, however, Microware will not be liable for any damages, including indirect or consequential, from use of the OS-9 operating system or reliance on the accuracy of this documentation. The information contained herein is subject to change without notice. Acknowledgements ...................................................................................................... vii Differences between Versions 1.1 and 1.0 ........................................................................ ix 1. The C Compiler System ............................................................................................. 1 1.1. Introduction .................................................................................................... 1 1.2. The Language Implementation ........................................................................... 1 1.3. Differences from the K & R Specification ........................................................... 1 1.4. Enhancements and Extensions ........................................................................... 1 1.4.1. The “Direct” Storage Class .................................................................... 1 1.4.2. Embedded Assembly Language ............................................................... 2 1.4.3. Control Character Escape Sequences ........................................................ 2 1.5. Implementation-dependent Characteristics ........................................................... 3 1.5.1. Data Representation and Storage Requirements .......................................... 3 1.5.2. Register Variables ................................................................................. 3 1.5.3. Access To Command Line Parameters ...................................................... 4 1.5.4. References to drive names ...................................................................... 4 1.6. System Calls and the Standard Library ................................................................ 4 1.6.1. Operating System Calls ......................................................................... 4 1.6.2. The Standard Library ............................................................................ 4 1.7. Run-time Arithmetic Error Handling ................................................................... 4 1.8. Achieving Maximum Program Performance ......................................................... 5 1.8.1. Programming Considerations .................................................................. 5 1.8.2. The Optimizer Pass ............................................................................... 5 1.8.3. The Profiler ......................................................................................... 5 1.9. C Compiler Component Files and File Usage ....................................................... 5 1.9.1. Temporary Files ................................................................................... 6 1.10. Running the Compiler .................................................................................... 6 1.11. Compiler Option Flags ................................................................................... 7 2. Characteristics of Compiled Programs ........................................................................... 9 2.1. The Object Code Module ................................................................................. 9 2.1.1. Module Header .................................................................................... 9 2.1.2. Execution Offset ................................................................................. 10 2.1.3. Storage Size ....................................................................................... 10 2.1.4. Module Name .................................................................................... 10 2.1.5. Information ........................................................................................ 10 2.1.6. Executable Code ................................................................................. 10 2.1.7. String Literals .................................................................................... 10 2.1.8. Initializing Data and its Size ................................................................. 10 2.1.9. Data References .................................................................................. 10 2.2. Memory Management .................................................................................... 11 2.2.1. Typical C Program Memory Map .......................................................... 11 2.2.2. Compile Time Memory Allocation ......................................................... 12 3. C System Calls ........................................................................................................ 15 Abort ................................................................................................................. 15 Access ............................................................................................................... 15 Chain ................................................................................................................. 16 Chdir ................................................................................................................. 16 Chmod ............................................................................................................... 17 Chown ............................................................................................................... 17 Close ................................................................................................................. 18 Crc .................................................................................................................... 18 Creat ................................................................................................................. 19 Defdrive ............................................................................................................. 20 Dup ................................................................................................................... 20 Exit ................................................................................................................... 20 Getpid ................................................................................................................ 21 Getstat ............................................................................................................... 21 Getuid ................................................................................................................ 22 Intercept ............................................................................................................. 23 iii Microware C Compiler User's Guide Kill ................................................................................................................... 24 Lseek ................................................................................................................. 24 Mknod ............................................................................................................... 25 Modload ............................................................................................................. 26 Munlink ............................................................................................................. 27 Open ................................................................................................................. 27 _os9 .................................................................................................................. 28 Os9fork .............................................................................................................. 29 Pause ................................................................................................................. 30 Prerr .................................................................................................................. 30 Read .................................................................................................................. 30 Sbrk .................................................................................................................. 31 Setpr .................................................................................................................. 32 Setime ............................................................................................................... 32 Setuid ................................................................................................................ 32 Setstat ................................................................................................................ 33 Signal ................................................................................................................ 33 Stacksize ............................................................................................................ 35 Strass ................................................................................................................. 35 Tsleep ...............................................................................................................
Recommended publications
  • System Calls System Calls
    System calls We will investigate several issues related to system calls. Read chapter 12 of the book Linux system call categories file management process management error handling note that these categories are loosely defined and much is behind included, e.g. communication. Why? 1 System calls File management system call hierarchy you may not see some topics as part of “file management”, e.g., sockets 2 System calls Process management system call hierarchy 3 System calls Error handling hierarchy 4 Error Handling Anything can fail! System calls are no exception Try to read a file that does not exist! Error number: errno every process contains a global variable errno errno is set to 0 when process is created when error occurs errno is set to a specific code associated with the error cause trying to open file that does not exist sets errno to 2 5 Error Handling error constants are defined in errno.h here are the first few of errno.h on OS X 10.6.4 #define EPERM 1 /* Operation not permitted */ #define ENOENT 2 /* No such file or directory */ #define ESRCH 3 /* No such process */ #define EINTR 4 /* Interrupted system call */ #define EIO 5 /* Input/output error */ #define ENXIO 6 /* Device not configured */ #define E2BIG 7 /* Argument list too long */ #define ENOEXEC 8 /* Exec format error */ #define EBADF 9 /* Bad file descriptor */ #define ECHILD 10 /* No child processes */ #define EDEADLK 11 /* Resource deadlock avoided */ 6 Error Handling common mistake for displaying errno from Linux errno man page: 7 Error Handling Description of the perror () system call.
    [Show full text]
  • ENCE360: Operating Systems Course Outline
    ENCE360: Operating Systems Course Outline This course is an introduction to operating systems: Operating systems are a special type of software that sits between the hardware and other software applications. They function to manage various computer resources, and to provide a convenient interface to the users. This course emphasises system calls (which provide an interface between the operating system and applications) and examples of operating systems. Lecture Topic Reading Laboratory Topic Introduction to Operating Systems MOS: Ch 1 C Revision Processes and Threads MOS: Ch 2 Scheduling (processes/threads) Threads, Processes Inter-process Communicatioin (pipes/sockets) MOS: pgs 43-45, 733-734 Concurrency Pipes, Files, Signals Input/Output MOS: Ch 5 Files and Directories MOS: Ch.4 Sockets LAB TEST 1 MID SEMESTER BREAK Memory Management - Caches MOS: Ch 3, 7.8 labs on OS examples, including Memory Management - Virtual Memory MOS: Sect 3.3 Xv6 (simple teaching OS) Virtualisation Distributed Systems Operating System Examples include: Windows, Linux, Android, macOS/iOS, real-time operating systems Assignment due Staff for Operating Systems Course Supervisor & Lecturer Dr Richard Green [email protected] Lecturer: Prof Mark Claypool [email protected] Tutor Gordon Beintmann [email protected] Laboratories There are two Labs begin the first week of term scheduled lab streams. For lab times and locations, check www.canterbury.ac.nz/tt All labs will be held in the department Self-allocate your lab via labs in the Erskine https://mytimetable.canterbury.ac.nz building. /aplus/apstudent Each student should If you hit any snags, email attend one 2-hour [email protected] lab each week.
    [Show full text]
  • Dell Update Packages for Linux Operating Systems User's Guide
    Dell™ Update Packages for Linux Operating Systems User’s Guide Notes and Cautions NOTE: A NOTE indicates important information that helps you make better use of your computer. CAUTION: A CAUTION indicates potential damage to hardware or loss of data if instructions are not followed. ____________________ Information in this document is subject to change without notice. © 2009 Dell Inc. All rights reserved. Reproduction of these materials in any manner whatsoever without the written permission of Dell Inc. is strictly forbidden. Trademarks used in this text: Dell, the DELL logo, and OpenManage are trademarks of Dell Inc.; Microsoft and Windows are either trademarks or registered trademarks of Microsoft Corporation in the United States and/or other countries; Intel is a registered trademark of Intel Corporation in the United States and other countries; Red Hat and Red Hat Enterprise Linux are registered trademarks of Red Hat, Inc. in the United States and other countries; SUSE is a registered trademark of Novell, Inc. in the United States and other countries; VMware and ESX Server are registered trademarks or trademarks of VMware, Inc. in the United States and/or other jurisdictions; Citrix and XenServer are either trademarks or registered trademarks of Citrix Systems, Inc. in the United States and/or other countries. Other trademarks and trade names may be used in this document to refer to either the entities claiming the marks and names or their products. Dell Inc. disclaims any proprietary interest in trademarks and trade names other than its own. April 2009 Contents 1 Getting Started With Dell Update Packages . 7 Overview .
    [Show full text]
  • Microware OS-9 Release Notes Version 3.2
    Microware OS-9 Release Notes Version 4.1 RadiSys. 118th Street Des Moines, Iowa 50325 515-223-8000 www.radisys.com Revision A • May 2003 Copyright and publication information Reproduction notice This manual reflects version 4.1 of Microware OS-9. The software described in this document is intended to Reproduction of this document, in part or whole, by be used on a single computer system. RadiSys Corpo- any means, electrical, mechanical, magnetic, optical, ration expressly prohibits any reproduction of the soft- chemical, manual, or otherwise is prohibited, without written permission from RadiSys Corporation. ware on tape, disk, or any other medium except for backup purposes. Distribution of this software, in part Disclaimer or whole, to any other party or on any other system may constitute copyright infringements and misappropria- The information contained herein is believed to be accurate as of the date of publication. However, tion of trade secrets and confidential processes which RadiSys Corporation will not be liable for any damages are the property of RadiSys Corporation and/or other including indirect or consequential, from use of the parties. Unauthorized distribution of software may OS-9 operating system, Microware-provided software, cause damages far in excess of the value of the copies or reliance on the accuracy of this documentation. involved. The information contained herein is subject to change without notice. May 2003 Copyright ©2003 by RadiSys Corporation. All rights reserved. EPC and RadiSys are registered trademarks of RadiSys Corporation. ASM, Brahma, DAI, DAQ, MultiPro, SAIB, Spirit, and ValuePro are trademarks of RadiSys Corporation. DAVID, MAUI, OS-9, OS-9000, and SoftStax are registered trademarks of RadiSys Corporation.
    [Show full text]
  • Certified Systems Matrix 12C Release 3 (12.3.2.0.0) E59961-07 July 2016
    Oracle® Enterprise Manager Ops Center Certified Systems Matrix 12c Release 3 (12.3.2.0.0) E59961-07 July 2016 This guide lists the certified systems for Oracle Enterprise Manager Ops Center. The following topics are covered in this document: · Base Operating Systems · Base Browsers · Base Databases · Base Oracle Clusterware for High Availability · Target Operating Systems · Target Servers · Target Non-Server Hardware · Target Virtualization · Target Engineered Systems · Supported Technology Base Operating Systems This section describes the supported operating systems for the Enterprise Controller and Proxy Controller. Enterprise Controller Operating Systems This table lists the supported operating systems for the Enterprise Controller. Table 1-1 Enterprise Controller Operating Systems Enterprise Controller Operating Systems Certification Platform Version Minimum Update Level and Comments Oracle Solaris NA NA Oracle Solaris SPARC 10 Embedded Database: 1/13 Customer-Managed Database: 9/10 through 1/13 1 Table 1-1 (Cont.) Enterprise Controller Operating Systems Certification Platform Version Minimum Update Level and Comments Oracle Solaris SPARC 11 Embedded Database: 11.1 SRU 14.5 through 11.3 Customer-Managed Database: 11.0 SRU 10 through 11.3 Oracle Solaris 11 Express is not supported. Oracle Solaris SPARC 10 Embedded Database: 1/13 Local Zone Customer-Managed Database: 9/10 through 1/13 Oracle Solaris SPARC 11 Embedded Database: 11.1 SRU 14.5 through Local Zone 11.3 Customer-Managed Database: 11.0 SRU 10 through 11.3 Oracle Solaris 11 Express is not supported. Oracle VM Server for 10 Embedded Database: 1/13 SPARC Customer-Managed Database: 9/10 through 1/13 Oracle VM Server for 11 Embedded Database: 11.1 SRU 14.5 through SPARC 11.3 Customer-Managed Database: 11.0 SRU 10 through 11.3 Oracle Solaris 11 Express is not supported.
    [Show full text]
  • ROM OS-9 Into Your Coco Boisy G
    ROM OS-9 Into Your CoCo Boisy G. Pitre Imagine turning on your CoCo and instead of being greeted with the all-to-familiar Microsoft BASIC copyright message and OK prompt, you see “OS9 BOOT”. In two seconds, the OS-9 copyright banner and an OS9: prompt appears, and you have an OS-9 shell at your fingertips without having anything plugged in the CoCo’s expansion port! It may sound far out, but it’s actually quite easy to set up a ROM-based OS-9 CoCo. It can be done simply by replacing the Microsoft BASIC ROM that comes in all CoCo systems with a ROM containing OS-9 with special modifications to certain modules to allow booting from ROM. OS-9 Sans Disk? It may sound strange that OS-9 could be run totally from ROM, but indeed, this is the way that OS-9 was designed to run: without any disk storage. In the embedded OS-9 world, a disk drive or other mass storage device is incidental, or in most cases, impractical. Yet in the CoCo world, we have become accustomed to thinking of OS-9 as a Disk Operating System (DOS) as opposed to an embedded operating system. This was reinforced by the fact that Tandy/Radio Shack catalogs stated that OS-9 required a disk drive, and indeed, for the particular boot strategy that Tandy and Microware employed, a disk drive was and still is necessary. So if it is possible to use OS-9 without a disk drive, then what’s the point? How useful can OS-9 be without a disk drive? The answer: extremely useful.
    [Show full text]
  • A Framework for Visual Modular Design of Educational Operating System
    A Framework for Visual Modular Design of Educational Operating System Naeem Al-Oudat Communications and Computer Engineering Department, Tafila Technical University, Jordan [email protected] Abstract— Operating systems are a vital part in most • Memory manager. Utilizing the RAM and its computing systems. However, learning basic concepts of extensions in an efficient way is the role of this operating systems are hard for normal students although they component. are necessary and important. State of the art in teaching • File system. The main job of this component is to operating systems depends on studying existing open source operating systems like Linux, hacking teaching operating abstract the way of dealing with data and storing it in systems like Xv6, or using simulators. Difficulties of learning a permanent media as a hard disk. still there in these methods, since they require a great deal of Designing an environment where learners can work and system programming techniques. In this paper, we propose a design the above basic components of an operating system novel direction in learning operating systems that is solely without getting into the complicated details is an urgent need dependent on visually building the operating system. By using in today’s university classes of software systems. This this method, we mitigated the complexity of going into system simplicity should not make the whole process as a programming details. The development platform consists of key simulation/emulation-like design. A good option would be building blocks that a user can drag and drop into a working using pre-programmed components. The learner can select panel to build his own operating system.
    [Show full text]
  • The Development of Unix
    The development of Unix ∗ By Kasper Edwards Departmnent of Technology and Social Sciences, Technical University of Denmark Building 303 East, room 150, 2800 Lyngby, Denmark. (email: [email protected]) ABSTRACT This paper tells the story of the development of the Unix time sharing system. The development at AT&T and the MULTICS roots are uncovered. The events are presented in chronological order from 1969 to 1995. The Berkeley Software Distribution (BSD) are presented as well as the Free Software Foundation and other. Note: This is a working paper. Short sections of text, no more than two paragraphs may be quoted without permission provided that full credit is given to the source. Copyright © 2000-2001 by Kasper Edwards, all rights reserved. Comments are welcome to [email protected]. ∗ I would like to thank Keld Jørn Simmonsen, Ass. Prof. Jørgen Lindgaard Pedersen of the Technical University of Denmark and Ass. Prof. Jørgen Steensgaard for helpful comments and suggestions on earlier drafts on this paper. I assume full responsibility for any remaining vulnerabilities. Page 1 of 31 1.1 Introduction This thesis about Linux, however Linux is called a Unix clone in the sense that it looks like, and are designed on the same principles as Unix. Both Unix and Linux are POSIX (Portable Operating System Interface) compliant (described in paragraph 3.29). In short POSIX describes the Unix user interface, i.e. commands and their syntax. Some Unix’es are certified POSIX compliant but no one have yet been willing to pay a third party company to test the POSIX compliance of Linux.
    [Show full text]
  • Secure Computation Systems for Confidential Data Analysis By
    Secure Computation Systems for Confidential Data Analysis by Rishabh Poddar A dissertation submitted in partial satisfaction of the requirements for the degree of Doctor of Philosophy in Computer Science in the Graduate Division of the University of California, Berkeley Committee in charge: Professor Raluca Ada Popa, Chair Professor Ion Stoica Professor Sylvia Ratnasamy Professor Deirdre Mulligan Fall 2020 Secure Computation Systems for Confidential Data Analysis Copyright 2020 by Rishabh Poddar 1 Abstract Secure Computation Systems for Confidential Data Analysis by Rishabh Poddar Doctor of Philosophy in Computer Science University of California, Berkeley Professor Raluca Ada Popa, Chair A large number of services today are built around processing data that is collected from or shared by customers. While such services are typically able to protect the data when it is in transit or in storage using standard encryption protocols, they are unable to extend this protection to the data when it is being processed, making it vulnerable to breaches. This not only threatens data confidentiality in existing services, it also prevents customers from availing such services altogether for sensitive workloads, in that they are unwilling / unable to share their data out of privacy concerns, regulatory hurdles, or business competition. Existing solutions to this problem are unable to meet the requirements of advanced data analysis applications. Systems that are efficient do not provide strong enough security guarantees, and approaches with stronger security are often not efficient. To address this problem, the work in this dissertation develops new systems and protocols for securely computing on encrypted data, that attempt to bridge the gap between security and efficiency.
    [Show full text]
  • ® OS-9 RTOS for Power PC Based Systems Deterministic - Efficient - Scalable - Fast Booting
    MICROWARE® RTOS OS-9 for Power PC based systems Deterministic - Efficient - Scalable - Fast Booting Embedded systems span a myriad of applications, . High availability - OS-9 has the ability to add, ranging from simple microcontrollers to sophisticated remove, and replace individual components in medical imaging systems to complex industrial the system while on-line and in-use. This results applications. At the heart of these diverse applications in a high degree of system availability, even is an operating system (OS) - a software foundation during maintenance. Proven over 30 years in that delivers a common set of services helping mission critical devices around the world. software developers deliver their product to market more quickly. Enter Microware OS‐9, the high‐ performance, high‐availability real‐time operating system platform from MicroSys. The Microware OS‐9 RTOS has been deployed and proven in thousands of products worldwide and represented hundreds of embedded applications, including industrial automation and control and automotive and medical instrumentation. WHY MICROWARE OS-9 Microware OS-9 compact, high- performance multi-user, multi- tasking real-time kernel is a proven foundation for time-to-revenue success. OS-9 is a full-featured operating system framework, . Hard Real-Time Performance - Unlike Windows including the OS kernel, kernel services, and industry- and Linux-based systems, Microware OS-9 was standard APIs, middleware, and a complete IDE-based conceived from the ground up to meet the development framework. high-performance and reliability requirements of time-critical embedded applications. REDUCE RISK FAST BOOTING . High reliability - the OS-9 secure process model, real-time operating system (RTOS) provides .
    [Show full text]
  • OS-9 Technical Manual 4 Contents
    OS-9® Te c h n i c a l Manual Version 4.2 RadiSys. 118th Street Des Moines, Iowa 50325 515-223-8000 www.radisys.com Revision A • April 2003 Copyright and publication information Reproduction notice This manual reflects version 4.2 Microware OS-9. The software described in this document is intended to Reproduction of this document, in part or whole, by be used on a single computer system. RadiSys Corpo- any means, electrical, mechanical, magnetic, optical, ration expressly prohibits any reproduction of the soft- chemical, manual, or otherwise is prohibited, without written permission from RadiSys Corporation. ware on tape, disk, or any other medium except for backup purposes. Distribution of this software, in part Disclaimer or whole, to any other party or on any other system may constitute copyright infringements and misappropria- The information contained herein is believed to be accurate as of the date of publication. However, tion of trade secrets and confidential processes which RadiSys Corporation will not be liable for any damages are the property of RadiSys Corporation and/or other including indirect or consequential, from use of the parties. Unauthorized distribution of software may OS-9 operating system, Microware-provided software, cause damages far in excess of the value of the copies or reliance on the accuracy of this documentation. involved. The information contained herein is subject to change without notice. April 2003 Copyright ©2003 by RadiSys Corporation. All rights reserved. EPC and RadiSys are registered trademarks of RadiSys Corporation. ASM, Brahma, DAI, DAQ, MultiPro, SAIB, Spirit, and ValuePro are trademarks of RadiSys Corporation.
    [Show full text]
  • Linux Internals
    LINUX INTERNALS Peter Chubb and Etienne Le Sueur [email protected] A LITTLE BIT OF HISTORY • Ken Thompson and Dennis Ritchie in 1967–70 • USG and BSD • John Lions 1976–95 • Andrew Tanenbaum 1987 • Linux Torvalds 1991 NICTA Copyright c 2011 From Imagination to Impact 2 The history of UNIX-like operating systems is a history of people being dissatisfied with what they have and wanting to do some- thing better. It started when Ken Thompson got bored with MUL- TICS and wanted to write a computer game (Space Travel). He found a disused PDP-7, and wrote an interactive operating sys- tem to run his game. The main contribution at this point was the simple file-system abstraction. (Ritchie 1984) Other people found it interesting enough to want to port it to other systems, which led to the first major rewrite — from assembly to C. In some ways UNIX was the first successfully portable OS. After Ritchie & Thompson (1974) was published, AT&T became aware of a growing market for UNIX. They wanted to discourage it: it was common for AT&T salesmen to say, ‘Here’s what you get: A whole lot of tapes, and an invoice for $10 000’. Fortunately educational licences were (almost) free, and universities around the world took up UNIX as the basis for teaching and research. The University of California at Berkeley was one of those univer- NICTA Copyright c 2011 From Imagination to Impact 2-1 sities. In 1977, Bill Joy (a postgrad) put together and released the first Berkeley Software Distribution — in this instance, the main additions were a pascal compiler and Bill Joy’s ex editor.
    [Show full text]