Machine code is the native language of all CPUs. It is made up of Machine languages instructions (ML) where each instruction is in binary.
Machine code works along the operations of a CPU, and what runs the operations are the CPU registers. A CPU register is a small set of data, which obviously takes place in a CPU. One may hold an instruction, a storage address, or any kind of data (such as a bit sequence or individual characters). And registers usually consist of a small amount of fast storage, although some registers have specific hardware functions, and may be read-only or write-only.
The instruction register holds the instruction currently being executed
The memory data register (also known as the memory buffer register or data buffer) holds the piece of data that has been fetched from memory
The memory address register holds the address of the next piece of memory to be fetched.
The program counter holds the location of the next instruction to be fetched from memory. It is automatically incremented between supplying the address of the next instruction and the instruction being executed.
The accumulator is an internal CPU register used as the default location to store any calculations performed by the arithmetic and logic unit.
When a program is interrupted its state, ie: the value of the registers such as the program counter, instruction register or memory address register - may be saved into the general purpose registers, ready for recall when the program is ready to start again
In general the more registers a CPU has available, the faster it can work.
Method used by the CPU to execute instructions.
CPU checks program counter.
Program counter sends the CPU the location of the next instruction
CPU fetches instruction from memory address
Instruction is decoded and Executed
Back to Step 1
A linker is a computer executable program.
In computing, a linker or link editor is a computer utility program that takes one or more object files generated by a compiler and combines them into a single executable file, library file, or another 'object' file.
Static linking
Dynamic Linking
The Static linking is a set routine. Static linker takes input a collection of relocatable objects files and command line argument and generate as output a fully linked executable object file that can be loaded and run.
A dynamic link is a library that contains code and data that can be used by more than one program at the same time.
In computing, a dynamic linker is the part of an operating system that loads and links the shared libraries needed by an executable when it is executed (at "run time"), by copying the content of libraries from persistent storage to RAM, and filling jump tables and relocating pointers.
When multiple programs use the same library of functions, a DLL can reduce the duplication of code that is loaded on the disk and in physical memory. This can greatly influence the performance of not just the program that is running in the foreground, but also other programs that are running on the Windows operating system.
A DLL helps promote developing modular programs. This helps you develop large programs that require multiple language versions or a program that requires modular architecture. An example of a modular program is an accounting program that has many modules that can be dynamically loaded at run time.
When a function within a DLL needs an update or a fix, the deployment and installation of the DLL does not require the program to be re-linked with the DLL. Additionally, if multiple programs use the same DLL, the multiple programs will all benefit from the update or the fix. This issue may more frequently occur when you use a third-party DLL that is regularly updated or fixed.
The following list describes some of the files that are implemented as DLL's in Windows operating systems:
ActiveX Controls (.ocx) files
An example of an ActiveX (.ocx) control is a calendar control that lets you select a date from a calendar.
Control Panel (.cpl) files
An example of a (.cpl) file is an item that is located in Control Panel. Each item is a specialized DLL.
Device driver (.drv) files
An example of a device driver (.drv) is a printer driver that controls the printing to a printer.