Michael Abrash is a
technical writerA technical writer is a professional writer who designs, writes, creates, maintains, and updates technical documentation—including online help, user guides, white papers, design specifications, system manuals, and other documents...
specializing in optimization and 80x86
assembly languageAssembly languages are a family of low-level languages for programming computers, microprocessors, microcontrollers, and other integrated circuits. They implement a symbolic representation of the numeric machine codes and other constants needed to program a particular CPU architecture...
programmerA programmer is someone who writes computer software. The term computer programmer can refer to a specialist in one area of computer programming or to a generalist who writes code for many kinds of software. One who practices or professes a formal approach to programming may also be known as a...
s, a reputation cemented by his 1990 book
Zen of Assembly Language Volume 1: Knowledge. The original 8086 processor, the focus of the book, was several generations behind the state of the art by the time the book was published. Related issues were covered in his later book
Zen of Graphics Programming.
Michael Abrash is a
technical writerA technical writer is a professional writer who designs, writes, creates, maintains, and updates technical documentation—including online help, user guides, white papers, design specifications, system manuals, and other documents...
specializing in optimization and 80x86
assembly languageAssembly languages are a family of low-level languages for programming computers, microprocessors, microcontrollers, and other integrated circuits. They implement a symbolic representation of the numeric machine codes and other constants needed to program a particular CPU architecture...
programmerA programmer is someone who writes computer software. The term computer programmer can refer to a specialist in one area of computer programming or to a generalist who writes code for many kinds of software. One who practices or professes a formal approach to programming may also be known as a...
s, a reputation cemented by his 1990 book
Zen of Assembly Language Volume 1: Knowledge. The original 8086 processor, the focus of the book, was several generations behind the state of the art by the time the book was published. Related issues were covered in his later book
Zen of Graphics Programming. He frequently begins a technical discussion with an anecdote that draws parallels between a real-life experience he has had, and the article's subject matter. His prose encourages readers to think out-of-the-box and to approach solving technical problems in an innovative way.
Game programmer
Before getting into technical writing, Abrash was a
game programmerA game programmer is a software engineer who primarily develops video games or related software . Game programming has many specialized disciplines; practitioners of any may regard themselves as "game programmers"...
, having written his first commercial game in 1982,
Space StrikeSpace Strike is a 1982 computer game for the IBM PC family of computers, created by Michael Abrash and published by Datamost. Space Strike is essentially a clone of the popular Space Invaders video game of the late 1970s....
(unrelated to the massively multiplayer game of the same name) for the IBM
PCA personal computer is any general-purpose computer whose size, capabilities, and original sales price make it useful for individuals, and which is intended to be operated directly by an end user, with no intervening computer operator...
(under
DOSDOS, short for "Disk Operating System", is a shorthand term for several closely related operating systems that dominated the IBM PC compatible market between 1981 and 1995, or until about 2000 if one includes the partially DOS-based Microsoft Windows versions Windows 95, 98, and ME.Related systems...
). Other games he wrote were
Cosmic CrusaderCosmic Crusader is a 1982 computer game for the IBM PC family of computers, created by Michael Abrash and published by Funtastic....
(1982) and
Big Top (1983) for the same system. After working at
MicrosoftMicrosoft Corporation is a multinational computer technology corporation that develops, manufactures, licenses, and supports a wide range of software products for computing devices...
on graphics and assembly code for
Windows NT 3.1Windows NT 3.1 is the first release of Microsoft's Windows NT line of server and business desktop operating systems, and was released to manufacturing on 27 July 1993. The version number was chosen to match the one of Windows 3.1, the then-latest operating environment from Microsoft, on account of...
, he returned to the game industry in the mid-1990s to work on
Quake for
id Softwareid Software is an American video game development company from Mesquite, Texas. The company was founded in 1991 by four members of the computer company Softdisk: programmers John Carmack and John Romero, game designer Tom Hall, and artist Adrian Carmack...
. Some of the technology behind
Quake is documented in Abrash's
Graphics Programming Black Book. After
Quake was released, Abrash returned to Microsoft to work on natural language research, then moved to the
XboxThe Xbox is a video game console produced by Microsoft. It was Microsoft's first foray into the gaming console market, and competed with Sony's PlayStation 2, Sega's Dreamcast, and Nintendo's GameCube...
team, until 2001. In 2002, Abrash went to work for
RAD Game ToolsRAD Game Tools is privately-held company owned by Jeff Roberts and Mitch Soule based in Kirkland, Washington that develops video and computer game software technologies which are licensed primarily by video game companies. RAD Game Tools is somewhat unusual among middleware companies as they...
, where he co-wrote the Pixomatic
software rendererIn the context of rendering , software rendering refers to a rendering process that is unaided by any specialized hardware, such as a graphics card. The rendering takes place entirely in the CPU.-Introduction:...
, which emulates the functionality of a DirectX 7-level graphics card and is used as the software renderer in such games as
Unreal Tournament 2004Unreal Tournament 2004, also known as UT2K4 and UT2004, is a futuristic first-person shooter computer game developed by Epic Games and Digital Extremes...
.
Technical writer
In his 1994 book
Zen of Code Optimization: The Ultimate Guide to Writing Software That Pushes PCs to the Limit, Abrash presents principles and theory applicable to today's programmers. The key point of the book was that performance must always be measured, and the book included a measurement tool called the Zen Timer to check if theoretical code optimizations actually worked. The presentation of step-wise program refinement empirically demonstrated how algorithm re-design could improve performance up to a factor of 100. Assembly language re-coding, on the other hand, may only improve performance by a factor of 10. Abrash also showed how elusive performance improvement can be. Simply improving performance in one sub-routine would only expose bottlenecks in other routines and so on. Finally, he demonstrated processor-dependent assembly-based performance improvements by comparing assembly language optimizations across X86 family members.
Another lesson Abrash offered was how hard-earned performance rewards could disappear or even make the program execute slower than it would have without optimizations. Abrash was able to gain performance by carefully counting clock cycles of each
instructionIn computer science, an instruction is a single operation of a processor defined by an instruction set architecture. In a broader sense, an "instruction" may be any representation of an element of an executable program, such as a bytecode....
and ordering instructions in such a way that they used a minimal number of clock cycles. However, the number of clock cycles per instruction changed with new implementations of the x86 architecture and, as a result, his performance gains were lost from one generation to the next. For example, the bit-oriented "XOR %EAX, %EAX" instruction was the fastest way to set a register to zero in the early generations of the x86, but most code is generated by
compilerA compiler is a computer program that transforms source code written in a computer language into another computer language...
s and compilers rarely generated XOR instruction. So the IA designers, decided to move the frequently occurring compiler generated instructions up to the front of the combinational
decodeIn computer science and linguistics, parsing, or, more formally, syntactic analysis, is the process of analyzing a text, made of a sequence of tokens , to determine its grammatical structure with respect to a given formal grammar.Parsing is also an earlier term for the diagramming of sentences of...
logic making the
literalIn computer science, a value is a sequence of bits that is interpreted according to some data type. It is possible for the same sequence of bits to have different values, depending on the type used to interpret its meaning...
"MOVL $0, %EAX" instruction execute faster than the XOR instruction.
External links