240 likes | 382 Views
This chapter provides a comprehensive introduction to system software, which includes essential programs that facilitate the operation of a computer. It delves into the characteristics that distinguish system software from application software, emphasizing machine dependency. Key components such as text editors, compilers, loaders, linkers, debuggers, and operating systems are discussed. Moreover, it covers the architecture of Simplified Instructional Computer (SIC) and SIC/XE, including instruction formats, addressing modes, and operations. Lastly, an overview of CISC and RISC architectures, focusing on Pentium Pro and PowerPC, is presented.
E N D
Chapter 1 Background System Software Chih-Shun Hsu http://cc.shu.edu.tw/~cshsu
Introduction • System software consists of a variety of programs that support the operation of a computer • 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
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
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 (215) bytes in the memory • Registers: • A: Accumulator • X: Index register • L: Linkage register • PC: Program counter • SW: Status word
SIC Machine Architecture(2/2) • Data format: 24-bit binary numbers; negative values: 2’s complement • Instruction format: • Address mode: • Direct x=0 TA=address • Indexed x=1 TA=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)
SIC/XE Machine Architecture(1/3) • Memory: I megabyte (220 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)
SIC/XE Machine Architecture(2/3) • Instruction formats • Format 1 • Format 2 • Format 3(e=0) • Format 4(e=1)
SIC/XE Machine Architecture(3/3) • Addressing mode • Base relative b=1,p=0 TA=(B)+disp • Program-counter b=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
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
Data movement operations (SIC/XE) #: immediate addressing
Arithmetic operations (SIC) BETA=ALPHA+INCR-1 DELTA=GAMMA+INCR-1
Looping and indexing operations (SIC) for (int i=0; i<11; i++) STR2[i]=STR1[i]
Indexing and looping (SIC) for (int i=0; i<300; i+=3) GAMMA[i/3]=ALPHA[i/3]+BETA[i/3]
scanf(“%c”,&DATA) printf(“%c”,DATA) Input and output operations
for (int i=0; i<100; i++) scanf(“%c”,&RECORD[i]); Subroutine call and record input operations (SIC)
CISC and RISC machines • Complex instruction set computers (CISC): VAX, Pentium Pro • Reduced instruction set computers (RISC): UltraSPARC, PowerPC, Cray T3E
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
PowerPC Architecture • Virtual address space of 264 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