System Programming and administration

Slides:



Advertisements
Similar presentations
Introduction – This book introduces to the design and implementation of System Software
Advertisements

System Programming Design and Implementation of system software.
Instruction Set Design
1 Lecture 3: Instruction Set Architecture ISA types, register usage, memory addressing, endian and alignment, quantitative evaluation.
Princess Sumaya Univ. Computer Engineering Dept. Chapter 2: IT Students.
系 統 程 式 System Programming
Welcome to Systems Software The purpose of this course is to provide background in fundamental types of system software, particularly assemblers, loaders,
1 System Programming System Software, pp Chia-Hui Chang, Assistant Professor Dept. of Computer Science & Information Engineering National Central.
The Simplified Instructional Computer (SIC/SICXE)
1: Background1 System Programming ( 系統程式 ) Main goal: r What is a system software? m Compiler m Assembler m Loader and Linker m Debugger… r To design and.
Simplified Instructional Computer (SIC). SIC Architecture Two versions: SIC and SIC/XE (extra equipments). SIC program can be executed on SIC/XE. Memory.
SYSTEM SOFTWARE Dr.A.KANNAN, PROFESSOR & HEAD, DEPARTMENT OF IST CS2304.
System Software by Leland L. Beck chapter 1, pp.1-20.
Chapter 1 Background System Software Chih-Shun Hsu
1 Chapter 1 Background Professor Gwan-Hwan Hwang Dept. Computer Science and Information Engineering National Taiwan Normal University 9/17/2009.
1 The Simplified Instructional Computer (SIC) Hsiang-Fu Yu National Taipei University of Education.
System Software.
System Software by Leland L. Beck chapter 1, pp.1-20.
System Programming Chih-Hung Wang Chapter 1: Background (Part-1) 參考書目
Chih-Hung Wang Chapter 2: Assembler (Part-1) 參考書目 Leland L. Beck, System Software: An Introduction to Systems Programming (3rd), Addison-Wesley, 1997.
1 RISC Machines l RISC system »instruction –standard, fixed instruction format –single-cycle execution of most instructions –memory access is available.
Chih-Hung Wang Chapter 1: Background (Part-1) 參考書目 Leland L. Beck, System Software: An Introduction to Systems Programming (3rd), Addison-Wesley, 1997.
Assembler (Basic Functions)
Embedded Systems: Hardware Computer Processor Basics ISA (Instruction Set Architecture) RTL (Register Transfer Language) Main reference: Peckol, Chapter.
Background. Outlines Brief introduction to system software System software and machine architecture Simplified Instructional Computer (SIC) –Architecture.
Machine Instruction Characteristics
1 Assemblers System Programming by Leland L. Beck Chapter 2.
Computer Architecture and Organization
1/23/20067CPS4200 System Programming Spring 1 Systems Programming Chapter 1 Background III.
What is a program? A sequence of steps
Ass. Prof. Dr Masri Ayob TK 2123 Lecture 14: Instruction Set Architecture Level (Level 2)
Instruction Sets: Characteristics and Functions  Software and Hardware interface Machine Instruction Characteristics Types of Operands Types of Operations.
CC410: System Programming Dr. Manal Helal – Fall 2014 – Lecture 10 – Loaders.
CPS4200 System Programming Spring 1 Systems Programming Chapter 1 Background I.
CC410: System Programming Dr. Manal Helal – Fall 2014 – Lecture 4 - Assembler 1.
國立政治大學資訊科學系 Introduction
Computer Architecture. Instruction Set “The collection of different instructions that the processor can execute it”. Usually represented by assembly codes,
김길용 교수 분산처리연구실 시스템 프로그래밍 김길용 교수 분산처리연구실
Machine dependent Assembler Features
Immediate Addressing Mode
MIPS Instruction Set Advantages
CC410: System Programming
Prof . Ki-Dong Chung Pusan Nat’l University
Control Unit Lecture 6.
Central Processing Unit Architecture
System Programming Design and Implementation of system software.
COMP2121: Microprocessors and Interfacing
SYSTEM SOFTWARE - UNIT II
Overview Introduction General Register Organization Stack Organization
William Stallings Computer Organization and Architecture 8th Edition
THE sic mACHINE CSCI/CMPE 3334 David Egle.
BIC 10503: COMPUTER ARCHITECTURE
Assemblers - 2 CSCI/CMPE 3334 David Egle.
Central Processing Unit
Simplified Instructional Computer (SIC)
ECEG-3202 Computer Architecture and Organization
Chapter 1 Background Professor Gwan-Hwan Hwang
ECEG-3202 Computer Architecture and Organization
Simplified Instructional Computer (SIC)
ultraSPARC과 SIC/XE Machine 비교
System Programming by Leland L. Beck Chapter 2
ECEG-3202 Computer Architecture and Organization
Assemblers CSCI/CMPE 3334 David Egle.
Welcome to Systems Software
SYSTEM SOFTWARE CS2304 Dr.A.KANNAN, PROFESSOR & HEAD,
CS501 Advanced Computer Architecture
Lecture 1: SIC Architecture
Chapter 10 Instruction Sets: Characteristics and Functions
Presentation transcript:

