Presentation is loading. Please wait.

Presentation is loading. Please wait.

Chapter 1 Background System Software Chih-Shun Hsu

Similar presentations


Presentation on theme: "Chapter 1 Background System Software Chih-Shun Hsu"— Presentation transcript:

1 Chapter 1 Background System Software Chih-Shun Hsu http://cc.shu.edu.tw/~cshsu

2 Introduction System software consists of a variety of programs that support the operation of a computera variety of programs By understanding the system software, you will gain a deeper understanding of how computers actually work One characteristic in which most system software differs from application software is machine dependency

3 System programs Text editor: create and modify the program Compiler: translate programs into machine language Loader and linker: load the resulting machine language program in to memory and prepared for execution Debugger: help detect errors in the program Assembler and macro processor: translate program written in assembly language into machine language Operating system: control all processes and take care of all the machine-level details

4 SIC Machine Architecture(1/2) Simplified Instructional Computer (SIC) comes in two versions: the standard model and an XE (extra equipment) version 3 consecutive bytes form a word Total 32768 (2 15 ) bytes in the memory Registers:  A: Accumulator  X: Index register  L: Linkage register  PC: Program counter  SW: Status word

5 SIC Machine Architecture(2/2) Data format: 24-bit binary numbers; negative values: 2’s complement Instruction format: Address mode:  Directx=0TA=address  Indexedx=1TA=address+(X) Instruction set: load and store registers, integer arithmetic operations, compare instruction, conditional jump instructions, subroutine linkage Input, output: read data (RD) or write data (WD) opcode(8)x(1)address(15)

6 SIC/XE Machine Architecture(1/3) Memory: I megabyte (2 20 bytes) Registers  B: base register  S, T: General working register  F: Floating-point accumulator (48 bits) Data format: 48-bit floating-point type, f*2 (e-1024) s(1)exponent(11)fraction(36)

7 SIC/XE Machine Architecture(2/3) Instruction formats Format 1 Format 2 Format 3(e=0) Format 4(e=1) op(8) r1(4)r2(4) op(6)nixbpedisp(12) op(6)nixbpeaddress(20)

8 SIC/XE Machine Architecture(3/3) Addressing mode  Base relativeb=1,p=0 TA=(B)+disp  Program-counterb=0,p=1 TA=(PC)+disp Instruction set: load and store new registers, floating-point arithmetic operations, register-to-register arithmetic operations, supervisor call instruction

9 Addressing Mode Direct addressing: b=0, p=0, disp in a format 3 instruction is the target address Indexed addressing: x=1, can be combined with any addressing mode Immediate addressing: i=1, n=0, target address is used as the operand Indirect addressing: i=0, n=1, the value of the word at the target address is taken as the address of the operand value Simple addressing: i=n=0 or 1, the target address is taken as the location of the operand

10 Examples of SIC/XE addressing mode

11 Data movement operations (SIC)

12 Data movement operations (SIC/XE) #: immediate addressing

13 Arithmetic operations (SIC) BETA=ALPHA+INCR-1 DELTA=GAMMA+INCR-1

14 Arithmetic operations (SIC/XE)

15 Looping and indexing operations (SIC) for (int i=0; i<11; i++) STR2[i]=STR1[i]

16 Looping and indexing operations (SIC/XE)

17 Indexing and looping (SIC) for (int i=0; i<300; i+=3) GAMMA[i/3]=ALPHA[i/3]+BETA[i/3]

18 Indexing and looping (SIC/XE)

19 Input and output operations scanf (“%c”,&DATA) printf(“%c”,DATA)

20 Subroutine call and record input operations (SIC) for (int i=0; i<100; i++) scanf(“%c”,&RECORD[i]);

21 Subroutine call and record input operations (SIC/XE)

22 CISC and RISC machines Complex instruction set computers (CISC): VAX, Pentium Pro Reduced instruction set computers (RISC): UltraSPARC, PowerPC, Cray T3E

23 Pentium Pro Architecture An address consists of two parts-- a segment number and an offset that points to a byte within the segment Registers: eight general purpose registers: EAX, EBX, ECX, EDX, ESI, EDI, EBP, and ESP, special purpose registers: EIP, FLAGS, CS, SS DS, ES, FS, and GS Data format: the least significant part of a numeric value is stored at the lowest-numbered address (called little- endian) Instruction format: 1 byte to 10 bytes 400 machine instructions

24 PowerPC Architecture Virtual address space of 2 64 bytes Address space is divided into fixed-length segments, which are 256 megabytes long Each segment is divided in to pages, which are 4096 bytes long 32 general purpose registers (64 bits long) Data format: the most significant part of a numeric value is stored at the lowest-numbered address (called big- endian) Seven basic instruction format (32 bits long) Approximately 200 machine instructions


Download ppt "Chapter 1 Background System Software Chih-Shun Hsu"

Similar presentations


Ads by Google