Post-assembly Program Relocation Relocation Dictionary (RLD) and External Symbol Dictionary (ESD)

Size: px
Start display at page:

Download "Post-assembly Program Relocation Relocation Dictionary (RLD) and External Symbol Dictionary (ESD)"

Transcription

1 Post-assembly Program Relocation Relocation Dictionary (RLD) and External Symbol Dictionary (ESD) 1. Terminology: Relocatable vs. not Relocatable "relocatable" refers to something that can be moved without adjustment; i.e., the program semantics are not changed by moving the item. To say something is not relocatable means that if you move it, you will have to adjust it. For simple SIC most instructions use absolute referencing, and so most operands are not relocatable. In contrast, most SIC/XE operands are relocatable, the exception being 4-byte instructions, which usually have operands that are not relocatable. Symbols such as statement labels and self-defining literals have a value that is relative to the START statement. These are called relative references. When a relative reference is used in an absolute context, it is not relocatable; e.g., for +LDA #STUFF the operand STUFF (which is a relative reference) is not relocatable. A reference whose value does not depend on the START statement is called an absolute reference. Actual numbers are always absolute references, so in contrast, +LDA #1234 has a relocatable operand. Note that LDA 1234 is relocatable for either simple SIC or SIC/SE.

2 2. Load Process The initial load process for a relocating loader is the same as that for an absolute loader (such as the one used for the SIC Simulator); i.e., the loader simply loads the object module into memory starting from a specified memory location. For an absolute loader, this location is specified as part of the load module and since the assembler has determined all addresses in the module using this location, no addressing adjustments are required. For a relocating loader, the memory location is not specified until load time (presumably provided by the operating system or some other control program); i.e., the binding of the load module to a specific load location in memory is not determined until the time of load. Since this location was not known at the time the object module was assembled, any absolute references in the object code must be adjusted to reflect the load location in order for the loaded code to work as planned. This process is called program relocation. 3. Relocation Dictionary (RLD) If programs are to be dynamically relocated in memory, the assembler must generate a table of those program locations that are not relocatable, called the Relocation Dictionary or RLD. For discussion purposes, we assume that the program START is 0. It is a simple adjustment otherwise. The RLD is used by the loader, which (for a START of 0) simply adds the program load point to the value pointed to by each (relative) location specified in the RLD. In contrast to SIC/XE, where most operands are relocatable, the RLD for a simple SIC program would need to specify almost every instruction. The RLD is normally generated "on the fly" during pass 2 of the assembler, with each entry derived from the current value of the location counter. The only information needed in an RLD

3 entry is the (relative) location of the 3-byte word within the object module that needs to be adjusted for the object code to work. In particular, for the most common case in SIC/XE, a 4-byte instruction with a non-relocatable operand, the assembler simply adds locctr + 1 to the RLD as part of the process of generating code for the instruction. Note that it is during code generation that the assembler determines if generated code is relocatable or nonrelocatable. Example: Assume that the WORD storage directive allows symbolic references in the operand field and suppose that a program has the following lines: loc assembly language statement object code 2B1 LOOP LDB ADDR,X 6BA C4 ADDR WORD STUFF 0052A C +JSUB LOOP 4B1002B LDB # B A1 STUFF RESW Since LOOP is a label in a program, then the statement +JSUB LOOP has a relative reference (LOOP) used in an absolute context and so it is not "relocatable". This is determined during code generation in pass 2 and the location of the operand 410C+1 = 00410D is added to the RLD. In contrast, for the statement +LDB #12345 the operand is absolute, so no RLD entry is generated.

4 For the statement ADDR WORD STUFF the relative reference STUFF also occurs in an absolute context, which means that the 3-byte word generated by the assembler is not relocatable. Hence, the location for this particular WORD directive needs to be added to the RLD. Just as with "+" instructions, this is normally determined "on the fly" during pass 2 of the assembler, in this case when the WORD statement is resolved. The location counter points directly to the location of the operand; hence, the value 0002C4 is added to the RLD (which for this example also happens to be the value of ADDR).

5 4. Externally Defined Symbols, Control Sections (CSECT) Suppose that a program consists of a main routine and 2 subroutines and that these are being written independently. In order to assemble these routines, the source files must essentially be amalgamated, because each may use symbolic references defined in one of the other routines. As program size increases, the need to be able to work with subroutines and assemble them independently increases, so it is advantageous to automate this process. The mechanism employed is that of a control section (CSECT). A control section is a block of code that can be assembled independently. The first line of the block is <label> CSECT <initial-locctr> The block ends when the END statement or another CSECT is encountered. The START statement serves as the first CSECT. If a CSECT is labeled, the label is usually referred to as the name of the control section. If no initial location counter is provided, assembly starts from 0 for the control section. Since it can be assembled independently, each control section has its own RLD. There are two types of symbolic references used in a control section: 1. symbols defined in the control section that are referenced only within the section (local symbols) 2. symbols used in the control section that are not defined within the section (externally defined symbols) A local symbol name may appear in more than one control section since its reference within the section is unambiguous.

6 5. EXTREF and EXTDEF statements Example: P 87 An externally defined symbol used within a control section must be identified by using EXTREF statements within the control section; e.g., EXTREF SUB1, SUB2 The EXTREF only needs to be issued before first use of the symbol in an operand, although good form is to place all EXTREF statements at the beginning of the CSECT. It is an error for a control section to have an EXTREF for a symbol that is also defined within the section. A control section identifies symbols that are to be made available to other controls sections by using EXTDEF statements; e.g., EXTDEF TABSIZE, ADDR1 If there is a label on the CSECT statement, it is automatically included as an EXTDEF (i.e., specification as EXTDEF is inferred).

