SlideShare a Scribd company logo
Chapter 1: Introduction
Overview
Simplified Instructional Computer
Traditional Machine Structure
Systems Programming Languages
History of Computer Programming
• It is probably fair to say that the first program-controlled (mechanical)
computer ever build was the Z1 (1938).
• This was followed in 1939 by the Z2 as the first operational program
controlled computer with fixed-point arithmetic.
Overview[1]
• In the beginning, all programming could be considered “Systems
programming”
• With the advent of increasingly powerful machines and ever more
featureful runtime environments, programming languages moved away
from systems programming to application programming
Computer Components Hierarchy
Overview[2]
• The technological advances witnessed in the computer industry
are the result of a long chain of immense and successful efforts
made by two major force:
• The academia, represented by university research centers, and
• The industry, represented by computer companies.
Overview[3]
• Systems Programming is a practice of writing “system software” and it is at the
heart of all software that we write
• It provides service for other software (e.g. kernels, libraries, daemons)
• Typically resource (memory or CPU) constrained
• Used to build abstraction for application programmers
Overview[4]
• Examples of System Software
• Compiler (people like language into machine language translator)
• Loader(Prepare machine language for Execution)
• Micro processor(Allows abbreviation usage)
• Operating Systems and File System (Flexible information storage and retrieval)
• Device Drivers
• Middleware
• Utility Software
• Shells and Windowing Systems
Overview[5]
• System Software consists of programs that supports the operation of a
computer.
• This software makes its possible for the user to focus on an application
without needing to know the detail of how the machine works internally.
Foundations of Systems Programming
Overview[6]
System Software Application Software
Used for operating computer hardware Used by user to perform specific task
Installed on the computer when operating system is installed. Installed according to user’s requirements
The user does not interact with system software because it works in
the background
The user interacts with application software.
Run independently Can’t run without the presence of system software
Example: (compiler, assembler, debugger, driver, etc) Example: (word processor, web browser, media player, etc.)
Overview[7]
• Evolution of the Components of a programming System
1. Assemblers ( Source program  Object program)
2. Loaders (Place object program in memory in an executable format)
3. Macros (allows programmers to use abbreviations)
4. Compilers
5. Formal Systems
Overview[8]
• System Software Requirements
• Space/time economy
• Access to all relevant hardware features
• Object code must not depend upon elaborate run-time support
Overview[9]
• Characteristics of Systems Programming
• Programmers are expected to know hardware and internal behavior of the computer
system on which the program will run
• Use low level programming languages or some programming dialects
• Requires little run time overheads and can execute in a resource constrained
environment
• Small or no runtime libraries requirements
• Have access to system resource, including memory
Overview[10]
• Systems Programming Limiting Factors
• No debugging mode running support
• Limited programming facilities
• Less runtime libraries
• Less error checking capabilities
Machine Architecture[1]
• The system software like assembler, linker and loader are all dependent on
machine architecture
• One characteristic in which most system software differ from application
software is machine dependency:
• Assembler translate mnemonic instructions into machine code
• Compilers must generate machine language code
Machine Architecture[2]
• System Software usually related to the architecture of the machine on which they are to
run
• Some aspects of system software that do not directly depend upon the type of computing
system (General design and logic of an assembler and compiler)
• A different definition of computer architecture is built on four basic viewpoints:
• Structure (interconnection of various hardware components)
• Organization (dynamic interplay and management of the various components)
• Implementation (design of hardware components), and
• Performance (specifies the behavior of the computer system).
Machine Architecture[3]
• Architecture Feature Descriptor:
• System Memory (used to store programs and data)
• Registers
• Instruction Formats
• Data Formats
• Addressing Mode
• Instruction Set
• Input/Output
Machine Architecture[4]
• Execution Life Cycle:
1. The next instruction to be executed, whose address is obtained from the PC, is
fetched from the memory and stored in the IR.
2. The instruction is decoded.
3. Operands are fetched from the memory and stored in CPU registers, if needed.
4. The instruction is executed.
5. Results are transferred from CPU registers to the memory, if needed.
Simplified Instructional Computer
• SIC is a hypothetical computer system architecture designed for
teaching computer systems programming
• This machine has been designed to illustrate the most commonly
encountered hardware features and concepts, while avoiding most of the
idiosyncrasies that are often found in real machines.
• Two versions of SIC:
• SIC - standard model
• SIC/XE (extra equipment or extra expensive)
SIC Memory
• Memory storage in SIC consists of 8-bit bytes, and all memory addresses in SIC
are byte addresses.
• Any 3 consecutive bytes form a word (24 bits)
• All addresses in SIC are byte address.
• Words are addressed by the location of their lowest numbered byte.
• Total of 215 (32,768) bytes of total memory
• Least significant part of a numeric value is stored at the lowest numbered address
SIC Registers
• Note: the numbering scheme is chosen for compatibility with XE version of SIC
Register Number Function Use
A 0 Accumulator Arithmetic operations
X 1 Index register Addressing
L 2 Linkage register Storing return address for subroutine jump instruction
(JSUB)
PC 8 Program counter Contains Address of next instruction to be fetched for
execution
SW 9 Status word Flags, other information including Condition Code (CC)
SIC Data Formats
• Integers: stored as 24-bit binary numbers
• 2’s complement representation for negative values
• No floating point hardware in standard SIC
• Characters: 8-bit ASCII
SIC Instruction Formats
• 24-bit format
• The flag bit x indicates indexed-addressing mode
8 bit opcode 1 bit addressing mode 15 bit address
SIC Addressing Modes
• 2 addressing modes available
• Indicated by setting of x bit in the instruction
• The table describes how the target address is calculated from the address given in the
instruction
• (x): represents the contents of register x
Mode Indication Target address calculation
Direct x = 0 TA = address
Indexed x = 1 TA = address + (x)
SIC Instruction Set[1]
• Load and store registers: LDA, LDX, STA, STX, etc.
• Integer arithmetic operations: ADD, SUB, MUL, DIV, etc.
• All arithmetic operations involve register A and a word in memory, with the result being left
in the register
• Comparison: COMP
• COMP compares the value in register A with a word in memory, this instruction sets a
condition code CC to indicate the result
SIC Instruction Set[2]
• Conditional jump instructions: JLT, JEQ, JGT
• these instructions test the setting of CC and jump accordingly
• Subroutine linkage: JSUB, RSUB
• JSUB jumps to the subroutine, placing the return address in register L
• RSUB returns by jumping to the address contained in register L
SIC Input and Output
• Input and output are performed by transferring 1 byte at a time to or from the rightmost 8 bits of
register A.
• Each devices are assigned unique 8 bit code
• Test Device (TD) instruction tests whether the addressed device is ready to send or receive a byte of
data
• The condition code is set to indicate the result of the test
• “Less Than,< “ if device is ready; “Equal, =” if device is busy.
• Read Data (RD): read a byte from the device to register A
• Write Data (WD): write a byte from register A to the device
SIC Programming Example[1]
• Data movement
LDA FIVE load 5 into A
STA ALPHA store in ALPHA
LDCH CHARZ load ‘Z’ into A
STCH C1 store in C1
.
.
.
ALPHA RESW 1 reserve one word space
FIVE WORD 5 one word holding 5
CHARZ BYTE C’Z’ one-byte constant
C1 RESB 1 one-byte variable
SIC Programming Example[2]
• Arithmetic operations: BETA = ALPHA+INCR-1
LDA ALPHA
ADD INCR
SUB ONE
STA BETA
LDA GAMMA
ADD INCR
SUB ONE
STA DELTA
...
ONE WORD 1 one-word constant
ALPHA RESW 1 one-word variables
BETA RESW 1
GAMMA RESW 1
DELTA RESW 1
INCR RESW 1
SIC Programming Example[3]
• Looping and indexing: copy one string to another
LDX ZERO initialize index register to 0
MOVECH LDCH STR1,X load char from STR1 to reg A
STCH STR2,X
TIX ELEVEN add 1 to index, compare to 11
JLT MOVECH loop if “less than”
.
.
.
STR1 BYTE C’TEST STRING’
STR2 RESB 11
ZERO WORD 0
ELEVEN WORD 11
SIC Programming Example[4]
LDA ZERO initialize index value to 0
STA INDEX
ADDLP LDX INDEX load index value to reg X
LDA ALPHA,X load word from ALPHA into reg A
ADD BETA,X
STA GAMMA,X store the result in a word in GAMMA
LDA INDEX
ADD THREE add 3 to index value
STA INDEX
COMP K300 compare new index value to 300
JLT ADDLP loop if less than 300
...
...
INDEX RESW 1
ALPHA RESW 100 array variables—100 words each
BETA RESW 100
GAMMA RESW 100
ZERO WORD 0 one-word constants
THREE WORD 3
K300 WORD 300
SIC Programming Example[5]
• Input and output
INLOOP TD INDEV test input device
JEQ INLOOP loop until device is ready
RD INDEV read one byte into register A
STCH DATA
.
.
OUTLP TD OUTDEV test output device
JEQ OUTLP loop until device is ready
LDCH DATA
WD OUTDEV write one byte to output device
.
.
INDEV BYTE X’F1’ input device number
OUTDEV BYTE X’05’ output device number
DATA RESB 1
SIC/XE Memory
• Larger Memory
• 220 bytes (1 megabyte) in memory
• Leads to change in instruction formats & addressing modes
SIC/XE Registers
• 3 additional registers, 24 bits in length
• 1 additional register, 48 bits in length
Mnemonic Number Use
B 3 Base register – used for addressing
S 4 General working register – no special use
T 5 General working register – no special use
F 6 Floating point accumulator (48 bits)
SIC/XE Data Formats
• Similar data format as the standard SIC.
• In addition, there is 48 bit Floating-point data type represented with the following format.
• The absolute value of number represented as:
• frac*2(exp-1024)
• fraction: 0~1
• exponent: 0~2047
• Sign is indicated by ‘s’ (0 = +ve, 1 = -ve)
s Exponent fraction
1 11 36
SIC/XE Instruction formats[1]
• The larger memory on SIC/XE mean an address will no
longer fit into 15 bit field.
• Two possible options:
• Use some from of relative addressing
• Or extended the address field to 20 bit
• Both options are included in SIC/XE(format 3(e=0) and format
4(e=1))
SIC/XE Instruction formats[2]
• SIC/XE also provides some instructions that do not refer memory at all
• Formats 1 and 2 are instructions that do not reference memory at all
SIC/XE Addressing Mode[1]
● Addressing modes
• Base relative/b (n=1, i=1, b=1, p=0)
• Program-counter relative/p (n=1, i=1, b=0, p=1)
• Direct/ (n=1, i=1, b=0, p=0)
• Immediate (n=0, i=1, x=0)
• Indirect (n=1, i=0, x=0)
• Indexing (both n & i = 0 or 1, x=1)
• Extended (e=1)
● Note: Indexing cannot be used with immediate or indirect addressing
SIC/XE Addressing Mode[2]
n i x B p e
opcode 1 1 1 0 disp
 Base Relative Addressing Mode
