×
It does not matter how slowly you go as long as you do not stop.
--Your friends at LectureNotes
Close

Lab Manuals for System Programming - SP By Swastik Ray

  • System Programming - SP
  • Practical
  • GOVERNMENT COLLEGE OF ENGINEERING KEONJHAR - GCEKJR
  • Computer Science Engineering
  • 79 Views
  • 2 Offline Downloads
  • Uploaded 1 month ago
Swastik Ray
Swastik Ray
0 User(s)
Download PDFOrder Printed Copy

Share it with your friends

Leave your Comments

Text from page-1

Experiment 1 AIM: INTRODUCTION OF SYSTEM PROGRAMMING. AND ITS COMPONENTS INTRODUCTION :System programming (or systems programming) is the activity of computer programming system software. The primary distinguishing characteristic of systems programming when compared to application programming is that application programming aims to produce software which provides services to the user (e.g. word processor), whereas systems programming aims to produce software which provides services to the computer hardware (e.g. disk defragmenter). It requires a greater degree of hardware awareness. COMPONENTS:Linker :For modularity of the program, it is better to break programs into several modules (subroutines). It is even better to put common routine, like reading a hexadecimal number, writing a hexadecimal number etc. which could be used by a lot of other programs also into a separate file. These files are assembled (translated) separately. After each has been successfully assembled, they can be linked together to form a large file, which constitutes the computer program. The program that links several programs is called the linker. Loader:A loader is a program that places programs into main memory and prepares them for execution. The loader's target language is machine language, its source language is nearly machine language. Loading is ultimately bound with the storage management function of operating systems and is usually performed later than assembly or compilation. The period of executions of user's program is called execution time. The period of translating a user's source program is called assembly or compile time. Load time refers to the period of loading and preparing an object program for execution Compiler :A compiler is a computer program (or set of programs) that transforms source code written in a programming language (the source language) into another computer language (the target language, often having a binary form known as object code). The most common reason for wanting to transform source code is to create an executable program. The name "compiler" is primarily used for programs that translate source code from a high-level programming language to a lower level language (e.g., assembly language or machine code). If the compiled program can run on a computer whose CPU or operating system is different from the one on which the compiler runs, the compiler is known as a cross-compiler Assembler :An assembler is a program that takes basic computer instruction and converts them into a pattern of bits that the computer's processor can use to perform its basic operations. Some people call these instructions assembler language and others use the term assembly language. Compiler :A compiler is a computer program (or set of programs) that transforms source code written in a programming language (the source language) into another computer language (the target

Text from page-2

language, often having a binary form known as object code). The most common reason for wanting to transform source code is to create an executable program. The name "compiler" is primarily used for programs that translate source code from a high-level programming language to a lower level language Macro :A macro in computer science is a rule or pattern that specifies how a certain input sequence (often a sequence of characters) should be mapped to a replacement output sequence (also often a sequence of characters) according to a defined procedure. The mapping process that instantiates (transforms) a macro use into a specific sequence is known as macro expansion. Macros are used to make a sequence of computing instructions available to the programmer as a single program statement, making the programming task less tedious and less error-prone.

Text from page-3

Experiment 2 AIM-Write a program to check balance parenthesis of a given program #include<stdio.h> #include<conio.h> //#include"intstack.h" //#include<sdtio.h> int main() {char bracket[20]; gets(bracket); char arr[6]; int i=0; while (i<20) { switch(bracket[i]) { case'[': { arr[0]=1; break; } { arr[1]=2; break; } case')': { arr[3]=3; break; } case'}':

Text from page-4

{ arr[4]=2; break; } case']': { arr[5]=1; break; } default: printf(""); } i++; } if(arr[3]==arr[2]) printf(""); else printf(")or(is missing"); if(arr[1]==arr[4]) printf(""); else printf("}or{is missing"); return 0; }

Lecture Notes