7 6. External Symbol Dictionary (ESD) The RLD provides the information needed for the loader to relocate a control section. The means for dealing with externally defined symbols is called the external symbol dictionary or ESD. In contrast to the RLD, the ESD for each control section must contain both symbolic and location information. There are 2 basic parts to the ESD: 1. EXTDEF Part: finalized in pass 1 as pairs consisting of (<EXTDEF-symbol>, <value>) [<value> = value of the symbol in the symbol table] 2. EXTREF Part: finalized in pass 2 as triples consisting of (<EXTREF-symbol>, <location>, <operation>) [<location> = (relative) location of operand referencing the symbol] [<operation> = +, -, *, / ] Example: EXTDEF part Given a control section labeled SUB1, EXTDEF TABSIZE, ADDR1 might generate as the EXTDEF part of the ESD the table: SUB TABSIZE 0000F3 ADDR1 0000DD where each EXTDEF address is taken straight from the symbol table at the end of pass 1. Each entry in the EXTDEF part of an ESD provides the value of a symbolic reference. It is an error if a symbol appears in the EXTDEF part of more than one ESD. Note that the references in the EXTDEF part are not relocatable; i.e., their values must be adjusted at load time by adding on the load point for their associated module.

8 The EXTDEF part is set up by EXTDEF statements and can be finished at the end of pass 1. In contrast, the EXTREF part can only be constructed incrementally as external operands are encountered during pass 2 code generation. At module load time, each location in the EXTREF part must be adjusted by adding on the load point for the associated module (as is also the case for the EXTDEF part). If operand arithmetic is not supported, the <operation> entry is redundant (defaults to "+"), because the value of the external reference, once known, is just added to the 3-byte value at the operand location. Example: EXTREF part Suppose that TABSIZE is an EXTREF for some module, and the assembler (in pass 2) encounters the statement +LDA TABSIZE with location counter at 12B. The pass 2 object code line generated is then and the entry for the EXTREF part of the ESD is TABSIZE 00012C + (the operand is at locctr+1) In essence, in generating the object code, the external reference to TABSIZE in this example is treated as an absolute reference (0), to be resolved at load time once the (relocated) value of TABSIZE becomes known.

9 7. Loader utilization of ESD information During program load, the loader gathers together all (relocated) EXTDEF parts and all (relocated) EXTREF parts to form a global ESD. At the end of load, each global EXTREF entry is processed against the global EXTDEFs to finalize the loaded module. By relocating all module RLDs and combining these with the values from the EXTREF part of the global ESD, a global RLD can be formed. The global RLD provides all information necessary for relocating the module elsewhere (i.e., once the program has been loaded, it can be treated as a monolithic module and can henceforward be relocated just by adjusting the locations given by the global RLD). As each EXTREF is resolved it is moved from the global ESD to the global RLD. If the module is internally complete, all EXTREFs will be resolved and the resulting global ESD will have an empty EXTREF part. In this case, any subsequent relocation of the module (e.g., in conjunction with a page swap) will require only RLD processing. The global ESD provides the means for accessing any symbolic reference specified at assembly time as an EXTDEF. If the module was designed to be a subroutine for use by other programs, then the ESD is the means whereby a calling routine can successfully link into the module using only symbolic references. A loader that does not retain the global dictionaries is said to link, load and go. The process of generating the global dictionaries and amalgamating the modules is called linkageedit. If the global dictionaries are retained with the module, then the module is in the same format as those produced by the assembler, so additional modules can be linked in later.

10 Example: follow-up to previous examples Suppose that the module which defines SUB1 is loaded at 2F8. Then the loader updates the module's EXTDEF entries and in particular we get TABSIZE 0003EB [F3+2F8] Suppose that the module that references TABSIZE is loaded at 4B7. Then this module's EXTREF entry for TABSIZE becomes TABSIZE 0005E3 + [12C+4B7] At the end of program load, the loader adjusts the content of memory address 5E3 by adding the (relocated) value of TABSIZE obtained from the EXTDEF part of the global ESD yielding EB addr 5E3 [ EB] The entry for TABSIZE in the global ESD is deleted and the address it references is placed in the global RLD (5E3). EXTDEF provides the value to use for TABSIZE EXTREF locates where TABSIZE was used in the module

11 8. Compiler generation of ESD entries Compilers are expected to produce object modules compatible with the system loader. If the system loader is a relocating loader, then the compiler must produce both an RLD and an ESD in accord with the specifications for the loader. It is straight-forward to identify the high order language constructions that correspond to EXTDEFs and EXTREFs since high level languages such as C are designed to work with other system software and system loaders in particular. In C, both global variable names and function names produce EXTDEF entries. extern declarations allow the programmer to specify EXTREFs. Any externally defined variables must be specified as extern; however, an undefined function reference is handled as an EXTREF even if there is no extern declaration. Note that in particular, standard C library functions such as printf are undefined (unless the programmer has defined a local version) and have no extern designation; i.e., they receive an EXTDEF entry in the ESD. Many extern references are contained in the include files such as stdio.h. The Unix cc compiler driver (gcc for Linux) is designed to invoke the C compiler for any uncompiled modules (which may lead to cc aborting), and then invoke a linkage-editor (ld) to produce a link-edited object module. cc processes input files through one or more of four stages: preprocessing, compilation, assembly, and linking. Unix systems do not provide for load and go except by shell command script. If all compiles are successful, and if the -c option has not been specified, cc attempts to produce an (absolute) executable module, returning an error if there is no EXTDEF named main or if there are any unresolved EXTREFs. The resulting object module is fully link-edited and ready to run. It is

