Please note that the content of this book primarily consists of articles
available from Wikipedia or other free sources online. Hardware
abstractions are sets of routines in software that emulate some
platform-specific details, giving programs direct access to the hardware
resources. They often allow programmers to write device-independent,
high performance applications by avoiding standard Operating System
calls to hardware. The process of abstracting pieces of hardware is
often done from the perspective of a CPU. Each type of CPU has a
specific instruction set architecture or ISA. The ISA represents the
primitive operations of the machine that are available for use by
assembly programmers and compiler writers. One of the main functions of
a compiler is to allow a programmer to write an algorithm in a
high-level language without having to care about CPU-specific
instructions. Then it is the job of the compiler to generate a
CPU-specific executable. The same type of abstraction is made in
operating systems, but OS APIs now represent the primitive operations of
the machine, rather than an ISA. This allows a programmer to use
OS-level operations in their programs while still remaining portable
over a variety of different platforms.