Presentation is loading. Please wait.

Presentation is loading. Please wait.

2007-1-16CPS4200 System Programming - 2007 Spring 1 Systems Programming Chapter 1 Background I.

Similar presentations


Presentation on theme: "2007-1-16CPS4200 System Programming - 2007 Spring 1 Systems Programming Chapter 1 Background I."— Presentation transcript:

1 2007-1-16CPS4200 System Programming - 2007 Spring 1 Systems Programming Chapter 1 Background I

2 2007-1-16CPS4200 System Programming - 2007 Spring 2 1.1 Introduction What is System software? –Programs that support the operation of a computer –Support the use of the computer itself –Usually related to the architecture of the machine

3 2007-1-16CPS4200 System Programming - 2007 Spring 3 System Software Assembler –System software that performs the fundamental functions of translating mnemonic operation codes (language) to their machine equivalents. Linker –Software that combines two or more separate object programs and resolve references between them

4 2007-1-16CPS4200 System Programming - 2007 Spring 4 System Software Loaders –System program that performs the loading of the object program into memory for execution Macro Processor –System program that replaces each macro instruction with the corresponding group of source language statements.

5 2007-1-16CPS4200 System Programming - 2007 Spring 5 System Software Text Edit –Program (system or application) that allows the creation, revision, saving and printing of a document. Utility Programs –System programs that allow the user to perform tasks that are not available with the original operating system.

6 2007-1-16CPS4200 System Programming - 2007 Spring 6 System Software Communications Software –Software that transmits and receives data either character by character (block by block) over communication lines. Screen Saver –Interrupt driven software that saves the elements of the screen of a monitor Terminal Emulation Software –Real time program that must service both the key board and the communication hardware

7 2007-1-16CPS4200 System Programming - 2007 Spring 7 Major Topics Assembler Loader Linker Macro processor Operating system Relationship between system software and machine architecture Design of an assembler, operating systems…. System Programming

8 2007-1-16CPS4200 System Programming - 2007 Spring 8 1.2 System Software and Machine Architecture System software is machine dependent Some of the design, logic, techniques and process are machine independent A simplified Instructional Computer (SIC) is a hypothetical machine that has been designed to include the hardware features most often found on real machine. It will be used to begin the design of system software.

9 2007-1-16CPS4200 System Programming - 2007 Spring 9 1.3 The Simplified Instructional Computer (SIC) Two version: –standard model - SIC and –XE (Extra Equipment) version - SIC/XE

10 2007-1-16CPS4200 System Programming - 2007 Spring 10 1.3.1 SIC Machine Architecture Standard Model - SIC Memory: –8-bit byte; byte address –3 consecutive bytes form a word (24 bits) –Total 32,768 (2 15 )bytes in computer memory Register –5 registers, each 24 bits (See next slide)

11 2007-1-16CPS4200 System Programming - 2007 Spring 11 1.3.1SIC Machine Architecture Register Mnemonic Number special use A0Accumulator, used for arithmetic operation X1Index register; used for addressing L2Linkage register; the Jump to subroutine (JSUB) instruction stores the return address in this register PC8Program counter; contains the address of the next instruction to be fetched for execution SW9Status word; contains a variety of information, including a Conditions Code (CC)

12 2007-1-16CPS4200 System Programming - 2007 Spring 12 1.3.1 SIC Machine Architecture Data Format: –Integer: 24-bit binary numbers –Negative number: 2’s complement representation –Character: 8-bit ASCII codes –No floating hardware

13 2007-1-16CPS4200 System Programming - 2007 Spring 13 1.3.1 SIC Machine Architecture Instruction Formats: –24-bit format X indicates indexed-addressing mode. –Example? opcode 8 x 1 15 address

14 2007-1-16CPS4200 System Programming - 2007 Spring 14 1.3.1 SIC Machine Architecture Addressing Modes: –The target address is calculated from the address given in the instruction. –Parentheses are used to indicate the contents of a register or a memory location. For, Example, (X) represents the contents of register X. ModeIndicationTarget address calculation Directx=0TA = address Indexx=1TA = address + (X)

15 2007-1-16CPS4200 System Programming - 2007 Spring 15 1.3.1 SIC Machine Architecture Instruction Set: –Load and store (LDA, LDX, STA, STX..) –Integer arithmetic operation: (ADD, SUB, MUL, DIV). All arithmetic operation involve register A and a word in memory. –Compare the value in register A with a word in memory: COMP, it sets a condition code: Condition code: CC indicate the result ( ) –Condition jump: (JLT, JEQ, JGT) can test the setting of CC and jump accordingly. –Jumps to subroutine: JSUB and places the return address in register L. RSUB returns by jumping to the address contained in register L.

16 2007-1-16CPS4200 System Programming - 2007 Spring 16 1.3.1 SIC Machine Architecture Input and output –Transferring 1 byte at a time to or from the rightmost 8 bits of register. –Each device is assigned an unique 8-bit code. Test Device (TD): test whether the addressed device is ready to send or receive a byte. The condition code is set to indicate the result of this test. ( “<” means ready, “=” means not ready) The program needing to transfer data must wait until the device is ready. Read Data (RD) or Write Data (WD)

17 2007-1-16CPS4200 System Programming - 2007 Spring 17 1.3.2 SIC/XE Machine Architecture Memory: –1 megabyte address (2 20 Byte) Register –9 registers, each 24 bits, additional registers are: Mnemonic Number special use B3Base register; used for addressing S4General working register - no special use T5General working register - no special use F6Floating-point accumulator (48 bits)

18 2007-1-16CPS4200 System Programming - 2007 Spring 18 1.3.2 SIC/XE Machine Architecture Data Formats: –In addition to 24-bit format, there is a 48-bit floating – point data type –For normalized floating-point numbers, the high-order bit of the fraction must be 1. –The exponent has value e and the fraction have value f, the absolute value of the number represented is – f * 2 (e- 1024)  with bias 1024 exponent 11 s 1 36 fraction

19 2007-1-16CPS4200 System Programming - 2007 Spring 19 1.3.2 SIC/XE Machine Architecture Instruction Formats: –The standard instruction format (15 bits address) is no longer suitable due to larger memory available.


Download ppt "2007-1-16CPS4200 System Programming - 2007 Spring 1 Systems Programming Chapter 1 Background I."

Similar presentations


Ads by Google