1 The Simplified Instructional Computer (SIC) Hsiang-Fu Yu National Taipei University of Education.

Slides:



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

Chapter Outline Chapter 1 of Beck’s “System Software” book
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.
INSTRUCTION SET ARCHITECTURES
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.
Machine-Dependent Assembler Features (SIC/XE Assembler) Instruction Formats, Addressing Modes, and Program Relocation.
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.
System Programming System Software:
System Software.
System Software by Leland L. Beck chapter 1, pp.1-20.
Chapter 6: Machine dependent Assembler Features
System Programming Chih-Hung Wang Chapter 1: Background (Part-1) 參考書目
CS2422 Assembly Language & System Programming November 28, 2006.
System Programming System Software:
Chapter 4 Processor Technology and Architecture. Chapter goals Describe CPU instruction and execution cycles Explain how primitive CPU instructions are.
CS2422 Assembly Language & System Programming November 21, 2006.
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)
Background. Outlines Brief introduction to system software System software and machine architecture Simplified Instructional Computer (SIC) –Architecture.
Machine Instruction Characteristics
Classifying GPR Machines TypeNumber of Operands Memory Operands Examples Register- Register 30 SPARC, MIPS, etc. Register- Memory 21 Intel 80x86, Motorola.
Chapter 2-2 Assembly Instructions Number Systems Number Systems Assembly Instructions Assembly Instructions Branch Branch Next Lecture Next Lecture  Addressing.
Instruction Set Architecture The portion of the machine visible to the programmer Issues: Internal storage model Addressing modes Operations Operands Encoding.
Computer Architecture and Organization
Computer Architecture EKT 422
MIPS Processor Chapter 12 S. Dandamudi To be used with S. Dandamudi, “Introduction to Assembly Language Programming,” Second Edition, Springer,
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.
CSC 221 Computer Organization and Assembly Language Lecture 06: Machine Instruction Characteristics.
國立政治大學資訊科學系 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
System Programming and administration
System Programming Design and Implementation of system software.
THE sic mACHINE CSCI/CMPE 3334 David Egle.
Assemblers - 2 CSCI/CMPE 3334 David Egle.
Simplified Instructional Computer (SIC)
Chapter 1 Background Professor Gwan-Hwan Hwang
ECEG-3202 Computer Architecture and Organization
Simplified Instructional Computer (SIC)
ultraSPARC과 SIC/XE Machine 비교
Introduction to Microprocessor Programming
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:

1 The Simplified Instructional Computer (SIC) Hsiang-Fu Yu National Taipei University of Education

2 Outline The Simplified Instructional Computer (SIC) (Sec. 1.3) Traditional CISC Machines (Sec. 1.4) RISC Machines (Sec. 1.5)

3 SIC Architecture Two versions SIC SIC/XE (extra equipments or extra expensive) SIC program can be executed on SIC/XE. (upward compatible) Memory consists of 8-bit bytes. 3 consecutive bytes form a word (24 bits) There are 2 15 (32K) bytes in the memory

4 Registers There are 5 registers Each is 24 bits in length

5 Data Format Integer 24-bit binary numbers 2 ’ s complement representation is used for negative numbers Character store using their 8-bit ASCII codes There is no floating-point hardware on SIC

6 Instruction Format All machine instructions on SIC has the following 24-bit format Only two addressing modes X is used to indicate indexed-addressing mode 8115 opcodexaddress

7 Instruction Set Load and store registers LDA, LDX, STA, STX Integer arithmetic ADD, SUB, MUL, DIV, all involve register A and a word in memory Comparison COMP, involve register A and a word in memory set a condition code CC to indicate the compare result

8 Instruction Set (cont.) Conditional jump JLE, JEQ, JGT, etc. test the setting of CC and jump accordingly Subroutine linkage JSUB jump to the subroutine, placing the return address in register L RSUB return by jumping to the address contained in register L

9 Input and Output One byte at a time to or from the rightmost 8 bits of register A Each device has a unique 8-bit ID code Test device (TD) test if a device is ready to send or receive a byte of data Read data (RD) read a byte from the device to register A Write data (WD) write a byte from register A to the device

10 SIC/XE Architecture Memory size 1 megabytes (2 20 bytes) An address (20 bits) cannot be fitted into a 15-bit field as in SIC Standard Lead to changes in instruction formats and addressing modes Extra registers

