Introduction

Software is a set of instructions designed to perform a specific task and tell the computer how to operate. There are mainly two types: system software and application software. System software is a set of computer programs designed to manage system resources. It is a set of files and utilities that are responsible for the functioning and smooth operation of a computer system along with other equipment. It is also responsible for running the operating system (OS) and overall management of computer devices.

Definition

System programming refers to the process of developing software programs that interact closely with the underlying hardware and system components of a computer or computing system. It involves creating software that enables the management, control, and coordination of various system resources, such as memory, processors, devices, and network connections. System programming is typically focused on low-level operations and requires a deep understanding of computer architecture, operating systems, and hardware interfaces.

Feature of system programming

  1. Low-Level Language.
  2. Hardware Interaction.
  3. Operating System Interfaces.
  4. Memory Management.
  5. Device Drivers.
  6. Performance Optimization.
  7. Security and Privilege Management.
  8. Error Handling and Debugging.
  9. Multi-threading and Concurrency.
  10. Portability.

System Programmer

Systems programmers develop, test, and maintain the software that makes computers and other devices work. They code and create programs that manage networks, databases, and applications. Systems programmers also work with system analysts to understand user needs and create solutions that meet those needs. You may also be responsible for educating users on the use of new software and systems. Systems programmers usually have a bachelor’s degree in computer science or a related field.

Application Programmer

Application programmers create, test, and maintain software applications that solve specific business or consumer problems. Work with our development team to create custom applications using programming languages ​​such as Java, C or Python. Application developers also test their applications to ensure that they are free of bugs and that they meet specific customer requirements. They may also be responsible for maintaining and updating existing applications. Application programmers usually have a bachelor’s degree in computer science or a related field.

Type of system programs

  1. Operating Systems.
  2. Device Drivers.
  3. Firmware.
  4. System Utilities.
  5. Language Processors.
  6. Text Editors.
  7. Command Interpreters.
  8. System Monitors.
  9. Virtualization Software.
  10. Network Services.

Assembler

An assembler is a program that converts instructions written in low-level assembler into relocatable machine code and generates additional information for the loader.

Single-pass Assembler

A single-pass assembler processes the assembly code in a linear manner, scanning the source code only once. It translates each instruction into machine code and generates the corresponding object code or executable program in a single pass. This approach requires the assembler to handle forward references, which are references to symbols (labels or variables) that appear later in the code. To handle forward references, the assembler often uses placeholder values or generates temporary symbols until the final values are determined.

Two-pass Assembler

A two-pass assembler goes through the source code twice, performing different tasks in each pass. During the first pass, it builds a symbol table by scanning the code and assigning addresses to labels and variables. It also resolves forward references by storing their target addresses. In the second pass, it translates the instructions into machine code using the symbol table created in the first pass.

Macro processor

Macro instructions are a convenient notation for programmers. Each time a macro is encountered, the entire macro body or statement macroblock is expanded in the underlying source code. Therefore, using macro commands makes writing code more convenient.

Macro language

Macro language is an extension of assembly language. Provides a convenient way to recreate a series of assembly language statements in one or more programs. A macro definition is created only once. Then, whenever you want to generate a series of statements, one statement, a macro statement, is created. This simplifies program coding, reduces the possibility of programming errors, and ensures that standard sequence of statements are used to perform the desired function.

Features

  • conditional macro expansion
  • concatenation of macro parameters
  • generation of unique labels
  • macro instruction arguments
  • expansion time variables
  • expansion time loops

Macro instructions

A macro command is a request to an assembly language program to process a predefined sequence of commands called a macro definition. In this definition, the assembler generates machine and assembler instructions and then treats them as if they were part of the original input of the source module.

Features of macro facility

The macro facility is a feature in system programming that allows programmers to define and use macros. Macros are essentially reusable code templates or shorthand notations that simplify the programming process and make code more concise and readable. Here are some features of the macro facility in system programming:

  1. Macro Definition.
  2. Macro Expansion.
  3. Parameterized Macros.
  4. Code Reusability.
  5. Code Generation.
  6. Conditional Compilation.
  7. Code Abstraction.
  8. Preprocessor Directives.

Implementation

In computer science, implementation is the implementation of technical specifications or algorithms into programs, software components, or other computer systems through computer programming and deployment. There may be multiple implementations of a given specification or standard. For example, web browsers include implementations of specifications recommended by the World Wide Web Consortium, and software development tools include programming language implementations.

One pass macro processor

A one-pass macro processor is a tool used in programming to expand and process macros within the source code during a single pass of the code. In the context of the MIS (Management Information Systems) domain, a one-pass macro processor can be used to facilitate the creation and expansion of macros in MIS programming languages.

A macro is a sequence of instructions or statements that is assigned a name and can be invoked or expanded whenever that name is referenced in the code. Macros are often used to simplify repetitive or complex tasks, improve code readability, and enable code reuse.

