SYSTEMS PROGRAMMING COM 212_2021
SYSTEMS PROGRAMMING COM 212_2021
Systems programming is the act of writing the programs needed for a computer system to
function (as opposed to the programs that do particular kinds of useful computation). Some of
the programs that systems programmers write include operating systems, language processors
and compilers, and data file management programs.
Assembly language a computer language in which each statement corresponds to one of the
binary instructions recognized by the CPU.
Assembly languages are more cumbersome to use than regular (or high-level) programming
languages, but they are much easier to use than pure machine languages, which require that all
instructions be written in binary code.
Instead, assembly language is used for short procedures that must run as fast as possible or
must do special things to the computer hardware.
For example, below is a short routine that takes a number, checks whether it is in the range 97
to 122 inclusive, and subtracts 32 if so, otherwise leaving the number unchanged. (That
particular subtraction happens to convert all lowercase ASCII codes to their uppercase
equivalents.)
This particular assembly language is for the Intel 8086 family of processors (which includes all
PC-compatible computers); assembly languages for other processors are different. Everything
after the semicolon in each line is a comment, ignored by the computer. Two lines (PROC and
ENDP) are pseudo instructions; they tell the assembler how the program is organized. All the
other lines translate directly into binary codes for the CPU.
Many of the most common operations in computer programming are hard to implement in
assembly language. For example, there are no assembly language statements to open a file,
print a number, or compute a square root. For these functions the programmer must write
complicated routines from scratch, use services provided by the operating system, or call
routines in a previously written library.
Pseudo Code
MOV eax, 5
ADD eax, 2
Aviation industry.
Compiler - a computer program that translates C, C++, BASIC, Pascal, or a similar high-level
programming language into machine language. The high-level language program fed into the
compiler is called the source program; the generated machine language program is the object
program.
Interpreter - a program that executes a source program by reading it one line at a time and
doing the specified operations immediately. Most Perl and Python systems are interpreters.
Contrast COMPILER.
Assembler - a computer program that translates assembly language into machine language. See
ASSEMBLY LANGUAGE; MACHINE LANGUAGE; COMPILER.
OPERATING SYSTEMS
Operating system a program that controls a computer and makes it possible for users to enter
and run their own programs.
Under the control of the operating system, the computer recognizes and obeys commands
typed by the user. In addition, the operating system provides built-in routines that allow the
user’s program to perform input-output operations without specifying the exact hardware
configuration of the computer. A computer running under one operating system cannot run
programs designed to be run under another operating system, even on the same computer. For
articles on specific operating systems, see CMS; CP/M; LINUX; MAC OS; MS-DOS; MVS; OS/2;
OS/360; UNIX; WINDOWS (MICROSOFT); Z/OS.
Functions of operating systems includes but not limited to:
Memory management
Processor management
Storage management
I/O management
Application management
Network management
Others
Input - information that is given to a computer; the act of giving information to a computer.
(Note that the terms input and output are always used from the computer’s point of view.) The
input data may be either numbers or character strings (e.g., a list of names). The computer
receives input through an input device, such as a keyboard, or from a storage device, such as a
disk drive.
Computer output may be either printed on paper, displayed on a monitor screen, or stored on
disk or tape. output device a device that shows, prints, or presents the results of a computer’s
work. Examples of output devices include MONITORs, PRINTERs, and IMAGESETTERs.
Library
2. A collection of reference materials and software tools, such as clip art, prerecorded sounds,
and predefined objects.
Utility a program that assists in the operation of a computer but does not do the main work for
which the computer was bought. (A program designed for general support of the processes of a
computer). For instance, programs that compress data or defragment disks are utilities (see
DATACOMPRESSION; FRAGMENTATION; NORTON UTILITIES).
By contrast, word processors, financial programs, engineering programs, and other programs
that do actual work for the user are called application programs.
INTERRRUPTS
Interrupt an instruction that tells a microprocessor to put aside what it is doing and call a
specified routine. The processor resumes its original work when the interrupt service routine
finishes. Interrupts are used for two main purposes:
1. To deal with hardware events such as a key being pressed or a character arriving through a
serial port. These events cannot be ignored; the incoming data must be either processed
immediately or stored in a buffer.
2. To call subroutines that are provided by the hardware or operating system. On the PC, most
DOS and BIOS services are called through interrupts rather than through the ordinary
instruction for calling a subroutine. Windows services, however, are called as ordinary
subroutines.
These correspond to the two main ways of causing an interrupt: by receiving a signal from
outside the microprocessor (a hardware interrupt) or by executing a machine instruction (a
software interrupt).