n=1, i=1, b=1, p=0 TA=(B)+disp (0disp 4095)
 Program-Counter Relative Addressing Mode
n i x b p e
opcode 1 1 0 1 disp
n=1, i=1, b=0, p=1 TA=(PC)+disp (-2048disp 2047)
SIC/XE Addressing Mode[3]
n i x b p e
opcode 1 1 0 0 disp
• Direct Addressing Mode
n=1, i=1, b=0, p=0 TA=disp (0disp 4095)
n i x b p e
opcode 1 1 1 0 0 disp
n=1, i=1, b=0, p=0 TA=(X)+disp
(with index addressing mode)
SIC/XE Addressing Mode[4]
n i x b p e
opcode 0 1 0 disp
 Immediate Addressing Mode
n=0, i=1, x=0 TA = disp
 Indirect Addressing Mode
n i x b p e
opcode 1 0 0 disp
n=1, i=0, x=0 TA=(disp)
SIC/XE Addressing Mode[5]
n i x b p e
opcode 0 0 disp
 Simple Addressing Mode
i=0, n=0 TA=b/p/e/disp (SIC standard)
n i x b p e
opcode 1 1 disp
i=1, n=1 TA=disp (SIC/XE standard)
SIC/XE Instruction Set
• New registers: LDB, STB, etc.
• Floating-point arithmetic: ADDF, SUBF, MULF, DIVF
• Register move: RMO
• Register-register arithmetic: ADDR, SUBR, MULR, DIVR
• Supervisor call: SVC
• Generates an interrupt for OS
SIC/XE Input/Output
• 1 byte at a time, TD, RD, and WD
• SIO, TIO, HIO:
• start, test, halt the operation of I/O device
SIC/XE Programming Example[1]
LDA #5
STA ALPHA
LDCH #90
STCH C1
.
.
.
ALPHA RESW 1
C1 RESB 1
LDA FIVE
STA ALPHA
LDCH CHARZ
STCH C1
.
.
.
ALPHA RESW 1
FIVE WORD 5
CHARZ BYTE C’Z’
C1 RESB 1
SIC version SIC/XE version
SIC/XE Programming Example[2]
LDS INCR
LDA ALPHA BETA=ALPHA+INCR-1
ADDR S,A
SUB #1
STA BETA
LDA GAMMA DELTA=GAMMA+INCR-1
ADDR S,A
SUB #1
STA DELTA
...
...
ALPHA RESW 1 one-word variables
BETA RESW 1
GAMMA RESW 1
DELTA RESW 1
INCR RESW 1
SIC/XE Programming Example[4]
• Looping and indexing: copy one string to another
LDT #11 initialize register T to 11
LDX #0 initialize index register to 0
MOVECH LDCH STR1,X load char from STR1 to reg A
STCH STR2,X store char into STR2
TIXR T add 1 to index, compare to 11
JLT MOVECH loop if “less than” 11
.
.
.
STR1 BYTE C’TEST STRING’
STR2 RESB 11
SIC/XE Programming Example[5]
LDS #3
LDT #300
LDX #0
ADDLP LDA ALPHA,X load from ALPHA to reg A
ADD BETA,X
STA GAMMA,X store in a word in GAMMA
ADDR S,X add 3 to index value
COMPR X,T compare to 300
JLT ADDLP loop if less than 300
...
...
ALPHA RESW 100 array variables—100 words each
BETA RESW 100
GAMMA RESW 100
SIC/XE Programming Example[7]
Traditional (CISC) Machines
• Complex Instruction Set Computers (CISC)
• complicated instruction set
• different instruction formats and lengths
• many different addressing modes
• e.g. VAX or PDP-11 from DEC
• e.g. Intel x86 family
• Reduced Instruction Set Computer (RISC)
48
Reading Assignments
• VAX Architecture
• Pentium Pro Architecture
RISC Machines[1]
• 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
RISC Machines[2]
• Large number of general-purpose registers
• Small number of addressing modes
• Three RISC machines
• SPARC family
• PowerPC family
• Cray T3E
Systems Programming Languages
• In modern programming languages, there exists a distinct lack of languages targeted at
systems programming.
• Most modern languages are designed for application development which is most certainly
valid in the modern world. However, systems programming has been left behind in language
development.
• As such, systems programs do not benefit from the modern developments in language
design.
• Examples of System Programming Languages
• C/C++, D, Go, Rust
Systems Programming Languages
Choosing Criteria
• Systems programming is typically very resource constrained and it is often
appropriate to have something machine friendly at the expense of potentially
being somewhat programmer unfriendly.
• Safety
• Control
Benefit of RUST
• It exposes all the low level details that are required to have absolute control
over your memory layout.
• It has all the facilities you expect in a modern language.
• Rust has something they call the borrow checker, which statically (checked
compile time) eliminates a whole range of issues plaguing C/C++.
• It has a real concurrency story.
Requirements for RUST
• Rust compiler (rustc) installation
• Rust package manager (Cargo)
https://www.rust-lang.org/downloads.html
Chapter 1}
Chapter 2{
Ad

More Related Content

What's hot (20)

Loader and Its types
Loader and Its typesLoader and Its types
Loader and Its types
Parth Dodiya
 
MACRO PROCESSOR
MACRO PROCESSORMACRO PROCESSOR
MACRO PROCESSOR
Bhavik Vashi
 
Loaders ( system programming )
Loaders ( system programming ) Loaders ( system programming )
Loaders ( system programming )
Adarsh Patel
 
System software
System softwareSystem software
System software
Senthil Kanth
 
Unit 4 sp macro
Unit 4 sp macroUnit 4 sp macro
Unit 4 sp macro
Deepmala Sharma
 
Introduction to .NET Framework
Introduction to .NET FrameworkIntroduction to .NET Framework
Introduction to .NET Framework
Raghuveer Guthikonda
 
Software requirement specification
Software requirement specificationSoftware requirement specification
Software requirement specification
shiprashakya2
 
Introduction to loaders
Introduction to loadersIntroduction to loaders
Introduction to loaders
Tech_MX
 
Vb.net class notes
Vb.net class notesVb.net class notes
Vb.net class notes
priyadharshini murugan
 
Software Engineering (Software Process: A Generic View)
Software Engineering (Software Process: A Generic View)Software Engineering (Software Process: A Generic View)
Software Engineering (Software Process: A Generic View)
ShudipPal
 
System Programing Unit 1
System Programing Unit 1System Programing Unit 1
System Programing Unit 1
Manoj Patil
 
Direct linking loaders
Direct linking loadersDirect linking loaders
Direct linking loaders
Satyamevjayte Haxor
 
Single pass assembler
Single pass assemblerSingle pass assembler
Single pass assembler
Bansari Shah
 
Assembler - System Programming
Assembler - System ProgrammingAssembler - System Programming
Assembler - System Programming
Radhika Talaviya
 
Macro Processor
Macro ProcessorMacro Processor
Macro Processor
Saranya1702
 
Introduction to Visual Studio.NET
Introduction to Visual Studio.NETIntroduction to Visual Studio.NET
Introduction to Visual Studio.NET
Dutch Dasanaike {LION}
 
Fundamental design concepts
Fundamental design conceptsFundamental design concepts
Fundamental design concepts
srijavel
 
Ch 3 Assembler in System programming
Ch 3 Assembler in System programming Ch 3 Assembler in System programming
Ch 3 Assembler in System programming
Bhatt Balkrishna
 
Assemblers: Ch03
Assemblers: Ch03Assemblers: Ch03
Assemblers: Ch03
desta_gebre
 
System Programming Overview
System Programming OverviewSystem Programming Overview
System Programming Overview
Dattatray Gandhmal
 
Loader and Its types
Loader and Its typesLoader and Its types
Loader and Its types
Parth Dodiya
 
Loaders ( system programming )
Loaders ( system programming ) Loaders ( system programming )
Loaders ( system programming )
Adarsh Patel
 
Software requirement specification
Software requirement specificationSoftware requirement specification
Software requirement specification
shiprashakya2
 
Introduction to loaders
Introduction to loadersIntroduction to loaders
Introduction to loaders
Tech_MX
 
Software Engineering (Software Process: A Generic View)
Software Engineering (Software Process: A Generic View)Software Engineering (Software Process: A Generic View)
Software Engineering (Software Process: A Generic View)
ShudipPal
 
System Programing Unit 1
System Programing Unit 1System Programing Unit 1
System Programing Unit 1
Manoj Patil
 
Single pass assembler
Single pass assemblerSingle pass assembler
Single pass assembler
Bansari Shah
 
Assembler - System Programming
Assembler - System ProgrammingAssembler - System Programming
Assembler - System Programming
Radhika Talaviya
 
Fundamental design concepts
Fundamental design conceptsFundamental design concepts
Fundamental design concepts
srijavel
 
Ch 3 Assembler in System programming
Ch 3 Assembler in System programming Ch 3 Assembler in System programming
Ch 3 Assembler in System programming
Bhatt Balkrishna
 
Assemblers: Ch03
Assemblers: Ch03Assemblers: Ch03
Assemblers: Ch03
desta_gebre
 

Similar to Introduction to Simplified instruction computer or SIC/XE (20)

Unit 1 computer architecture (1)
Unit 1   computer architecture (1)Unit 1   computer architecture (1)
Unit 1 computer architecture (1)
DevaKumari Vijay
 
Assembler
AssemblerAssembler
Assembler
Temesgen Molla
 
System software 5th unit
System software 5th unitSystem software 5th unit
System software 5th unit
Sumathi Gnanasekaran
 
Lec4,5[1 of my believed jpuney that yu [w].ppt
Lec4,5[1 of my believed jpuney that yu [w].pptLec4,5[1 of my believed jpuney that yu [w].ppt
Lec4,5[1 of my believed jpuney that yu [w].ppt
hammadrajpoot3366qa
 
Simplified instructional computer
Simplified instructional computerSimplified instructional computer
Simplified instructional computer
Kirby Fabro
 
Kirby, Fabro
Kirby, FabroKirby, Fabro
Kirby, Fabro
ZHYRA ROSIL
 
introduction to embedded systems part 1
introduction to embedded systems part 1introduction to embedded systems part 1
introduction to embedded systems part 1
Hatem Abd El-Salam
 
Mod 3.pptx
Mod 3.pptxMod 3.pptx
Mod 3.pptx
lekha349785
 
Computer_System_Architecture en PPT.pptx
Computer_System_Architecture en PPT.pptxComputer_System_Architecture en PPT.pptx
Computer_System_Architecture en PPT.pptx
swarnalathaaimlgnitc
 
Computer_System_Architecture of JNTUH PPT.pptx
Computer_System_Architecture of JNTUH PPT.pptxComputer_System_Architecture of JNTUH PPT.pptx
Computer_System_Architecture of JNTUH PPT.pptx
beulah21
 
Arm architecture chapter2_steve_furber
Arm architecture chapter2_steve_furberArm architecture chapter2_steve_furber
Arm architecture chapter2_steve_furber
asodariyabhavesh
 
8- The Processor (1).pptx with detailed explained
8- The Processor (1).pptx with detailed explained8- The Processor (1).pptx with detailed explained
8- The Processor (1).pptx with detailed explained
pambukoolthazha
 
Computer organization and architecture.pptx
Computer organization and architecture.pptxComputer organization and architecture.pptx
Computer organization and architecture.pptx
mynamemy
 
SS-assemblers 1.pptx
SS-assemblers 1.pptxSS-assemblers 1.pptx
SS-assemblers 1.pptx
kalavathisugan
 
isa architecture
isa architectureisa architecture
isa architecture
AJAL A J
 
Computer Architecture and Organization ppt
Computer Architecture and Organization pptComputer Architecture and Organization ppt
Computer Architecture and Organization ppt
JayasimhaThummala1
 
EL3011 1-Course-Introduction for Architecture of Computer.pdf
EL3011 1-Course-Introduction for Architecture of Computer.pdfEL3011 1-Course-Introduction for Architecture of Computer.pdf
EL3011 1-Course-Introduction for Architecture of Computer.pdf
creojr88
 
Advanced Processor Power Point Presentation
Advanced Processor  Power Point  PresentationAdvanced Processor  Power Point  Presentation
Advanced Processor Power Point Presentation
PrashantYadav931011
 
CSC204PPTNOTES
CSC204PPTNOTESCSC204PPTNOTES
CSC204PPTNOTES
Gilbert NZABONITEGEKA
 
Mba i-ifm-u-2-computer software
Mba i-ifm-u-2-computer softwareMba i-ifm-u-2-computer software
Mba i-ifm-u-2-computer software
Rai University
 
Unit 1 computer architecture (1)
Unit 1   computer architecture (1)Unit 1   computer architecture (1)
Unit 1 computer architecture (1)
DevaKumari Vijay
 
Lec4,5[1 of my believed jpuney that yu [w].ppt
Lec4,5[1 of my believed jpuney that yu [w].pptLec4,5[1 of my believed jpuney that yu [w].ppt
Lec4,5[1 of my believed jpuney that yu [w].ppt
hammadrajpoot3366qa
 
Simplified instructional computer
Simplified instructional computerSimplified instructional computer
Simplified instructional computer
Kirby Fabro
 
introduction to embedded systems part 1
introduction to embedded systems part 1introduction to embedded systems part 1
introduction to embedded systems part 1
Hatem Abd El-Salam
 
Computer_System_Architecture en PPT.pptx
Computer_System_Architecture en PPT.pptxComputer_System_Architecture en PPT.pptx
Computer_System_Architecture en PPT.pptx
swarnalathaaimlgnitc
 
Computer_System_Architecture of JNTUH PPT.pptx
Computer_System_Architecture of JNTUH PPT.pptxComputer_System_Architecture of JNTUH PPT.pptx
Computer_System_Architecture of JNTUH PPT.pptx
beulah21
 
Arm architecture chapter2_steve_furber
Arm architecture chapter2_steve_furberArm architecture chapter2_steve_furber
Arm architecture chapter2_steve_furber
asodariyabhavesh
 
8- The Processor (1).pptx with detailed explained
8- The Processor (1).pptx with detailed explained8- The Processor (1).pptx with detailed explained
8- The Processor (1).pptx with detailed explained
pambukoolthazha
 
Computer organization and architecture.pptx
Computer organization and architecture.pptxComputer organization and architecture.pptx
Computer organization and architecture.pptx
mynamemy
 
isa architecture
isa architectureisa architecture
isa architecture
AJAL A J
 
Computer Architecture and Organization ppt
Computer Architecture and Organization pptComputer Architecture and Organization ppt
Computer Architecture and Organization ppt
JayasimhaThummala1
 
EL3011 1-Course-Introduction for Architecture of Computer.pdf
EL3011 1-Course-Introduction for Architecture of Computer.pdfEL3011 1-Course-Introduction for Architecture of Computer.pdf
EL3011 1-Course-Introduction for Architecture of Computer.pdf
creojr88
 
Advanced Processor Power Point Presentation
Advanced Processor  Power Point  PresentationAdvanced Processor  Power Point  Presentation
Advanced Processor Power Point Presentation
PrashantYadav931011
 
Mba i-ifm-u-2-computer software
Mba i-ifm-u-2-computer softwareMba i-ifm-u-2-computer software
Mba i-ifm-u-2-computer software
Rai University
 
Ad

Recently uploaded (20)

SCI BIZ TECH QUIZ (OPEN) PRELIMS XTASY 2025.pptx
SCI BIZ TECH QUIZ (OPEN) PRELIMS XTASY 2025.pptxSCI BIZ TECH QUIZ (OPEN) PRELIMS XTASY 2025.pptx
SCI BIZ TECH QUIZ (OPEN) PRELIMS XTASY 2025.pptx
Ronisha Das
 
Exploring-Substances-Acidic-Basic-and-Neutral.pdf
Exploring-Substances-Acidic-Basic-and-Neutral.pdfExploring-Substances-Acidic-Basic-and-Neutral.pdf
Exploring-Substances-Acidic-Basic-and-Neutral.pdf
Sandeep Swamy
 
pulse ppt.pptx Types of pulse , characteristics of pulse , Alteration of pulse
pulse  ppt.pptx Types of pulse , characteristics of pulse , Alteration of pulsepulse  ppt.pptx Types of pulse , characteristics of pulse , Alteration of pulse
pulse ppt.pptx Types of pulse , characteristics of pulse , Alteration of pulse
sushreesangita003
 
Introduction to Vibe Coding and Vibe Engineering
Introduction to Vibe Coding and Vibe EngineeringIntroduction to Vibe Coding and Vibe Engineering
Introduction to Vibe Coding and Vibe Engineering
Damian T. Gordon
 
New Microsoft PowerPoint Presentation.pptx
New Microsoft PowerPoint Presentation.pptxNew Microsoft PowerPoint Presentation.pptx
New Microsoft PowerPoint Presentation.pptx
milanasargsyan5
 
Stein, Hunt, Green letter to Congress April 2025
Stein, Hunt, Green letter to Congress April 2025Stein, Hunt, Green letter to Congress April 2025
Stein, Hunt, Green letter to Congress April 2025
Mebane Rash
 
Phoenix – A Collaborative Renewal of Children’s and Young People’s Services C...
Phoenix – A Collaborative Renewal of Children’s and Young People’s Services C...Phoenix – A Collaborative Renewal of Children’s and Young People’s Services C...
Phoenix – A Collaborative Renewal of Children’s and Young People’s Services C...
Library Association of Ireland
 
How to track Cost and Revenue using Analytic Accounts in odoo Accounting, App...
How to track Cost and Revenue using Analytic Accounts in odoo Accounting, App...How to track Cost and Revenue using Analytic Accounts in odoo Accounting, App...
How to track Cost and Revenue using Analytic Accounts in odoo Accounting, App...
Celine George
 
K12 Tableau Tuesday - Algebra Equity and Access in Atlanta Public Schools
K12 Tableau Tuesday  - Algebra Equity and Access in Atlanta Public SchoolsK12 Tableau Tuesday  - Algebra Equity and Access in Atlanta Public Schools
K12 Tableau Tuesday - Algebra Equity and Access in Atlanta Public Schools
dogden2
 
Niamh Lucey, Mary Dunne. Health Sciences Libraries Group (LAI). Lighting the ...
Niamh Lucey, Mary Dunne. Health Sciences Libraries Group (LAI). Lighting the ...Niamh Lucey, Mary Dunne. Health Sciences Libraries Group (LAI). Lighting the ...
Niamh Lucey, Mary Dunne. Health Sciences Libraries Group (LAI). Lighting the ...
Library Association of Ireland
 
Presentation on Tourism Product Development By Md Shaifullar Rabbi
Presentation on Tourism Product Development By Md Shaifullar RabbiPresentation on Tourism Product Development By Md Shaifullar Rabbi
Presentation on Tourism Product Development By Md Shaifullar Rabbi
Md Shaifullar Rabbi
 
Ultimate VMware 2V0-11.25 Exam Dumps for Exam Success
Ultimate VMware 2V0-11.25 Exam Dumps for Exam SuccessUltimate VMware 2V0-11.25 Exam Dumps for Exam Success
Ultimate VMware 2V0-11.25 Exam Dumps for Exam Success
Mark Soia
 
2541William_McCollough_DigitalDetox.docx
2541William_McCollough_DigitalDetox.docx2541William_McCollough_DigitalDetox.docx
2541William_McCollough_DigitalDetox.docx
contactwilliamm2546
 
One Hot encoding a revolution in Machine learning
One Hot encoding a revolution in Machine learningOne Hot encoding a revolution in Machine learning
One Hot encoding a revolution in Machine learning
momer9505
 
Geography Sem II Unit 1C Correlation of Geography with other school subjects
Geography Sem II Unit 1C Correlation of Geography with other school subjectsGeography Sem II Unit 1C Correlation of Geography with other school subjects
Geography Sem II Unit 1C Correlation of Geography with other school subjects
ProfDrShaikhImran
 
LDMMIA Reiki Master Spring 2025 Mini Updates
LDMMIA Reiki Master Spring 2025 Mini UpdatesLDMMIA Reiki Master Spring 2025 Mini Updates
LDMMIA Reiki Master Spring 2025 Mini Updates
LDM Mia eStudios
 
Quality Contril Analysis of Containers.pdf
Quality Contril Analysis of Containers.pdfQuality Contril Analysis of Containers.pdf
Quality Contril Analysis of Containers.pdf
Dr. Bindiya Chauhan
 
The ever evoilving world of science /7th class science curiosity /samyans aca...
The ever evoilving world of science /7th class science curiosity /samyans aca...The ever evoilving world of science /7th class science curiosity /samyans aca...
The ever evoilving world of science /7th class science curiosity /samyans aca...
Sandeep Swamy
 
P-glycoprotein pamphlet: iteration 4 of 4 final
P-glycoprotein pamphlet: iteration 4 of 4 finalP-glycoprotein pamphlet: iteration 4 of 4 final
P-glycoprotein pamphlet: iteration 4 of 4 final
bs22n2s
 
Sinhala_Male_Names.pdf Sinhala_Male_Name
Sinhala_Male_Names.pdf Sinhala_Male_NameSinhala_Male_Names.pdf Sinhala_Male_Name
Sinhala_Male_Names.pdf Sinhala_Male_Name
keshanf79
 
SCI BIZ TECH QUIZ (OPEN) PRELIMS XTASY 2025.pptx
SCI BIZ TECH QUIZ (OPEN) PRELIMS XTASY 2025.pptxSCI BIZ TECH QUIZ (OPEN) PRELIMS XTASY 2025.pptx
SCI BIZ TECH QUIZ (OPEN) PRELIMS XTASY 2025.pptx
Ronisha Das
 
Exploring-Substances-Acidic-Basic-and-Neutral.pdf
Exploring-Substances-Acidic-Basic-and-Neutral.pdfExploring-Substances-Acidic-Basic-and-Neutral.pdf
Exploring-Substances-Acidic-Basic-and-Neutral.pdf
Sandeep Swamy
 
pulse ppt.pptx Types of pulse , characteristics of pulse , Alteration of pulse
pulse  ppt.pptx Types of pulse , characteristics of pulse , Alteration of pulsepulse  ppt.pptx Types of pulse , characteristics of pulse , Alteration of pulse
pulse ppt.pptx Types of pulse , characteristics of pulse , Alteration of pulse
sushreesangita003
 
Introduction to Vibe Coding and Vibe Engineering
Introduction to Vibe Coding and Vibe EngineeringIntroduction to Vibe Coding and Vibe Engineering
Introduction to Vibe Coding and Vibe Engineering
Damian T. Gordon
 
New Microsoft PowerPoint Presentation.pptx
New Microsoft PowerPoint Presentation.pptxNew Microsoft PowerPoint Presentation.pptx
New Microsoft PowerPoint Presentation.pptx
milanasargsyan5
 
Stein, Hunt, Green letter to Congress April 2025
Stein, Hunt, Green letter to Congress April 2025Stein, Hunt, Green letter to Congress April 2025
Stein, Hunt, Green letter to Congress April 2025
Mebane Rash
 
Phoenix – A Collaborative Renewal of Children’s and Young People’s Services C...
Phoenix – A Collaborative Renewal of Children’s and Young People’s Services C...Phoenix – A Collaborative Renewal of Children’s and Young People’s Services C...
Phoenix – A Collaborative Renewal of Children’s and Young People’s Services C...
Library Association of Ireland
 
How to track Cost and Revenue using Analytic Accounts in odoo Accounting, App...
How to track Cost and Revenue using Analytic Accounts in odoo Accounting, App...How to track Cost and Revenue using Analytic Accounts in odoo Accounting, App...
How to track Cost and Revenue using Analytic Accounts in odoo Accounting, App...
Celine George
 
K12 Tableau Tuesday - Algebra Equity and Access in Atlanta Public Schools
K12 Tableau Tuesday  - Algebra Equity and Access in Atlanta Public SchoolsK12 Tableau Tuesday  - Algebra Equity and Access in Atlanta Public Schools
K12 Tableau Tuesday - Algebra Equity and Access in Atlanta Public Schools
dogden2
 
Niamh Lucey, Mary Dunne. Health Sciences Libraries Group (LAI). Lighting the ...
Niamh Lucey, Mary Dunne. Health Sciences Libraries Group (LAI). Lighting the ...Niamh Lucey, Mary Dunne. Health Sciences Libraries Group (LAI). Lighting the ...
Niamh Lucey, Mary Dunne. Health Sciences Libraries Group (LAI). Lighting the ...
Library Association of Ireland
 
Presentation on Tourism Product Development By Md Shaifullar Rabbi
Presentation on Tourism Product Development By Md Shaifullar RabbiPresentation on Tourism Product Development By Md Shaifullar Rabbi
Presentation on Tourism Product Development By Md Shaifullar Rabbi
Md Shaifullar Rabbi
 
Ultimate VMware 2V0-11.25 Exam Dumps for Exam Success
Ultimate VMware 2V0-11.25 Exam Dumps for Exam SuccessUltimate VMware 2V0-11.25 Exam Dumps for Exam Success
Ultimate VMware 2V0-11.25 Exam Dumps for Exam Success
Mark Soia
 
2541William_McCollough_DigitalDetox.docx
2541William_McCollough_DigitalDetox.docx2541William_McCollough_DigitalDetox.docx
2541William_McCollough_DigitalDetox.docx
contactwilliamm2546
 
One Hot encoding a revolution in Machine learning
One Hot encoding a revolution in Machine learningOne Hot encoding a revolution in Machine learning
One Hot encoding a revolution in Machine learning
momer9505
 
Geography Sem II Unit 1C Correlation of Geography with other school subjects
Geography Sem II Unit 1C Correlation of Geography with other school subjectsGeography Sem II Unit 1C Correlation of Geography with other school subjects
Geography Sem II Unit 1C Correlation of Geography with other school subjects
ProfDrShaikhImran
 
LDMMIA Reiki Master Spring 2025 Mini Updates
LDMMIA Reiki Master Spring 2025 Mini UpdatesLDMMIA Reiki Master Spring 2025 Mini Updates
LDMMIA Reiki Master Spring 2025 Mini Updates
LDM Mia eStudios
 
Quality Contril Analysis of Containers.pdf
Quality Contril Analysis of Containers.pdfQuality Contril Analysis of Containers.pdf
Quality Contril Analysis of Containers.pdf
Dr. Bindiya Chauhan
 
The ever evoilving world of science /7th class science curiosity /samyans aca...
The ever evoilving world of science /7th class science curiosity /samyans aca...The ever evoilving world of science /7th class science curiosity /samyans aca...
The ever evoilving world of science /7th class science curiosity /samyans aca...
Sandeep Swamy
 
P-glycoprotein pamphlet: iteration 4 of 4 final
P-glycoprotein pamphlet: iteration 4 of 4 finalP-glycoprotein pamphlet: iteration 4 of 4 final
P-glycoprotein pamphlet: iteration 4 of 4 final
bs22n2s
 
Sinhala_Male_Names.pdf Sinhala_Male_Name
Sinhala_Male_Names.pdf Sinhala_Male_NameSinhala_Male_Names.pdf Sinhala_Male_Name
Sinhala_Male_Names.pdf Sinhala_Male_Name
keshanf79
 
Ad

Introduction to Simplified instruction computer or SIC/XE

  • 1. Chapter 1: Introduction Overview Simplified Instructional Computer Traditional Machine Structure Systems Programming Languages
  • 2. History of Computer Programming • It is probably fair to say that the first program-controlled (mechanical) computer ever build was the Z1 (1938). • This was followed in 1939 by the Z2 as the first operational program controlled computer with fixed-point arithmetic.
  • 3. Overview[1] • In the beginning, all programming could be considered “Systems programming” • With the advent of increasingly powerful machines and ever more featureful runtime environments, programming languages moved away from systems programming to application programming Computer Components Hierarchy
  • 4. Overview[2] • The technological advances witnessed in the computer industry are the result of a long chain of immense and successful efforts made by two major force: • The academia, represented by university research centers, and • The industry, represented by computer companies.
  • 5. Overview[3] • Systems Programming is a practice of writing “system software” and it is at the heart of all software that we write • It provides service for other software (e.g. kernels, libraries, daemons) • Typically resource (memory or CPU) constrained • Used to build abstraction for application programmers
  • 6. Overview[4] • Examples of System Software • Compiler (people like language into machine language translator) • Loader(Prepare machine language for Execution) • Micro processor(Allows abbreviation usage) • Operating Systems and File System (Flexible information storage and retrieval) • Device Drivers • Middleware • Utility Software • Shells and Windowing Systems
  • 7. Overview[5] • System Software consists of programs that supports the operation of a computer. • This software makes its possible for the user to focus on an application without needing to know the detail of how the machine works internally. Foundations of Systems Programming
  • 8. Overview[6] System Software Application Software Used for operating computer hardware Used by user to perform specific task Installed on the computer when operating system is installed. Installed according to user’s requirements The user does not interact with system software because it works in the background The user interacts with application software. Run independently Can’t run without the presence of system software Example: (compiler, assembler, debugger, driver, etc) Example: (word processor, web browser, media player, etc.)
  • 9. Overview[7] • Evolution of the Components of a programming System 1. Assemblers ( Source program  Object program) 2. Loaders (Place object program in memory in an executable format) 3. Macros (allows programmers to use abbreviations) 4. Compilers 5. Formal Systems
  • 10. Overview[8] • System Software Requirements • Space/time economy • Access to all relevant hardware features • Object code must not depend upon elaborate run-time support
  • 11. Overview[9] • Characteristics of Systems Programming • Programmers are expected to know hardware and internal behavior of the computer system on which the program will run • Use low level programming languages or some programming dialects • Requires little run time overheads and can execute in a resource constrained environment • Small or no runtime libraries requirements • Have access to system resource, including memory
  • 12. Overview[10] • Systems Programming Limiting Factors • No debugging mode running support • Limited programming facilities • Less runtime libraries • Less error checking capabilities
  • 13. Machine Architecture[1] • The system software like assembler, linker and loader are all dependent on machine architecture • One characteristic in which most system software differ from application software is machine dependency: • Assembler translate mnemonic instructions into machine code • Compilers must generate machine language code
  • 14. Machine Architecture[2] • System Software usually related to the architecture of the machine on which they are to run • Some aspects of system software that do not directly depend upon the type of computing system (General design and logic of an assembler and compiler) • A different definition of computer architecture is built on four basic viewpoints: • Structure (interconnection of various hardware components) • Organization (dynamic interplay and management of the various components) • Implementation (design of hardware components), and • Performance (specifies the behavior of the computer system).
  • 15. Machine Architecture[3] • Architecture Feature Descriptor: • System Memory (used to store programs and data) • Registers • Instruction Formats • Data Formats • Addressing Mode • Instruction Set • Input/Output
  • 16. Machine Architecture[4] • Execution Life Cycle: 1. The next instruction to be executed, whose address is obtained from the PC, is fetched from the memory and stored in the IR. 2. The instruction is decoded. 3. Operands are fetched from the memory and stored in CPU registers, if needed. 4. The instruction is executed. 5. Results are transferred from CPU registers to the memory, if needed.
  • 17. Simplified Instructional Computer • SIC is a hypothetical computer system architecture designed for teaching computer systems programming • This machine has been designed to illustrate the most commonly encountered hardware features and concepts, while avoiding most of the idiosyncrasies that are often found in real machines. • Two versions of SIC: • SIC - standard model • SIC/XE (extra equipment or extra expensive)
  • 18. SIC Memory • Memory storage in SIC consists of 8-bit bytes, and all memory addresses in SIC are byte addresses. • Any 3 consecutive bytes form a word (24 bits) • All addresses in SIC are byte address. • Words are addressed by the location of their lowest numbered byte. • Total of 215 (32,768) bytes of total memory • Least significant part of a numeric value is stored at the lowest numbered address
  • 19. SIC Registers • Note: the numbering scheme is chosen for compatibility with XE version of SIC Register Number Function Use A 0 Accumulator Arithmetic operations X 1 Index register Addressing L 2 Linkage register Storing return address for subroutine jump instruction (JSUB) PC 8 Program counter Contains Address of next instruction to be fetched for execution SW 9 Status word Flags, other information including Condition Code (CC)
  • 20. SIC Data Formats • Integers: stored as 24-bit binary numbers • 2’s complement representation for negative values • No floating point hardware in standard SIC • Characters: 8-bit ASCII
  • 21. SIC Instruction Formats • 24-bit format • The flag bit x indicates indexed-addressing mode 8 bit opcode 1 bit addressing mode 15 bit address
  • 22. SIC Addressing Modes • 2 addressing modes available • Indicated by setting of x bit in the instruction • The table describes how the target address is calculated from the address given in the instruction • (x): represents the contents of register x Mode Indication Target address calculation Direct x = 0 TA = address Indexed x = 1 TA = address + (x)
  • 23. SIC Instruction Set[1] • Load and store registers: LDA, LDX, STA, STX, etc. • Integer arithmetic operations: ADD, SUB, MUL, DIV, etc. • All arithmetic operations involve register A and a word in memory, with the result being left in the register • Comparison: COMP • COMP compares the value in register A with a word in memory, this instruction sets a condition code CC to indicate the result
  • 24. SIC Instruction Set[2] • Conditional jump instructions: JLT, JEQ, JGT • these instructions test the setting of CC and jump accordingly • Subroutine linkage: JSUB, RSUB • JSUB jumps to the subroutine, placing the return address in register L • RSUB returns by jumping to the address contained in register L
  • 25. SIC Input and Output • Input and output are performed by transferring 1 byte at a time to or from the rightmost 8 bits of register A. • Each devices are assigned unique 8 bit code • Test Device (TD) instruction tests whether the addressed device is ready to send or receive a byte of data • The condition code is set to indicate the result of the test • “Less Than,< “ if device is ready; “Equal, =” if device is busy. • Read Data (RD): read a byte from the device to register A • Write Data (WD): write a byte from register A to the device
  • 26. SIC Programming Example[1] • Data movement LDA FIVE load 5 into A STA ALPHA store in ALPHA LDCH CHARZ load ‘Z’ into A STCH C1 store in C1 . . . ALPHA RESW 1 reserve one word space FIVE WORD 5 one word holding 5 CHARZ BYTE C’Z’ one-byte constant C1 RESB 1 one-byte variable
  • 27. SIC Programming Example[2] • Arithmetic operations: BETA = ALPHA+INCR-1 LDA ALPHA ADD INCR SUB ONE STA BETA LDA GAMMA ADD INCR SUB ONE STA DELTA ... ONE WORD 1 one-word constant ALPHA RESW 1 one-word variables BETA RESW 1 GAMMA RESW 1 DELTA RESW 1 INCR RESW 1
  • 28. SIC Programming Example[3] • Looping and indexing: copy one string to another LDX ZERO initialize index register to 0 MOVECH LDCH STR1,X load char from STR1 to reg A STCH STR2,X TIX ELEVEN add 1 to index, compare to 11 JLT MOVECH loop if “less than” . . . STR1 BYTE C’TEST STRING’ STR2 RESB 11 ZERO WORD 0 ELEVEN WORD 11
  • 29. SIC Programming Example[4] LDA ZERO initialize index value to 0 STA INDEX ADDLP LDX INDEX load index value to reg X LDA ALPHA,X load word from ALPHA into reg A ADD BETA,X STA GAMMA,X store the result in a word in GAMMA LDA INDEX ADD THREE add 3 to index value STA INDEX COMP K300 compare new index value to 300 JLT ADDLP loop if less than 300 ... ... INDEX RESW 1 ALPHA RESW 100 array variables—100 words each BETA RESW 100 GAMMA RESW 100 ZERO WORD 0 one-word constants THREE WORD 3 K300 WORD 300
  • 30. SIC Programming Example[5] • Input and output INLOOP TD INDEV test input device JEQ INLOOP loop until device is ready RD INDEV read one byte into register A STCH DATA . . OUTLP TD OUTDEV test output device JEQ OUTLP loop until device is ready LDCH DATA WD OUTDEV write one byte to output device . . INDEV BYTE X’F1’ input device number OUTDEV BYTE X’05’ output device number DATA RESB 1
  • 31. SIC/XE Memory • Larger Memory • 220 bytes (1 megabyte) in memory • Leads to change in instruction formats & addressing modes
  • 32. SIC/XE Registers • 3 additional registers, 24 bits in length • 1 additional register, 48 bits in length Mnemonic Number Use B 3 Base register – used for addressing S 4 General working register – no special use T 5 General working register – no special use F 6 Floating point accumulator (48 bits)
  • 33. SIC/XE Data Formats • Similar data format as the standard SIC. • In addition, there is 48 bit Floating-point data type represented with the following format. • The absolute value of number represented as: • frac*2(exp-1024) • fraction: 0~1 • exponent: 0~2047 • Sign is indicated by ‘s’ (0 = +ve, 1 = -ve) s Exponent fraction 1 11 36
  • 34. SIC/XE Instruction formats[1] • The larger memory on SIC/XE mean an address will no longer fit into 15 bit field. • Two possible options: • Use some from of relative addressing • Or extended the address field to 20 bit • Both options are included in SIC/XE(format 3(e=0) and format 4(e=1))
  • 35. SIC/XE Instruction formats[2] • SIC/XE also provides some instructions that do not refer memory at all • Formats 1 and 2 are instructions that do not reference memory at all
  • 36. SIC/XE Addressing Mode[1] ● Addressing modes • Base relative/b (n=1, i=1, b=1, p=0) • Program-counter relative/p (n=1, i=1, b=0, p=1) • Direct/ (n=1, i=1, b=0, p=0) • Immediate (n=0, i=1, x=0) • Indirect (n=1, i=0, x=0) • Indexing (both n & i = 0 or 1, x=1) • Extended (e=1) ● Note: Indexing cannot be used with immediate or indirect addressing
  • 37. SIC/XE Addressing Mode[2] n i x B p e opcode 1 1 1 0 disp  Base Relative Addressing Mode n=1, i=1, b=1, p=0 TA=(B)+disp (0disp 4095)  Program-Counter Relative Addressing Mode n i x b p e opcode 1 1 0 1 disp n=1, i=1, b=0, p=1 TA=(PC)+disp (-2048disp 2047)
  • 38. SIC/XE Addressing Mode[3] n i x b p e opcode 1 1 0 0 disp • Direct Addressing Mode n=1, i=1, b=0, p=0 TA=disp (0disp 4095) n i x b p e opcode 1 1 1 0 0 disp n=1, i=1, b=0, p=0 TA=(X)+disp (with index addressing mode)
  • 39. SIC/XE Addressing Mode[4] n i x b p e opcode 0 1 0 disp  Immediate Addressing Mode n=0, i=1, x=0 TA = disp  Indirect Addressing Mode n i x b p e opcode 1 0 0 disp n=1, i=0, x=0 TA=(disp)
  • 40. SIC/XE Addressing Mode[5] n i x b p e opcode 0 0 disp  Simple Addressing Mode i=0, n=0 TA=b/p/e/disp (SIC standard) n i x b p e opcode 1 1 disp i=1, n=1 TA=disp (SIC/XE standard)
  • 41. SIC/XE Instruction Set • New registers: LDB, STB, etc. • Floating-point arithmetic: ADDF, SUBF, MULF, DIVF • Register move: RMO • Register-register arithmetic: ADDR, SUBR, MULR, DIVR • Supervisor call: SVC • Generates an interrupt for OS
  • 42. SIC/XE Input/Output • 1 byte at a time, TD, RD, and WD • SIO, TIO, HIO: • start, test, halt the operation of I/O device
  • 43. SIC/XE Programming Example[1] LDA #5 STA ALPHA LDCH #90 STCH C1 . . . ALPHA RESW 1 C1 RESB 1 LDA FIVE STA ALPHA LDCH CHARZ STCH C1 . . . ALPHA RESW 1 FIVE WORD 5 CHARZ BYTE C’Z’ C1 RESB 1 SIC version SIC/XE version
  • 44. SIC/XE Programming Example[2] LDS INCR LDA ALPHA BETA=ALPHA+INCR-1 ADDR S,A SUB #1 STA BETA LDA GAMMA DELTA=GAMMA+INCR-1 ADDR S,A SUB #1 STA DELTA ... ... ALPHA RESW 1 one-word variables BETA RESW 1 GAMMA RESW 1 DELTA RESW 1 INCR RESW 1
  • 45. SIC/XE Programming Example[4] • Looping and indexing: copy one string to another LDT #11 initialize register T to 11 LDX #0 initialize index register to 0 MOVECH LDCH STR1,X load char from STR1 to reg A STCH STR2,X store char into STR2 TIXR T add 1 to index, compare to 11 JLT MOVECH loop if “less than” 11 . . . STR1 BYTE C’TEST STRING’ STR2 RESB 11
  • 46. SIC/XE Programming Example[5] LDS #3 LDT #300 LDX #0 ADDLP LDA ALPHA,X load from ALPHA to reg A ADD BETA,X STA GAMMA,X store in a word in GAMMA ADDR S,X add 3 to index value COMPR X,T compare to 300 JLT ADDLP loop if less than 300 ... ... ALPHA RESW 100 array variables—100 words each BETA RESW 100 GAMMA RESW 100
  • 48. Traditional (CISC) Machines • Complex Instruction Set Computers (CISC) • complicated instruction set • different instruction formats and lengths • many different addressing modes • e.g. VAX or PDP-11 from DEC • e.g. Intel x86 family • Reduced Instruction Set Computer (RISC) 48
  • 49. Reading Assignments • VAX Architecture • Pentium Pro Architecture
  • 50. RISC Machines[1] • 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
  • 51. RISC Machines[2] • Large number of general-purpose registers • Small number of addressing modes • Three RISC machines • SPARC family • PowerPC family • Cray T3E
  • 52. Systems Programming Languages • In modern programming languages, there exists a distinct lack of languages targeted at systems programming. • Most modern languages are designed for application development which is most certainly valid in the modern world. However, systems programming has been left behind in language development. • As such, systems programs do not benefit from the modern developments in language design. • Examples of System Programming Languages • C/C++, D, Go, Rust
  • 53. Systems Programming Languages Choosing Criteria • Systems programming is typically very resource constrained and it is often appropriate to have something machine friendly at the expense of potentially being somewhat programmer unfriendly. • Safety • Control
  • 54. Benefit of RUST • It exposes all the low level details that are required to have absolute control over your memory layout. • It has all the facilities you expect in a modern language. • Rust has something they call the borrow checker, which statically (checked compile time) eliminates a whole range of issues plaguing C/C++. • It has a real concurrency story.
  • 55. Requirements for RUST • Rust compiler (rustc) installation • Rust package manager (Cargo) https://www.rust-lang.org/downloads.html

Editor's Notes

  • #57: As a future work 8086 Microprocessor can be replaced by either 8051 Microcontroller which in turn have its own application in embedded systems or any other more advanced processors.