1 / 24

Chapter 1 Background

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

iain
Download Presentation

Chapter 1 Background

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

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 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

  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 (215) 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: • 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)

  6. 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)

  7. SIC/XE Machine Architecture(2/3) • Instruction formats • Format 1 • Format 2 • Format 3(e=0) • Format 4(e=1)

  8. 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

  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. scanf(“%c”,&DATA) printf(“%c”,DATA) Input and output operations

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

  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 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

More Related