12 named a.out by default, and can be named something else by using the -o option. It is also possible to produce relocatable modules using the ld command directly (-r option), which in Unix jargon are said to be partially linked. In the link-edit process, an external reference is resolved by looking at the ESDs of provided object modules only until the reference is located; i.e., for a reference defined in more than one module only the first one encountered is used. For cc, the ESDs for modules on the command line are examined first, then the ESD for the C library, then those for any other specified libraries. This allows a programmer to write an alternate version of a library function and have that used in place of the existing function. The -c option signals cc that after compiling it is to produce only a partially linked module rather than a module ready to execute. In this case, in addition to all global variable names and all function names, the ESD retains all unresolved extern references as EXTREFs. The module can then be used in a subsequent cc command to be linked in with other modules. So long as all modules observe the specifications for the system loader, ld can link modules coming from multiple sources (if C is providing the module to be initially called, note that the final link-edit needs an EXTREF named main).

Chapter 2 Assemblers http://www.intel.com/multi-core/demos.htm

Chapter 2 Assemblers http://www.intel.com/multi-core/demos.htm Chapter 2 Assemblers http://www.intel.com/multi-core/demos.htm Source Program Assembler Object Code Linker Executable Code Loader 1 Outline 2.1 Basic Assembler Functions A simple SIC assembler Assembler

More information

Embedded Systems. Review of ANSI C Topics. A Review of ANSI C and Considerations for Embedded C Programming. Basic features of C

Embedded Systems. Review of ANSI C Topics. A Review of ANSI C and Considerations for Embedded C Programming. Basic features of C Embedded Systems A Review of ANSI C and Considerations for Embedded C Programming Dr. Jeff Jackson Lecture 2-1 Review of ANSI C Topics Basic features of C C fundamentals Basic data types Expressions Selection

More information

Memory management basics (1) Requirements (1) Objectives. Operating Systems Part of E1.9 - Principles of Computers and Software Engineering

Memory management basics (1) Requirements (1) Objectives. Operating Systems Part of E1.9 - Principles of Computers and Software Engineering Memory management basics (1) Requirements (1) Operating Systems Part of E1.9 - Principles of Computers and Software Engineering Lecture 7: Memory Management I Memory management intends to satisfy the following

More information

2) Write in detail the issues in the design of code generator.

2) Write in detail the issues in the design of code generator. COMPUTER SCIENCE AND ENGINEERING VI SEM CSE Principles of Compiler Design Unit-IV Question and answers UNIT IV CODE GENERATION 9 Issues in the design of code generator The target machine Runtime Storage

More information

Next, the driver runs the C compiler (cc1), which translates main.i into an ASCII assembly language file main.s.

Next, the driver runs the C compiler (cc1), which translates main.i into an ASCII assembly language file main.s. Chapter 7 Linking Linking is the process of collecting and combining various pieces of code and data into a single file that can be loaded (copied) into memory and executed. Linking can be performed at

More information

ASSEMBLY LANGUAGE PROGRAMMING (6800) (R. Horvath, Introduction to Microprocessors, Chapter 6)

ASSEMBLY LANGUAGE PROGRAMMING (6800) (R. Horvath, Introduction to Microprocessors, Chapter 6) ASSEMBLY LANGUAGE PROGRAMMING (6800) (R. Horvath, Introduction to Microprocessors, Chapter 6) 1 COMPUTER LANGUAGES In order for a computer to be able to execute a program, the program must first be present

More information

OPERATING SYSTEM - MEMORY MANAGEMENT

OPERATING SYSTEM - MEMORY MANAGEMENT OPERATING SYSTEM - MEMORY MANAGEMENT http://www.tutorialspoint.com/operating_system/os_memory_management.htm Copyright tutorialspoint.com Memory management is the functionality of an operating system which

More information

Example of Standard API

Example of Standard API 16 Example of Standard API System Call Implementation Typically, a number associated with each system call System call interface maintains a table indexed according to these numbers The system call interface

More information

Advanced Computer Architecture-CS501. Computer Systems Design and Architecture 2.1, 2.2, 3.2

Advanced Computer Architecture-CS501. Computer Systems Design and Architecture 2.1, 2.2, 3.2 Lecture Handout Computer Architecture Lecture No. 2 Reading Material Vincent P. Heuring&Harry F. Jordan Chapter 2,Chapter3 Computer Systems Design and Architecture 2.1, 2.2, 3.2 Summary 1) A taxonomy of

More information

Traditional IBM Mainframe Operating Principles

Traditional IBM Mainframe Operating Principles C H A P T E R 1 7 Traditional IBM Mainframe Operating Principles WHEN YOU FINISH READING THIS CHAPTER YOU SHOULD BE ABLE TO: Distinguish between an absolute address and a relative address. Briefly explain

More information

MACHINE ARCHITECTURE & LANGUAGE

MACHINE ARCHITECTURE & LANGUAGE in the name of God the compassionate, the merciful notes on MACHINE ARCHITECTURE & LANGUAGE compiled by Jumong Chap. 9 Microprocessor Fundamentals A system designer should consider a microprocessor-based

More information

Lab Experience 17. Programming Language Translation

Lab Experience 17. Programming Language Translation Lab Experience 17 Programming Language Translation Objectives Gain insight into the translation process for converting one virtual machine to another See the process by which an assembler translates assembly

More information

The C Programming Language course syllabus associate level

The C Programming Language course syllabus associate level TECHNOLOGIES The C Programming Language course syllabus associate level Course description The course fully covers the basics of programming in the C programming language and demonstrates fundamental programming

More information

OPERATING SYSTEM SERVICES

OPERATING SYSTEM SERVICES OPERATING SYSTEM SERVICES USER INTERFACE Command line interface(cli):uses text commands and a method for entering them Batch interface(bi):commands and directives to control those commands are entered