Two pass macro processor

A two-pass macro processor is a type of macro processor that performs macro expansion in two passes over the source code. The purpose of a macro processor is to handle macro instructions, which are predefined blocks of code that can be invoked multiple times in a program.

In the first pass of a two-pass macro processor, the processor scans the source code and identifies all macro invocations. It records the locations and arguments of each macro invocation without expanding them. This pass is usually referred to as the “macro definition pass.” The macro invocations are stored in a table or data structure for later processing.

Loader

A special program that receives an executable file from the linker, loads it into RAM, and prepares this code for execution on the computer. Loaders allocate memory for programs. Symbolic links between objects are also included. It is responsible for loading programs and libraries from the operating system. Embedded computer systems do not have bootloaders. In them, code is executed via ROM. There are different loading schemes.

Linker

A linker is a special program that combines an object file with other pieces of code generated by a compiler/assembler to create an executable file with the .exe extension. In the object file, the linker finds and adds all the libraries needed to run the file. Controls the amount of memory to store the code for each module. It also combines two or more separate object programs and establishes a link between them.

Direct Linking Loader Design

a direct linking loader is responsible for loading and linking executable programs into memory for execution. It performs the necessary steps to resolve references to external symbols and establishes the correct memory layout for the program. The design and implementation of a direct linking loader typically involve several stages. Let’s go through them:

  1. Input Processing.
  2. Memory Allocation.
  3. Symbol Resolution.
  4. Relocation.
  5. Loading.
  6. Linking.
  7. Execution.

Subroutine Linkage

Subroutine linkage refers to the mechanisms used to connect or link subroutines or functions within a program. It involves specifying how a subroutine is called (invoked) and how control is transferred back to the calling program after the subroutine execution is complete.

Loader Schemes

Loader schemes are techniques used to load executable programs into memory for execution. The loader is responsible for allocating memory space, resolving external references, and preparing the program for execution.

Compiler

A compiler is a special program that converts the source code of a programming language into machine code, byte code, or another programming language. Source code is usually written in a human-readable, high-level language such as Java or C. Programmers write source code in a code editor or an integrated development environment (IDE) with an editor and save the source code in one. Or more text files. A compiler supporting the source programming language reads the file, parses the code, and converts it into a format suitable for the target platform.

Overview of compilation process

Many of us write code and run it. But do all of us (well, I think most of us are newbies :P) know the basic process of turning source code into an executable program? I don’t think there are many. Well, this article is for all the few secret seekers out there 😉

lexical analysis

Lexical analysis is the first step in compiler development. The lexical analyzer uses modified source code written in sentences. In other words, it helps convert a sequence of characters into a sequence of tokens. The lexical analyzer breaks this phrase into a series of tokens. Remove any extra white space or comments written in the source code.

Syntax analysis

Parsing or parsing is the second step after lexical analysis. Checks the syntactic structure of the given input, i.e. whether the given input is syntactically correct (of the language in which it is written). This is achieved by building a data structure called a parse tree or syntax tree. Parse trees are built using predefined language grammars and input strings. If the syntax tree can be used to obtain (in the process of being inferred) a given input string, then the input string has correct syntax. Otherwise, the parser reports an error.

Semantic analysis

Semantic analysis is a subset of natural language processing (NLP) that attempts to understand the meaning of natural language. Understanding natural language may seem like a simple process to us. However, due to the enormous complexity and subjectivity of human language, interpreting it is quite a challenge for machines. Semantic analysis of natural language captures the meaning of a given text by considering its context, the logical structure of a sentence, and its grammatical role.

Intermediate code generation

Intermediate code can convert a source program into a machine program. Intermediate code is generated because the compiler cannot directly generate machine code in one step. Therefore, it first converts the source program into intermediate code and then performs efficient machine code generation. Intermediate codes can be represented by postfix notation, syntax trees, directed acyclic graphs, three address codes, 4 and 3.

Code optimization techniques

Important code optimization techniques are-

1. Compile Time Evaluation
2. Common sub-expression elimination
3. Dead Code Elimination
4. Code Movement
5. Strength Reduction

Device Driver

Device drivers are small pieces of software that tell the operating system and other software how to interact with hardware.

For example, a printer driver tells the operating system, and by extension any program that has the content you want to print, how to correctly print the information on the page.

Text Editor Functions

A text editor in system programming is a software tool used for creating, editing, and managing text files. It provides an interface for users to enter and manipulate text, as well as perform various operations on the text files. The functions and structure of a text editor in system programming typically include the following components:

  1. User Interface.
  2. File Management.
  3. Text Entry and Editing.
  4. Syntax Highlighting.
  5. Auto-Indentation.
  6. Code Navigation.
  7. Code Completion.
  8. Build and Compilation Integration.
  9. Plug-in and Extension Support.
  10. Customization Options.