11 Data Format The same as that of SIC There is a floating-point data type with the following format fraction is between 0 and 1 exponent is between 0 and 2047 Zero is presented as all sexponentfraction (-1) s *fraction*2 (exponent-1024)

12 Instruction Formats e = 0 e = 1 8 opcode 844 r1r2 Format 1 (1 byte) Format 2 (2 bytes) opcodenixbpedisp Format 3 (3 bytes) opcodenixbpeaddress Format 4 (4 bytes) Formats 1 and 2 do not reference memory at all Bit e distinguishes between formats 3 and 4 Large memory extends addressing capacity

13 Addressing Modes nixbpe opcode100disp (12bits) b=1, p=0, TA=(B)+disp (0  disp  4095) nixbpe opcode010disp (12bits) b=0, p=1, TA=(PC)+disp (-2048  disp  2047)

14 Addressing Modes (cont.) nixbpe opcode000disp (12bits) Format 3: b=0, p=0, TA=disp (0  disp  4095) nixbpe opcode0001addr (20bits) Format 4: b=0, p=0, TA=addr

15 Addressing Modes (cont.) Indexed addressing mode nixbpe opcode1000disp (12bits) TA=(X)+disp nixbpe opcode1010disp (12bits) TA=(X)+disp+(PC) nixbpe opcode1100disp (12bits) TA=(X)+disp+(B)

16 Addressing Modes (cont.) Immediate addressing mode (n = 0, i =1) The target address is used as the operand Indirect addressing mode (n = 1, i = 0) The word at the location given by the target address is fetched The value contained in this word is then used as the address of the operand value Simple addressing mode The target address is taken as the location of the operand (n = 1, i = 1) used by SIC/XE (n = 0, i = 0) used by SIC Indexed addressing cannot be used with immediate or indirect modes. For formats 3 and 4:

17 4: Format 4 instruction D: Direct-addressing instruction, i.e., non-relative addressing, b = 0 and p = 0 A: Assembler selects either program-counter relative or base- relative mode S: Compatible with SIC

18 All of these instructions are LDA. PC-relative simple addressing: (PC) + disp Base-relative indexed simple addressing: (B) + disp + (X) PC-relative indirect addressing: (PC) + disp Immediate addressing: disp SIC simple addressing: b/p/e + disp Simple addressing: addr

19 Instruction Set LDB and STB Floating-point operations ADDF, SUBF, MULF, DIVF Register move RMO Register-to-register operations ADDR, SUBR, MULR, DIVR Supervisor call for generating system calls into the operating system SVC I/O channel operation similar to DMA SIO: start, TIO: test, HIO: halt

20 Complete Instruction Set P: privileged instruction X: available only on XE F: floating- point Instruction C: condition code CC set to indicate result of operation

21

22

23

24

25 SIC Programming Examples Immediate addressing makes the program run faster because it need not fetch five from the memory.

26 BETA <- (ALPHA + INCR - 1) DELTA <- (GAMMA + INCR - 1) SIC Programming Example (Fig. 1.3a)

27 This program will execute faster because it need not load INCR from memory each time when INCR is needed. SIC/XE Programming Example (Fig. 1.3b)

28 SIC Programming Example (Fig. 1.4a) Looping and indexing: copy one string to another

29 This program will execute faster because TIXR need not compare the index value to a memory variable. SIC/XE Programming Example (Fig. 1.4b)

30 Gamma [] <- Alpha [] + Beta [] SIC Programming Example (Fig. 1.5a)

31 This program will execute faster because it uses register-to-register add to reduce memory accesses. SIC/XE Programming Example (Fig. 1.5b)

32 Input and Output Example

33 SIC Programming Example (Fig. 1.7a) Read 100 words into the record buffer

34 SIC/XE Programming Example (Fig. 1.7b) Use TIXR makes this program run faster

35 Reduced Instruction Set Computer (RISC) Machines RISC system Instruction Standard, fixed instruction format Single-cycle execution of most instructions Memory access is available only for load and store instruction Other instructions are register-to-register operations A small number of machine instructions, and instruction format A large number of general-purpose registers A small number of addressing modes

36 Some RISC machines SPARC family PowerPC family Cray T3E ARM MIPS

37 Traditional (CISC) Machines Complex Instruction Set Computers (CISC) Complicated instruction set Different instruction formats and lengths Many different addressing modes Examples VAX Intel x86 Processors