















Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
Prepare for your exams
Study with the several resources on Docsity
Earn points to download
Earn points by helping other students or get them with a premium plan
Eg: Language translators like compiler, assembler. I. Application Software: Application software consists of programs designed to perform specific tasks for.
Typology: Exercises
1 / 23
This page cannot be seen from the preview
Don't miss anything!
















INTRODUCTION : System Software Vs. Application Software, Different System Software– Assembler, Linker, Loader, Macro Processor, Text Editor, Debugger, Device Driver, Compiler, Interpreter, Operating System(Basic Concepts only) SIC & SIC/XE ARCHITECTURE : Addressing modes, SIC & SIC/XE Instruction set, Assembler Directives and Programming.
A computer cannot do anything on its own. It must be instructed to do a job. So its necessary to specify a sequence of instructions that a computer must perform to solve a problem. Such a sequence of instructions written in a language understood by a computer is called a computer program. Computer software is the collection of computer programs and related data that provide instructions telling a computer what to do. Software is divided into 2 types:
ii. System Support Programs: provide routine service functions to the other computer programs and computer users. Eg: utilities, libraries System Development Programs: assists in the creation of application programs. Eg: Language translators like compiler, assembler. I. Application Software: Application software consists of programs designed to perform specific tasks for users. .Eg: Media player, Ms. Word, Notepad etc. There are 2 types of application software: i. General Purpose Application Software: These provide general user needs, not for a specific purpose. Eg: Spreadsheet program like Microsoft Excel, which can be used to perform different applications. ii. Special Purpose(Custom) Application Software: Typically used for specific applications. Eg: Turbo Tax, which is a special purpose application used to perform tax returns. Relationship between system software and application software: System software control and manages hardware thereby providing a platform for application software to operate. Application software helps user to accomplish one or more tasks using a computer through system software. For an application to run on a computer it needs to be allocate space from memory, allocated resources (CPU time, hardware like keyboard, display, printer etc), given access to system libraries, all of which is done by operating system which is a system software. Computer Hardware System Software Application Software
Interpreter works as follows. The interpreter reads the source program and stores it in memory. Program counter (PC) indicates which statement of the source program is to be interpreted next. During interpretation, it takes a source statement, determines its meaning and performs the actions and PC is incremented. The interpretation cycle consists of the following steps: Fetch the statement. Analyze the statement and determine its meaning. Execute the meaning of the statement. Advantages of interpreter: Easier to use particularly for beginners, since errors are immediately displayed.
. Disdvantage of interpreter: Every line has to be translated every time it is executed, even if it is executed many times as the program runs. Because of this interpreters tend to be slow. Example for interpreters: Basic on older home computers, script interpreters such as JavaScript. c. Assembler Assembler converts assembly language program into its equivalent machine language. Assembly Language Machine Language Example: MASM (8086 assembler) d.Macro Preprocessor A macro processor is a program that reads a file and scans them for certain keywords. When a keyword is found, it is replaced by some text. The keyword/text combination is called a macro. A simple example is the C language pre-processor: #define max 100; int i; for(i=0;i<max;i++) { ......... }
4 .Text Editors A text editor is a type of program used for editing plain text files. Text editors are often provided with operating systems or software development packages. Example for text editors are Microsoft word, gedit in Linux etc. 5 .Debuggers A debugger or debugging tool is a computer program that is used to test and debug other programs. 6 .Device Drivers In computing, a device driver is a computer program that operates or controls a particular type of device that is attached to a computer. A Device Driver is glue between an OS and its I/O devices. They act as translators converting requests received from the operating system into commands that the devices can understand. 7 .Operating System It is the most important system program that act as an interface between the users and the system. It makes the computer easier to use. It provides an interface that is more user-friendly than the underlying hardware. The functions of OS are:
Defining a database means specifying the data types, structures and constraints for the data to be stored in the database. Constructing the database is the process of storing the data on some storage medium that is controlled by the DBMS. Manipulating the database means processing the database. It includes functions such as querying the database to retrieve specific data, updating the database to reflect changes in the mini world and generating reports from the data. Sharing a database allows multiple users and programs to access the database concurrently. A Database System is a computerized record keeping system whose overall purpose is to store information and to allow users to retrieve and update that information on demand. Database system consists of a Database, Database Management System and an Application program. An application program accesses the database by sending requests or queries for data to the DBMS. Fig: A Database System
The term addressing modes refers to the way in which the operand of an instruction is specified.Two types of addressing modes are available in SIC architecture, indicated by the setting of x-bit in the instruction. They are
It includes instructions like:
1. Load and Store Registers (Data movement instruction) Ex: LDA, STA, LDX, STX. LDA – Load Accumulator, STA – Store the content of Accumulator to specified location LDX – Load X Register, STX – Store the content of X Register to specified location 2. Arithmetic operating instructions Ex: ADD, SUB, MUL, DIV.
This involves register A and a word in memory, with the result being left in the A register. 3. Compare Instruction Ex: COMP Instruction COMP compares a value in A with a word in memory, and sets the condition code CC to indicate the result of <, > and =. 4. Branching instructions (Conditional Jump Instruction) Ex: JLT, JEQ, JGT. These instructions test the settings of CC and jump accordingly. JLT – Jump on Less than, JEQ- Jump on Equal, JGT – Jump on Greater than 5. Subroutine linkage instructions Ex: 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.
Input/Output is performed by transferring 1 byte at a time to or from the rightmost 8 bits of register A. Each device is assigned a unique 8-bit code There are 3 I/O instructions, each of which specifies device code as an operand.
There are 4 different instruction formats available in SIC/XE: Formats 1 and 2 do not reference memory at all Instruction format 3 and 4 introduce addressing mode flag bits. Flag e: e=0 use Format 3 e=1 use Format 4 Flag p – indicates P rogram counter relative addressing Flag b - indicates B ase register relative addressing Flag x – indicates inde x ing. (uses index register) Flag i – indicates i mmediate addressing Flag n – indicates i n direct addressing
SIC/XE supports all of the instructions that are available on standard SIC. SIC/XE supports following instructions:
1. Load and Store Registers (Data movement instruction) Ex: LDCH, STCH, LDB, STB. LDCH – Load Accumulator with character, STCH – Store the character on Accumulator to specified location. LDX – Load X Register, STX – Store the content of X Register to specified location 2. Integer Arithmetic operating instructions Ex: ADD, SUB, MUL, DIV. This involves register A and a word in memory, with the result being left in the A register. 3. Floating Point Arithmetic Instruction Ex: ADDF, SUBF, MULF, DIVF F- stands for Floating Point 4. Compare Instruction Ex: COMP Instruction COMP compares a value in A with a word in memory, and sets the condition code CC to indicate the result of <, > and =. 5. Branching instructions (Conditional Jump Instruction) Ex: JLT, JEQ, JGT. These instructions test the settings of CC and jump accordingly. JLT – Jump on Less than, JEQ- Jump on Equal, JGT – Jump on Greater than 6. Subroutine linkage instructions Ex: 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.
input or output data while CPU is busy with other works.3 instructions are provided for handling programmed I/O features: SIO - Start I/O HIO - Halt I/O TIO - Test I/O
The term addressing modes refers to the way in which the operand of an instruction is specified. Instruction format 3 and 4 introduce addressing mode flag bits. Flag e: e=0 use Format 3 e=1 use Format 4 Flag p – indicates P rogram counter relative addressing Flag b - indicates B ase register relative addressing Flag x – indicates inde x ing. (uses index register) Flag i – indicates i mmediate addressing Flag n – indicates i n direct addressing
1. Indexed Addressing Mode If x= 1 , then it indicates indexed addressing mode. In this addressing mode, the content of x register is added with address/disp for the target address calculation. TA=address +(X) Indexed addressing mode can be combined with PC relative and Base relative addressing mode. In this case, the content of X register is also added for the target address calculation.
Indexing cannot be used with immediate or indirect addressing modes.
2. Immediate Addressing Mode If n=0 and i=1 , then it indicates Immediate addressing mode. In this addressing mode, target address(TA) itself is used as the operand value. No memory reference is performed. 3. Indirect Addressing Mode If n=1 and i=0 , then it indicates Indirect addressing mode. In this addressing mode, word at the location given by the target address is fetched. The value contained in this word is then taken as the address of the operand value. 4. Simple Addressing Mode If n=0 and i=0, then it indicates simple addressing mode. In this addressing mode, TA is taken as the location of the operand If n=1 and i=1, it also indicates simple addressing mode ( same as n=0 and i=0) 5. Program Counter Relative Addressing If b=0 and p=1, then it Indicates Program Counter(PC) relative addressing mode. In this addressing mode, the displacement given in instruction is added with the content of program counter(PC) for obtaining the target address.
Examples of SIC/XE instructions and addressing modes Following figure gives examples of different addressing modes available on SIC/XE. The contents of B, PC and X registers are given as (B)=006000, (PC)= 003000 and (X)=000090. All values are given in hexadecimal. Fig b gives the machine code for a series of LDA instruction (opcode for LDA is 00) The target address generated by each instruction and the value loaded into register A is also shown
Assembler directives are instructions that direct the assembler to do something. The assembler directives in SIC are:
1. START Indicates the start of program. Used to define program name and starting address Eg: COPY START 1000 This means the program name is COPY and the starting address is 1000 2. END Used to indicate the end of program.
Optionally indicates first executable instruction. Eg: END ALPHA This means the program name ENDs at here. And the first executable instruction is ALPHA
3. RESW Used to reserves specified word for a data area. Eg: ALPHA RESW 4 This is to reserve 4 words. (4 words means 4*3 =12 bytes) 4. RESB Used to reserves specified byte for a data area. Eg: A RESB 5 This is to reserve 5 bytes. 5. WORD Used to generate one word integer constant Eg: B WORD 6 This uses one word to store the integer constant 6 and the name B is assigned to the first location 6. BYTE Generate character constant using required number of bytes Eg: ALPHA BYTE C ‘HAI’ This generates number of bytes needed to store HAI.
LDA #5 Load value 5 into register A STA ALPHA Store in ALPHA LDCH #90 Load ASCII code for ‘Z’ into register A STCH C1 Store in character variable C … … … ALPHA RESW 1 Reserve one-word variable for ALPHA C1 RESB 1 Reserve one-byte variable for ALPHA