System Programming and administration Lecture 2 System Software and Machine Architecture

2.1 System Software and Machine Architecture Application Program v.s. System Software Applications:focus on the particular application—machine independent System Software:intend to support computer operations and uses—machine dependent

2.1 System Software and Machine Architecture Machine Dependent Features with S/S Machine Architecture Instruction formats Addressing modes The number of registers The type of registers ….. and so on

2.1 System Software and Machine Architecture Machine Independent Features with S/S The general design and logic of an assembler Some of code optimization techniques The process of linking independently assembled subprograms together

2.2 Simplified Instructional Computer (SIC) Two versions SIC standard SIC/XE (eXtra Equipment or eXtra Expansive):upward compatible

2.2.1 SIC Machine Architecture Memory Features 8-bit bytes Word - 3 bytes (24 bits) Byte addressing Total memory size -- 32KBytes (215)

2.2.1 SIC Machine Architecture Register Features 5 special registers (24 bits long for each) Mnemonic Number Special use A Accumulator X 1 Index register L 2 Linkage register PC 8 Program counter SW 9 Status word

2.2.1 SIC Machine Architecture Data Formats Integer — 24-bit binary number 2’s complement representation is used for negative values Character set — 8-bit ASCII code No Floating-Point hardware support on the SIC standard version

2.2.1 SIC Machine Architecture Instruction Formats (Standard version) —24-bit format 15 x 8 1 opcode address Note that: The flag bit x is used to indicate indexed-addressing mode

2.2.1 SIC Machine Architecture Two Addressing Modes Mode Indication Target address calculation Direct x=0 TA=address Indexed x=1 TA=address+(X) Note that: ( ) means the contents of a register or a memory location

2.2.1 SIC Machine Architecture Instruction Set LDA、LDX、STA (load and store register) ADD、SUB、MUL、DIV ( +, -, *, / ) COMP、JLT、JGT、JEQ (compare, set condition code & jump) JSUB 、RSUB (jump subroutine、return to the address contained in Register L)

2.2.1 SIC Machine Architecture Input & Output Transfer 1 byte at a time to or from the rightmost 8-bits of register A Each device is assigned a unique 8-bit code Three I/O instructions Test Device (TD): “<“ means the device is ready, “=“ means the device is not ready Read Data (RD) Write Data (WD)

2.2.2 SIC/XE Machine Architecture Memory Features The memory structure is the same as SIC standard version 8-bit bytes Word—3 bytes (24 bits) Byte addressing Total Memory size : 1 MB (220)

2.2.2 SIC/XE Machine Architecture Registers: Four additional registers are provided Mnemonic Number Special use A Accumulator X 1 Index register L 2 Linkage register B 3 Base register S 4 General working register T 5 F 6 Floating-point accumulator (48 bits) PC 8 Program counter SW 9 Status word

2.2.2 SIC/XE Machine Architecture Data Formats SIC/XE provides the same data formats as the SIC standard version Integer—24-bit binary number 2’s complement representation is used for negative values Character set — 8-bit ASCII code Provides a 48-bit Floating-Point data type

2.2.2 SIC/XE Machine Architecture A 48-bit Floating-Point data type format S: sign (0=positive, 1=negative) Exponent (e) : 0 ~ 2047 (Excess-1024) Fraction (f) : 0 ~ 1, the high-order bit must be 1 (similar to IBM format) The absolute value = f * 2^(e-1024) 36 exponent 1 11 s Fraction (mantissa)

