Chapter 1, Installing RCOS

With the possible exception of the equator, everything begins somewhere.

-- Peter Fleming

Introduction

Welcome to RCOS. The purpose of this manual is to provide you with some sort of introduction to RCOS, how to use it, how it is constructed and how to modify it.

This chapter first provides with the information necessary to install RCOS onto your machine. It then proceeds to give you an overview of the remaining sections of this manual.

Pre-Requisite Material

To install RCOS you will need the following

To recompile RCOS (required for 85349 assignments) you will also need one of the following compilers

Installing RCOS on an MS-DOS machine

Before installing you must select a directory on your hard-drive in which to install RCOS. During installation a directory called RCOS will be created within the directory you choose. Underneath this directory the hierarchy outlined in Diagram 1.1 will be created.

Diagram 1.1.

RCOS Directory Hierarchy.

Once you've decided on a directory in which to install RCOS follow the steps outline in Figure 1.1.

1. Insert the RCOS distribution disk into your machine

2. Change the current drive to the floppy drive the RCOS disk is in.

3. Run the install batch file. install takes one parameter. The full directory path (including drive) of where RCOS is to be installed.

e.g. install c:\

install d:\cqu\85349\

RCOS will be installed into a directory called RCOS under the directory you specify.

4. If the install batch file reports success then RCOS has been installed.

Figure 1.1.

How to install RCOS.

The Files

The contents of the rcos directory is summarised in Table 1.1.

The source Directory

The source directory contains all the source files and other files necessary for you to modify and recompile RCOS. Table 1.2 provides a summary of the files in this directory.

The x11 Directory

RCOS has been written in a platform independent manner and has been ported to the UNIX/X11 platform. The UNIX directory contains a number of files and programs that can be used convert the RCOS source files into a state that can be compiled on a UNIX platform.

This guide provides no extra help with installing or using RCOS on the UNIX platform. It is suggested you use the MS-DOS version for now. If anyone cleans up (it still has a number of bugs) the X11 port I would be interested in hearing

from you

Filename          Explanation                                                
rcos.exe          an executable version of RCOS compiled using a Borland     
                  compiler                                                   
rcos.ini          the RCOS initialisation file, can be used to control       
                  various settings of RCOS                                   
*.pcd             executable RCOS programs produced from PLL/2 source code   
pcode.exe         P-Code interpreter, enables RCOS programs to be executed   
                  for debugging                                              
pll2.exe          PLL/2 compiler, produces RCOS executable programs          
*.pll             PLL/2 source code files                                    
egavga.bgi        required by programs (such as RCOS) that were compiled     
                  using a Borland compiler and wish to use graphics          

Table 1.1.

Contents of the rcos Directory.

Summary of this Manual

The purpose of this manual is to provide you with the information required to use, understand, modify and compile RCOS. What follows is a brief summary of each chapter.

Chapter 1 Installing RCOS

Provides you with all the information you need to install RCOS onto your computer, an overview of the RCOS directory hierarchy and a summary of the RCOS Programmer's Manual.

Chapter 2 Introducing and Using RCOS

Chapter 2 introduces you to the RCOS user interface and walks you through your first session with RCOS. By the end of the chapter you should have a feel for how to use RCOS.

    Filename       Purpose                                                     
    ANIM.CPP       Class to dispatch animation messages and title bar text     
     APP.CPP       Application shell (start-up, close-down, low level          
                   message pass)                                               
     BTN.CPP       Base class for all gizmos                                   
    CONX.CPP       Operator's Console class                                    
    CPMA.DSK       Used to store the contents of RCOS' A drive                 
   CPMBDOS.CPP     Simulates the operation of a CP/M disk drive                
    CPMFS.CPP      The basic CP/M like file system RCOS uses                   
  CPU-DISP.CPP     Draw the CPU scheduler window                               
    CTRLS.CPP      Classes for supervisor control gadgets                      
   DBLLIST.CPP     Single base class for all lists (FIFO, LIFO, priority)      
  DEV-DISP.CPP     Draw the Devices window (TTY and Line Printer)              
  DEBUGKNL.CPP     debugging kernel normally not used in a normal version of   
                   RCOS                                                        
    DISPLAY.H      defines relative screen locations of all objects            
  DSK-DISP.CPP     Functions to animate disk movement and transfers            
   DSKDRV.CPP      Provides intermediate level I/O routines for disk drives    
    EXEC.CPP       Class for PCB actions and process management (Fork,         
                   Dispatch)                                                   
    EXEC.HPP       associated header (includes PCB struct definition)          
   FSIFACE.CPP     File system interface between processes and the file        
                   system                                                      
     GFX.CPP       Program Abstraction Layer for graphics                      
     IPC.CPP       Implements semaphores                                       
   KERNEL.CPP      The kernel class with Exec as a private member              
   MESSAGE.HPP     Abstract class for all Device Drivers and all messages      
                   defined                                                     
   MSHARE.CPP      Shared memory                                               
     MMU.HPP       Header defining a general memory manager                    
    MMUP.CPP       Simple Partition style memory manager                       
   MSHARE.CPP      implements shared memory                                    
     OBJ.CPP       geometric object classes (point, rectangle)                 
     PAL.CPP       Program Abstraction Layer for timer, keyboard and mouse     
     PCI.CPP       P-Code Interpreter                                          
    RCOS.HPP       Common header definitions                                   
    RCOS.CPP       Main (Supervisor) module                                    
     RNG.CPP       Ring buffer class                                           
     STR.CPP       Class for null terminated strings                           
    TIMER.CPP      Classes for System Clock and Keyboard/Mouse input           
     TTY.CPP       Class for an ANSI terminal                                  
    TTYLD.CPP      Class for Line Protocol Driver                              
   USERIP.CPP      provides high level keyboard and mouse input                

Table 1.2.

RCOS Source File Description.

Chapter 3 Writing RCOS Programs

Like any operating system RCOS can execute programs. This chapter explains how you can write programs that RCOS will execute using the Pascal like programming language included with RCOS called PLL/2.

Essential reading if you wish to create your own RCOS programs.

Chapter 4 Writing IPC Programs with RCOS

RCOS is similar to UNIX and OS/2 in that it provides two important inter-process communication mechanisms that are common in today's operating systems, shared memory and semaphores. This chapter introduces you to how these primitives can be used by PLL/2 programs that you write.

This chapter is important for gaining an understanding of concurrent programming an essential part to any operating systems subject.

Chapter 5 Compiling RCOS

This chapter supplies all the information required to compile your own executable version of the RCOS program.

You must read this if you wish to change RCOS in any way. It is suggested that you attempt to compile a version of RCOS very early in the semester to make sure it is possible with your compiler.

Chapter 6 How RCOS Works

This chapter provides an explanation of how RCOS works. It introduces the different components of RCOS, what actions they perform and how they work together.

This is a very important chapter if you wish to have any idea of how RCOS really works.

Chapter 7 Modifying RCOS

This chapter provides some hints and guidelines to use when modifying the RCOS source code to test some new algorithm or data structure.

Conclusion

This chapter has provided you with

  • all the knowledge necessary to install RCOS onto your computer,
  • an introduction to the RCOS directory hierarchy, and
  • an overview of the other chapters in this manual.