More information

CS3600 SYSTEMS AND NETWORKS

CS3600 SYSTEMS AND NETWORKS CS3600 SYSTEMS AND NETWORKS NORTHEASTERN UNIVERSITY Lecture 2: Operating System Structures Prof. Alan Mislove (amislove@ccs.neu.edu) Operating System Services Operating systems provide an environment for

More information

UT69R000 MicroController Software Tools Product Brief

UT69R000 MicroController Software Tools Product Brief Military Standard Products UT69R000 MicroController Software Tools Product Brief July 1996 Introduction The UT69R000 MicroController Software Tools consist of a C Compiler (GCC), a RISC assembler (), a

More information

LC-3 Assembly Language

LC-3 Assembly Language LC-3 Assembly Language Programming and tips Textbook Chapter 7 CMPE12 Summer 2008 Assembly and Assembler Machine language - binary Assembly language - symbolic 0001110010000110 An assembler is a program

More information

Lecture 27 C and Assembly

Lecture 27 C and Assembly Ananda Gunawardena Lecture 27 C and Assembly This is a quick introduction to working with x86 assembly. Some of the instructions and register names must be check for latest commands and register names.

More information

Chapter 4 Macro Processors -- Basic Macro Processor Functions

Chapter 4 Macro Processors -- Basic Macro Processor Functions Chapter 4 Macro Processors -- Basic Macro Processor Functions Introduction A macro instruction (macro) is a notational convenience for the programmer It allows the programmer to write shorthand version

More information

X86-64 Architecture Guide