2.2.2 SIC/XE Machine Architecture Instruction Formats – Four instruction formats are provided Format 1 (1 byte) – do not reference memory at all 8 opcode Format 2 (2 byte) – do not reference memory at all 8 4 4 opcode r1 r2

2.2.2 SIC/XE Machine Architecture 12 opcode Format 3 (3 byte) 1 i n x p e=0 b displacement 6 Format 4 (4 byte) 20 opcode 1 i n x p e=1 b address 6

2.2.2 SIC/XE Machine Architecture Addressing Modes 2 new relative addressing modes are available with format 3 instructions Mode Indication Target address calculation Base relative b=1, p=0 TA=(B) + displacement (0 ≤ disp ≤ 4095) Program-counter relative b=0, p=1 TA=(PC) + displacement (-2048≤ disp ≤ 2047) Direct addressing b=0, p=0 TA=displacement (disp) Also for format 4

2.2.2 SIC/XE Machine Architecture Other aspects for memory addressing Any of above addressing modes can also be combined with indexed addressing — i.e. if bit x =1 then TA=TA+(X) The standard SIC uses only direct addressing (with or without indexing) Indexing cannot be used with immediate or indirect addressing modes

2.2.2 SIC/XE Machine Architecture Instruction Set SIC/XE provides all of the instructions that are available on the standard version Additional Instructions Load register – LDB、STB Floating-point operations -- ADDF、SUBF、MULF、DIVF Register-to-register operations -- ADDR、SUBR、MULR、DIVR、RMO (register move) Supervisor call -- SVC

2.2.2 SIC/XE Machine Architecture Input and Output I/O instructions for SIC are also available on SIC/XE (TD, RD, WD) I/O channels are used to perform I/O (i.e. allow overlay processing of computing and I/O) I/O Instructions SIO – Start I/O TIO – Test I/O HIO – Halt I/O operations

2.2.3 SIC Programming Fig. 1.2(a) -- sample data movement operations for SIC Source statement description LDA FIVE Load constant 5 into reg. A STA ALPHA Store in ALPHA LDCH CHARZ Load char “Z” into reg. A STCH C1 Store in character variable C1 … RESW 1 One-word variable WORD 5 One-word constant BYTE C”Z” One-byte constant RESB One-byte variable

2.2.3 SIC Programming Fig. 1.2(b) -- sample data movement operations for SIC/XE Source statement description LDA #5 Load value 5 into reg. A STA ALPHA Store in ALPHA LDCH #90 Load ASCII code for “Z” into reg. A STCH C1 Store in character variable C1 … RESW 1 One-word variable RESB

2.2.3 SIC Programming Fig. 1.3(a) -- sample arithmetic operations for SIC Source statement description LDA ALPHA Load ALPHA into reg. A ADD INCR Add the value of INCR SUB ONE Subtract 1 STA BETA Store in BETA GAMMA Load GAMMA into reg. A DELTA Store in DELTA …

2.2.3 SIC Programming Fig. 1.3(a) – cont’d Source statement description ONE WORD 1 one-word constant ALPHA RESW One-word variable BETA GAMMA DELTA INCR

2.2.3 SIC Programming Fig. 1.3(b) -- sample arithmetic operations for SIC/XE Source statement description LDS INCR Load value of INCR into reg.S LDA ALPHA Load ALPHA into reg. A ADDR S,A Add the value of INCR SUB #1 Subtract 1 STA BETA Store in BETA GAMMA DELTA …

2.2.3 SIC Programming Fig. 1.3(b) – cont’d Source statement description ALPHA RESW 1 One-word variable BETA GAMMA DELTA INCR

2.3 Traditional Machines (CISC) CISC– Complex Instruction Set Computers – about 200 or more instructions are provided Characteristic of CISC Have a large and complicated instruction set Several different instruction formats Many different addressing modes Two real machines are exemplified VAX series (PDP/11 & VAX) Intel x86 family (x86 and Pentium Pro)

2.4 RISC Machines Advantages of RISC computers Faster and Less expensive processor development Greater reliability Faster instruction execution time

2.4 RISC Machines Characteristics of RISC machines Standard and fixed instruction length : 1 machine word in general Single-cycle execution time for most instructions Memory access is usually done by load and store instructions only All instructions except for load and store are register-to-register type A large number of register files are provided The number of instructions, instruction formats, and addressing modes are relatively small

Questions and answers