X86-64 Architecture Guide X86-64 Architecture Guide For the code-generation project, we shall expose you to a simplified version of the x86-64 platform. Example Consider the following Decaf program: class Program { int foo(int

More information

Informatica e Sistemi in Tempo Reale

Informatica e Sistemi in Tempo Reale Informatica e Sistemi in Tempo Reale Introduction to C programming Giuseppe Lipari http://retis.sssup.it/~lipari Scuola Superiore Sant Anna Pisa October 25, 2010 G. Lipari (Scuola Superiore Sant Anna)

More information

Building and Using a Cross Development Tool Chain

Building and Using a Cross Development Tool Chain Building and Using a Cross Development Tool Chain Robert Schiele rschiele@uni-mannheim.de Abstract 1 Motivation 1.1 Unix Standard System Installations When building ready-to-run applications from source,

More information

Central Processing Unit Simulation Version v2.5 (July 2005) Charles André University Nice-Sophia Antipolis

Central Processing Unit Simulation Version v2.5 (July 2005) Charles André University Nice-Sophia Antipolis Central Processing Unit Simulation Version v2.5 (July 2005) Charles André University Nice-Sophia Antipolis 1 1 Table of Contents 1 Table of Contents... 3 2 Overview... 5 3 Installation... 7 4 The CPU

More information

Chapter 5 Programming Statements. Chapter Table of Contents

Chapter 5 Programming Statements. Chapter Table of Contents Chapter 5 Programming Statements Chapter Table of Contents OVERVIEW... 57 IF-THEN/ELSE STATEMENTS... 57 DO GROUPS... 58 IterativeExecution... 59 JUMPING... 61 MODULES... 62 Defining and Executing a Module....

More information

OPERATING SYSTEMS MEMORY MANAGEMENT

OPERATING SYSTEMS MEMORY MANAGEMENT OPERATING SYSTEMS MEMORY MANAGEMENT Jerry Breecher 8: Memory Management 1 OPERATING SYSTEM Memory Management What Is In This Chapter? Just as processes share the CPU, they also share physical memory. This

More information

HPC Wales Skills Academy Course Catalogue 2015

HPC Wales Skills Academy Course Catalogue 2015 HPC Wales Skills Academy Course Catalogue 2015 Overview The HPC Wales Skills Academy provides a variety of courses and workshops aimed at building skills in High Performance Computing (HPC). Our courses

More information

Unix Shell Scripts. Contents. 1 Introduction. Norman Matloff. July 30, 2008. 1 Introduction 1. 2 Invoking Shell Scripts 2

Unix Shell Scripts. Contents. 1 Introduction. Norman Matloff. July 30, 2008. 1 Introduction 1. 2 Invoking Shell Scripts 2 Unix Shell Scripts Norman Matloff July 30, 2008 Contents 1 Introduction 1 2 Invoking Shell Scripts 2 2.1 Direct Interpretation....................................... 2 2.2 Indirect Interpretation......................................

More information

CS 3530 Operating Systems. L02 OS Intro Part 1 Dr. Ken Hoganson

CS 3530 Operating Systems. L02 OS Intro Part 1 Dr. Ken Hoganson CS 3530 Operating Systems L02 OS Intro Part 1 Dr. Ken Hoganson Chapter 1 Basic Concepts of Operating Systems Computer Systems A computer system consists of two basic types of components: Hardware components,

More information

Instruction Set Architecture (ISA)

Instruction Set Architecture (ISA) Instruction Set Architecture (ISA) * Instruction set architecture of a machine fills the semantic gap between the user and the machine. * ISA serves as the starting point for the design of a new machine

More information

The Little Man Computer

The Little Man Computer The Little Man Computer The Little Man Computer - an instructional model of von Neuman computer architecture John von Neuman (1903-1957) and Alan Turing (1912-1954) each independently laid foundation for

More information

Name: Class: Date: 9. The compiler ignores all comments they are there strictly for the convenience of anyone reading the program.

Name: Class: Date: 9. The compiler ignores all comments they are there strictly for the convenience of anyone reading the program. Name: Class: Date: Exam #1 - Prep True/False Indicate whether the statement is true or false. 1. Programming is the process of writing a computer program in a language that the computer can respond to

More information

Chapter 3: Operating-System Structures. System Components Operating System Services System Calls System Programs System Structure Virtual Machines

Chapter 3: Operating-System Structures. System Components Operating System Services System Calls System Programs System Structure Virtual Machines Chapter 3: Operating-System Structures System Components Operating System Services System Calls System Programs System Structure Virtual Machines Operating System Concepts 3.1 Common System Components

More information

Symbol Tables. Introduction

Symbol Tables. Introduction Symbol Tables Introduction A compiler needs to collect and use information about the names appearing in the source program. This information is entered into a data structure called a symbol table. The

More information

Operating System Structures

Operating System Structures COP 4610: Introduction to Operating Systems (Spring 2015) Operating System Structures Zhi Wang Florida State University Content Operating system services User interface System calls System programs Operating

More information

1 Description of The Simpletron

1 Description of The Simpletron Simulating The Simpletron Computer 50 points 1 Description of The Simpletron In this assignment you will write a program to simulate a fictional computer that we will call the Simpletron. As its name implies

More information

Z80 Instruction Set. Z80 Assembly Language

Z80 Instruction Set. Z80 Assembly Language 75 Z80 Assembly Language The assembly language allows the user to write a program without concern for memory addresses or machine instruction formats. It uses symbolic addresses to identify memory locations

More information

MACHINE INSTRUCTIONS AND PROGRAMS

MACHINE INSTRUCTIONS AND PROGRAMS CHAPTER 2 MACHINE INSTRUCTIONS AND PROGRAMS CHAPTER OBJECTIVES In this chapter you will learn about: Machine instructions and program execution, including branching and subroutine call and return operations

More information

PROBLEMS (Cap. 4 - Istruzioni macchina)

PROBLEMS (Cap. 4 - Istruzioni macchina) 98 CHAPTER 2 MACHINE INSTRUCTIONS AND PROGRAMS PROBLEMS (Cap. 4 - Istruzioni macchina) 2.1 Represent the decimal values 5, 2, 14, 10, 26, 19, 51, and 43, as signed, 7-bit numbers in the following binary

More information

/* File: blkcopy.c. size_t n

/* File: blkcopy.c. size_t n 13.1. BLOCK INPUT/OUTPUT 505 /* File: blkcopy.c The program uses block I/O to copy a file. */ #include main() { signed char buf[100] const void *ptr = (void *) buf FILE *input, *output size_t

More information

Chapter 7 Assembly Language

Chapter 7 Assembly Language Chapter 7 Assembly Language Human-Readable Machine Language Computers like ones and zeros 0001110010000110 Humans like symbols ADD R6,R2,R6 increment index reg. Assembler is a program that turns symbols

More information

Bachelors of Computer Application Programming Principle & Algorithm (BCA-S102T)

Bachelors of Computer Application Programming Principle & Algorithm (BCA-S102T) Unit- I Introduction to c Language: C is a general-purpose computer programming language developed between 1969 and 1973 by Dennis Ritchie at the Bell Telephone Laboratories for use with the Unix operating

More information

An Introduction to Assembly Programming with the ARM 32-bit Processor Family

An Introduction to Assembly Programming with the ARM 32-bit Processor Family An Introduction to Assembly Programming with the ARM 32-bit Processor Family G. Agosta Politecnico di Milano December 3, 2011 Contents 1 Introduction 1 1.1 Prerequisites............................. 2

More information

Semantic Analysis: Types and Type Checking

Semantic Analysis: Types and Type Checking Semantic Analysis Semantic Analysis: Types and Type Checking CS 471 October 10, 2007 Source code Lexical Analysis tokens Syntactic Analysis AST Semantic Analysis AST Intermediate Code Gen lexical errors

More information

Assignment Kits. Summary Kit Contents Lecture 1: Kit cover sheet (page 40)

Assignment Kits. Summary Kit Contents Lecture 1: Kit cover sheet (page 40) Assignment Kits These assignment kits contain the forms students need to do the assignments in the textbook A Discipline for Software Engineering by Watts S. Humphrey. In using them: - Provide each student

More information

C++ INTERVIEW QUESTIONS

C++ INTERVIEW QUESTIONS C++ INTERVIEW QUESTIONS http://www.tutorialspoint.com/cplusplus/cpp_interview_questions.htm Copyright tutorialspoint.com Dear readers, these C++ Interview Questions have been designed specially to get

More information

The programming language C. sws1 1

The programming language C. sws1 1 The programming language C sws1 1 The programming language C invented by Dennis Ritchie in early 1970s who used it to write the first Hello World program C was used to write UNIX Standardised as K&C (Kernighan

More information

Have both hardware and software. Want to hide the details from the programmer (user).

Have both hardware and software. Want to hide the details from the programmer (user). Input/Output Devices Chapter 5 of Tanenbaum. Have both hardware and software. Want to hide the details from the programmer (user). Ideally have the same interface to all devices (device independence).

More information

Firewall Builder Architecture Overview

Firewall Builder Architecture Overview Firewall Builder Architecture Overview Vadim Zaliva Vadim Kurland Abstract This document gives brief, high level overview of existing Firewall Builder architecture.

More information

Last Class: OS and Computer Architecture. Last Class: OS and Computer Architecture

Last Class: OS and Computer Architecture. Last Class: OS and Computer Architecture Last Class: OS and Computer Architecture System bus Network card CPU, memory, I/O devices, network card, system bus Lecture 3, page 1 Last Class: OS and Computer Architecture OS Service Protection Interrupts

More information

a storage location directly on the CPU, used for temporary storage of small amounts of data during processing.

a storage location directly on the CPU, used for temporary storage of small amounts of data during processing. CS143 Handout 18 Summer 2008 30 July, 2008 Processor Architectures Handout written by Maggie Johnson and revised by Julie Zelenski. Architecture Vocabulary Let s review a few relevant hardware definitions:

More information

VB.NET Programming Fundamentals

VB.NET Programming Fundamentals Chapter 3 Objectives Programming Fundamentals In this chapter, you will: Learn about the programming language Write a module definition Use variables and data types Compute with Write decision-making statements

More information

Database Programming with PL/SQL: Learning Objectives

Database Programming with PL/SQL: Learning Objectives Database Programming with PL/SQL: Learning Objectives This course covers PL/SQL, a procedural language extension to SQL. Through an innovative project-based approach, students learn procedural logic constructs

More information

1 Classical Universal Computer 3

1 Classical Universal Computer 3 Chapter 6: Machine Language and Assembler Christian Jacob 1 Classical Universal Computer 3 1.1 Von Neumann Architecture 3 1.2 CPU and RAM 5 1.3 Arithmetic Logical Unit (ALU) 6 1.4 Arithmetic Logical Unit

More information

S7 for Windows S7-300/400

S7 for Windows S7-300/400 S7 for Windows S7-300/400 A Programming System for the Siemens S7 300 / 400 PLC s IBHsoftec has an efficient and straight-forward programming system for the Simatic S7-300 and ern controller concept can

More information

Sample EHG CL and EHG SL10 16-bit Modbus RTU Packet

Sample EHG CL and EHG SL10 16-bit Modbus RTU Packet Sent to EHG - Read (16-bit) Process Value Controller 00000011 0x03 3 Function Code - Read Holding Registers 00000000 0x00 0 Read starting at register High byte (Process Value Controller is contained in

More information

High-Level Programming Languages. Nell Dale & John Lewis (adaptation by Michael Goldwasser)

High-Level Programming Languages. Nell Dale & John Lewis (adaptation by Michael Goldwasser) High-Level Programming Languages Nell Dale & John Lewis (adaptation by Michael Goldwasser) Low-Level Languages What are disadvantages of low-level languages? (e.g., machine code or assembly code) Programming

More information

Building Applications Using Micro Focus COBOL

Building Applications Using Micro Focus COBOL Building Applications Using Micro Focus COBOL Abstract If you look through the Micro Focus COBOL documentation, you will see many different executable file types referenced: int, gnt, exe, dll and others.

More information

PIC Programming in Assembly. (http://www.mstracey.btinternet.co.uk/index.htm)

PIC Programming in Assembly. (http://www.mstracey.btinternet.co.uk/index.htm) PIC Programming in Assembly (http://www.mstracey.btinternet.co.uk/index.htm) Tutorial 1 Good Programming Techniques. Before we get to the nitty gritty of programming the PIC, I think now is a good time

More information

THE UNIVERSITY OF AUCKLAND

THE UNIVERSITY OF AUCKLAND THE UNIVERSITY OF AUCKLAND 07.340 T07.340 EXAMINATION FOR BA BSc ETC 1995 COMPUTER SCIENCE Operating Systems ( Time allowed : THREE hours ) NOTES: Answer SIX questions. The total mark for each question

More information

A3 Computer Architecture

A3 Computer Architecture A3 Computer Architecture Engineering Science 3rd year A3 Lectures Prof David Murray david.murray@eng.ox.ac.uk www.robots.ox.ac.uk/ dwm/courses/3co Michaelmas 2000 1 / 1 6. Stacks, Subroutines, and Memory

More information

CSE 141L Computer Architecture Lab Fall 2003. Lecture 2

CSE 141L Computer Architecture Lab Fall 2003. Lecture 2 CSE 141L Computer Architecture Lab Fall 2003 Lecture 2 Pramod V. Argade CSE141L: Computer Architecture Lab Instructor: TA: Readers: Pramod V. Argade (p2argade@cs.ucsd.edu) Office Hour: Tue./Thu. 9:30-10:30

More information

Floating Point C Compiler: Tips and Tricks Part I

Floating Point C Compiler: Tips and Tricks Part I TMS320 DSP DESIGNER S NOTEBOOK Floating Point C Compiler: Tips and Tricks Part I APPLICATION BRIEF: SPRA229 Karen Baldwin Digital Signal Processing Products Semiconductor Group Texas Instruments June 1993

More information

Dynamic Adaptation using Xen:

Dynamic Adaptation using Xen: Dynamic Adaptation using Xen: Thoughts & Ideas on Loadable Hypervisor Modules Thomas Naughton, Geoffroy Vallée and Stephen L. Scott Network and Cluster Computing Computer Science and Mathematics Division

More information

Professional. SlickEdif. John Hurst IC..T...L. i 1 8 О 7» \ WILEY \ Wiley Publishing, Inc.

Professional. SlickEdif. John Hurst IC..T...L. i 1 8 О 7» \ WILEY \ Wiley Publishing, Inc. Professional SlickEdif John Hurst IC..T...L i 1 8 О 7» \ WILEY \! 2 0 0 7 " > Wiley Publishing, Inc. Acknowledgments Introduction xiii xxv Part I: Getting Started with SiickEdit Chapter 1: Introducing

More information

Introduction to Embedded Systems. Software Update Problem

Introduction to Embedded Systems. Software Update Problem Introduction to Embedded Systems CS/ECE 6780/5780 Al Davis logistics minor Today s topics: more software development issues 1 CS 5780 Software Update Problem Lab machines work let us know if they don t

More information

Introduction. dnotify

Introduction. dnotify Introduction In a multi-user, multi-process operating system, files are continually being created, modified and deleted, often by apparently unrelated processes. This means that any software that needs

More information

Getting Started with STATISTICA Enterprise Programming

Getting Started with STATISTICA Enterprise Programming Getting Started with STATISTICA Enterprise Programming 2300 East 14th Street Tulsa, OK 74104 Phone: (918) 749 1119 Fax: (918) 749 2217 E mail: mailto:developerdocumentation@statsoft.com Web: www.statsoft.com

More information

We will learn the Python programming language. Why? Because it is easy to learn and many people write programs in Python so we can share.

We will learn the Python programming language. Why? Because it is easy to learn and many people write programs in Python so we can share. LING115 Lecture Note Session #4 Python (1) 1. Introduction As we have seen in previous sessions, we can use Linux shell commands to do simple text processing. We now know, for example, how to count words.

More information

Introduction. What is an Operating System?

Introduction. What is an Operating System? Introduction What is an Operating System? 1 What is an Operating System? 2 Why is an Operating System Needed? 3 How Did They Develop? Historical Approach Affect of Architecture 4 Efficient Utilization

More information

Multiprogramming. IT 3123 Hardware and Software Concepts. Program Dispatching. Multiprogramming. Program Dispatching. Program Dispatching

Multiprogramming. IT 3123 Hardware and Software Concepts. Program Dispatching. Multiprogramming. Program Dispatching. Program Dispatching IT 3123 Hardware and Software Concepts Operating Systems II October 26 Multiprogramming Two or more application programs in memory. Consider one CPU and more than one program. This can be generalized to

More information

Programming Languages

Programming Languages Programming Languages Programming languages bridge the gap between people and machines; for that matter, they also bridge the gap among people who would like to share algorithms in a way that immediately

More information

Decomposition into Parts. Software Engineering, Lecture 4. Data and Function Cohesion. Allocation of Functions and Data. Component Interfaces

Decomposition into Parts. Software Engineering, Lecture 4. Data and Function Cohesion. Allocation of Functions and Data. Component Interfaces Software Engineering, Lecture 4 Decomposition into suitable parts Cross cutting concerns Design patterns I will also give an example scenario that you are supposed to analyse and make synthesis from The

More information

Programming Languages

Programming Languages Programming Languages Qing Yi Course web site: www.cs.utsa.edu/~qingyi/cs3723 cs3723 1 A little about myself Qing Yi Ph.D. Rice University, USA. Assistant Professor, Department of Computer Science Office:

More information

Exceptions in MIPS. know the exception mechanism in MIPS be able to write a simple exception handler for a MIPS machine

Exceptions in MIPS. know the exception mechanism in MIPS be able to write a simple exception handler for a MIPS machine 7 Objectives After completing this lab you will: know the exception mechanism in MIPS be able to write a simple exception handler for a MIPS machine Introduction Branches and jumps provide ways to change

More information

Beyond the Mouse A Short Course on Programming

Beyond the Mouse A Short Course on Programming 1 / 22 Beyond the Mouse A Short Course on Programming 2. Fundamental Programming Principles I: Variables and Data Types Ronni Grapenthin Geophysical Institute, University of Alaska Fairbanks September

More information

Chapter 3 Operating-System Structures

Chapter 3 Operating-System Structures Contents 1. Introduction 2. Computer-System Structures 3. Operating-System Structures 4. Processes 5. Threads 6. CPU Scheduling 7. Process Synchronization 8. Deadlocks 9. Memory Management 10. Virtual

More information

Sources: On the Web: Slides will be available on:

Sources: On the Web: Slides will be available on: C programming Introduction The basics of algorithms Structure of a C code, compilation step Constant, variable type, variable scope Expression and operators: assignment, arithmetic operators, comparison,

More information

MBR and EFI Disk Partition Systems

MBR and EFI Disk Partition Systems MBR and EFI Disk Partition Systems Brought to you by www.rmroberts.com Computer technology is constantly evolving. The hard disk drive partition system has become quite complicated in recent years because

More information

Notes on Assembly Language

Notes on Assembly Language Notes on Assembly Language Brief introduction to assembly programming The main components of a computer that take part in the execution of a program written in assembly code are the following: A set of

More information

Computer Architecture Lecture 2: Instruction Set Principles (Appendix A) Chih Wei Liu 劉 志 尉 National Chiao Tung University cwliu@twins.ee.nctu.edu.

Computer Architecture Lecture 2: Instruction Set Principles (Appendix A) Chih Wei Liu 劉 志 尉 National Chiao Tung University cwliu@twins.ee.nctu.edu. Computer Architecture Lecture 2: Instruction Set Principles (Appendix A) Chih Wei Liu 劉 志 尉 National Chiao Tung University cwliu@twins.ee.nctu.edu.tw Review Computers in mid 50 s Hardware was expensive

More information

Microsoft Visual Basic Scripting Edition and Microsoft Windows Script Host Essentials

Microsoft Visual Basic Scripting Edition and Microsoft Windows Script Host Essentials Microsoft Visual Basic Scripting Edition and Microsoft Windows Script Host Essentials 2433: Microsoft Visual Basic Scripting Edition and Microsoft Windows Script Host Essentials (3 Days) About this Course

More information

C Compiler Targeting the Java Virtual Machine

C Compiler Targeting the Java Virtual Machine C Compiler Targeting the Java Virtual Machine Jack Pien Senior Honors Thesis (Advisor: Javed A. Aslam) Dartmouth College Computer Science Technical Report PCS-TR98-334 May 30, 1998 Abstract One of the

More information

Lumousoft Visual Programming Language and its IDE

Lumousoft Visual Programming Language and its IDE Lumousoft Visual Programming Language and its IDE Xianliang Lu Lumousoft Inc. Waterloo Ontario Canada Abstract - This paper presents a new high-level graphical programming language and its IDE (Integration

More information

1/20/2016 INTRODUCTION

1/20/2016 INTRODUCTION INTRODUCTION 1 Programming languages have common concepts that are seen in all languages This course will discuss and illustrate these common concepts: Syntax Names Types Semantics Memory Management We

More information

Molecular Dynamics Simulations with Applications in Soft Matter Handout 7 Memory Diagram of a Struct

Molecular Dynamics Simulations with Applications in Soft Matter Handout 7 Memory Diagram of a Struct Dr. Martin O. Steinhauser University of Basel Graduate Lecture Spring Semester 2014 Molecular Dynamics Simulations with Applications in Soft Matter Handout 7 Memory Diagram of a Struct Friday, 7 th March

More information

Regular Expressions and Automata using Haskell

Regular Expressions and Automata using Haskell Regular Expressions and Automata using Haskell Simon Thompson Computing Laboratory University of Kent at Canterbury January 2000 Contents 1 Introduction 2 2 Regular Expressions 2 3 Matching regular expressions

More information

Stack Allocation. Run-Time Data Structures. Static Structures

Stack Allocation. Run-Time Data Structures. Static Structures Run-Time Data Structures Stack Allocation Static Structures For static structures, a fixed address is used throughout execution. This is the oldest and simplest memory organization. In current compilers,

More information

arrays C Programming Language - Arrays

arrays C Programming Language - Arrays arrays So far, we have been using only scalar variables scalar meaning a variable with a single value But many things require a set of related values coordinates or vectors require 3 (or 2, or 4, or more)

More information

MASSACHUSETTS INSTITUTE OF TECHNOLOGY PROJECT MAC. Memorandum-M-352 July 21, 1967 ABSTRACT

MASSACHUSETTS INSTITUTE OF TECHNOLOGY PROJECT MAC. Memorandum-M-352 July 21, 1967 ABSTRACT MASSACHUSETTS INSTITUTE OF TECHNOLOGY PROJECT MAC Memorandum-M-352 July 21, 1967 To: From: Subject: Project MAC Participants Martin Richards The BCPL Reference Manual ABSTRACT BCPL is a simple recursive

More information

How to Write a Simple Makefile

How to Write a Simple Makefile Chapter 1 CHAPTER 1 How to Write a Simple Makefile The mechanics of programming usually follow a fairly simple routine of editing source files, compiling the source into an executable form, and debugging

More information

The Import & Export of Data from a Database

The Import & Export of Data from a Database The Import & Export of Data from a Database Introduction The aim of these notes is to investigate a conceptually simple model for importing and exporting data into and out of an object-relational database,

More information

CHAPTER 7. E-Mailing with CGI

CHAPTER 7. E-Mailing with CGI CHAPTER 7 E-Mailing with CGI OVERVIEW One of the most important tasks of any CGI program is ultimately to let someone know that something has happened. The most convenient way for users is to have this

More information

HP OpenView AssetCenter

HP OpenView AssetCenter HP OpenView AssetCenter Software version: 5.0 Integration with software distribution tools Build number: 50 Legal Notices Warranty The only warranties for HP products and services are set forth in the

More information

Object Oriented Software Design

Object Oriented Software Design Object Oriented Software Design Introduction to Java - II Giuseppe Lipari http://retis.sssup.it/~lipari Scuola Superiore Sant Anna Pisa October 28, 2010 G. Lipari (Scuola Superiore Sant Anna) Introduction

More information

CSC 2405: Computer Systems II

CSC 2405: Computer Systems II CSC 2405: Computer Systems II Spring 2013 (TR 8:30-9:45 in G86) Mirela Damian http://www.csc.villanova.edu/~mdamian/csc2405/ Introductions Mirela Damian Room 167A in the Mendel Science Building mirela.damian@villanova.edu

More information

Automatic Logging of Operating System Effects to Guide Application-Level Architecture Simulation

Automatic Logging of Operating System Effects to Guide Application-Level Architecture Simulation Automatic Logging of Operating System Effects to Guide Application-Level Architecture Simulation Satish Narayanasamy, Cristiano Pereira, Harish Patil, Robert Cohn, and Brad Calder Computer Science and

More information

RECOVER ( 8 ) Maintenance Procedures RECOVER ( 8 )

RECOVER ( 8 ) Maintenance Procedures RECOVER ( 8 ) NAME recover browse and recover NetWorker files SYNOPSIS recover [-f] [-n] [-q] [-u] [-i {nnyyrr}] [-d destination] [-c client] [-t date] [-sserver] [dir] recover [-f] [-n] [-u] [-q] [-i {nnyyrr}] [-I

More information

Chapter 6, The Operating System Machine Level

Chapter 6, The Operating System Machine Level Chapter 6, The Operating System Machine Level 6.1 Virtual Memory 6.2 Virtual I/O Instructions 6.3 Virtual Instructions For Parallel Processing 6.4 Example Operating Systems 6.5 Summary Virtual Memory General

More information

Enforcing Security Policies. Rahul Gera

Enforcing Security Policies. Rahul Gera Enforcing Security Policies Rahul Gera Brief overview Security policies and Execution Monitoring. Policies that can be enforced using EM. An automata based formalism for specifying those security policies.

More information

Organization of Programming Languages CS320/520N. Lecture 05. Razvan C. Bunescu School of Electrical Engineering and Computer Science bunescu@ohio.

Organization of Programming Languages CS320/520N. Lecture 05. Razvan C. Bunescu School of Electrical Engineering and Computer Science bunescu@ohio. Organization of Programming Languages CS320/520N Razvan C. Bunescu School of Electrical Engineering and Computer Science bunescu@ohio.edu Names, Bindings, and Scopes A name is a symbolic identifier used

More information