100% found this document useful (1 vote)
31 views

x86 64 Assembly Language Programming with Ubuntu Ed Jorgensen pdf download

The document is a comprehensive guide to x86-64 assembly language programming using Ubuntu, authored by Ed Jorgensen. It covers various topics including architecture overview, data representation, program format, tool chain, debugging, and instruction set overview, along with exercises and suggested projects. The document is structured to help learners understand assembly language and its applications in programming.

Uploaded by

fereradoski
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
100% found this document useful (1 vote)
31 views

x86 64 Assembly Language Programming with Ubuntu Ed Jorgensen pdf download

The document is a comprehensive guide to x86-64 assembly language programming using Ubuntu, authored by Ed Jorgensen. It covers various topics including architecture overview, data representation, program format, tool chain, debugging, and instruction set overview, along with exercises and suggested projects. The document is structured to help learners understand assembly language and its applications in programming.

Uploaded by

fereradoski
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 43

x86 64 Assembly Language Programming with Ubuntu

Ed Jorgensen download

https://ebookmeta.com/product/x86-64-assembly-language-
programming-with-ubuntu-ed-jorgensen/

Download more ebook from https://ebookmeta.com


We believe these products will be a great fit for you. Click
the link to download now, or visit ebookmeta.com
to discover even more!

Modern X86 Assembly Language Programming: Covers X86


64-bit, AVX, AVX2, and AVX-512, 3rd Edition Daniel
Kusswurm

https://ebookmeta.com/product/modern-x86-assembly-language-
programming-covers-x86-64-bit-avx-avx2-and-avx-512-3rd-edition-
daniel-kusswurm/

Modern X86 Assembly Language Programming: Covers x86


64-bit, AVX, AVX2, and AVX-512 2nd Edition Daniel
Kusswurm

https://ebookmeta.com/product/modern-x86-assembly-language-
programming-covers-x86-64-bit-avx-avx2-and-avx-512-2nd-edition-
daniel-kusswurm/

Assembly Language for x86 Processors 6th edition Kip


Irvine

https://ebookmeta.com/product/assembly-language-
for-x86-processors-6th-edition-kip-irvine/

Axonal Transport Alessio Vagnoni

https://ebookmeta.com/product/axonal-transport-alessio-vagnoni/
Pick Your Poison 1st Edition Emma Nichole

https://ebookmeta.com/product/pick-your-poison-1st-edition-emma-
nichole/

M A Entrance Exams in English Literature Precise


Answers Accurate Sources and Online Exams 1st Edition
Mahdi Javidshad Amirhossein Nemati

https://ebookmeta.com/product/m-a-entrance-exams-in-english-
literature-precise-answers-accurate-sources-and-online-exams-1st-
edition-mahdi-javidshad-amirhossein-nemati/

Introduction to Electrochemical Science and Engineering


2nd Edition Lvov Serguei N

https://ebookmeta.com/product/introduction-to-electrochemical-
science-and-engineering-2nd-edition-lvov-serguei-n/

Cambridge International AS A Level Chemistry Study and


Revision Guide Third Edition David Bevan

https://ebookmeta.com/product/cambridge-international-as-a-level-
chemistry-study-and-revision-guide-third-edition-david-bevan/

Street Culture 50 Years of Subculture Style 1st Edition


Gavin Baddeley

https://ebookmeta.com/product/street-culture-50-years-of-
subculture-style-1st-edition-gavin-baddeley/
Evangelicals on the Canterbury Trail Why Evangelicals
Are Attracted to the Liturgical Church Revised Edition
Robert Webber Lester Ruth

https://ebookmeta.com/product/evangelicals-on-the-canterbury-
trail-why-evangelicals-are-attracted-to-the-liturgical-church-
revised-edition-robert-webber-lester-ruth/
x86-64
Assembly Language
Programming
with
Ubuntu

Ed Jorgensen, Ph.D.
Version 1.1.40
January 2020
Cover image:
Top view of an Intel central processing unit Core i7 Skylake type core,
model 6700K, released in June 2015.
Source: Eric Gaba, https://commons.wikimedia.org/wiki/File:
Intel_CPU_Core_i7_6700K_Skylake_top.jpg

Cover background:
By Benjamint444 (Own work)
Source: http://commons.wikimedia.org/wiki/File%3ASwirly_belt444.jpg

Copyright © 2015, 2016, 2017, 2018, 2019 by Ed Jorgensen

You are free:


To Share — to copy, distribute and transmit the work
To Remix — to adapt the work

Under the following conditions:


Attribution — you must attribute the work in the manner specified by the author
or licensor (but not in any way that suggests that they endorse you or your use of
the work).
Noncommercial — you may not use this work for commercial purposes.
Share Alike — if you alter, transform, or build upon this work, you may
distribute the resulting work only under the same or similar license to this one.
Table of Contents

Table of Contents
1.0 Introduction...........................................................................................................1
1.1 Prerequisites........................................................................................................1
1.2 What is Assembly Language...............................................................................2
1.3 Why Learn Assembly Language.........................................................................2
1.3.1 Gain a Better Understanding of Architecture Issues...................................3
1.3.2 Understanding the Tool Chain.....................................................................3
1.3.3 Improve Algorithm Development Skills.....................................................3
1.3.4 Improve Understanding of Functions/Procedures.......................................3
1.3.5 Gain an Understanding of I/O Buffering.....................................................4
1.3.6 Understand Compiler Scope........................................................................4
1.3.7 Introduction Multi-processing Concepts.....................................................4
1.3.8 Introduction Interrupt Processing Concepts................................................4
1.4 Additional References.........................................................................................4
1.4.1 Ubuntu References......................................................................................5
1.4.2 BASH Command Line References..............................................................5
1.4.3 Architecture References..............................................................................5
1.4.4 Tool Chain References................................................................................5
1.4.4.1 YASM References...............................................................................6
1.4.4.2 DDD Debugger References.................................................................6
2.0 Architecture Overview.........................................................................................7
2.1 Architecture Overview........................................................................................7
2.2 Data Storage Sizes...............................................................................................8
2.3 Central Processing Unit.......................................................................................9
2.3.1 CPU Registers...........................................................................................10
2.3.1.1 General Purpose Registers (GPRs)....................................................10
2.3.1.2 Stack Pointer Register (RSP).............................................................12
2.3.1.3 Base Pointer Register (RBP)..............................................................12
2.3.1.4 Instruction Pointer Register (RIP).....................................................12
2.3.1.5 Flag Register (rFlags)........................................................................12
2.3.1.6 XMM Registers..................................................................................13
2.3.2 Cache Memory..........................................................................................14
2.4 Main Memory....................................................................................................15
2.5 Memory Layout.................................................................................................17

Page iii
Table of Contents

2.6 Memory Hierarchy............................................................................................17


2.7 Exercises............................................................................................................19
2.7.1 Quiz Questions..........................................................................................19
3.0 Data Representation...........................................................................................21
3.1 Integer Representation.......................................................................................21
3.1.1 Two's Complement....................................................................................23
3.1.2 Byte Example............................................................................................23
3.1.3 Word Example...........................................................................................24
3.2 Unsigned and Signed Addition.........................................................................24
3.3 Floating-point Representation...........................................................................24
3.3.1 IEEE 32-bit Representation.......................................................................25
3.3.1.1 IEEE 32-bit Representation Examples..............................................26
3.3.1.1.1 Example → -7.7510.....................................................................26
3.3.1.1.2 Example → -0.12510...................................................................26
3.3.1.1.3 Example → 4144000016.............................................................27
3.3.2 IEEE 64-bit Representation.......................................................................27
3.3.3 Not a Number (NaN).................................................................................27
3.4 Characters and Strings.......................................................................................27
3.4.1 Character Representation...........................................................................28
3.4.1.1 American Standard Code for Information Interchange.....................28
3.4.1.2 Unicode..............................................................................................29
3.4.2 String Representation................................................................................29
3.5 Exercises............................................................................................................29
3.5.1 Quiz Questions..........................................................................................30
4.0 Program Format.................................................................................................33
4.1 Comments..........................................................................................................33
4.2 Numeric Values.................................................................................................33
4.3 Defining Constants............................................................................................34
4.4 Data Section......................................................................................................34
4.5 BSS Section.......................................................................................................35
4.6 Text Section.......................................................................................................36
4.7 Example Program..............................................................................................37
4.8 Exercises............................................................................................................39
4.8.1 Quiz Questions..........................................................................................39
5.0 Tool Chain...........................................................................................................41
5.1 Assemble/Link/Load Overview........................................................................41
5.2 Assembler..........................................................................................................43

Page iv
Table of Contents

5.2.1 Assemble Commands................................................................................43


5.2.2 List File......................................................................................................43
5.2.3 Two-Pass Assembler.................................................................................45
5.2.3.1 First Pass............................................................................................46
5.2.3.2 Second Pass........................................................................................46
5.2.4 Assembler Directives.................................................................................47
5.3 Linker................................................................................................................47
5.3.1 Linking Multiple Files...............................................................................48
5.3.2 Linking Process.........................................................................................48
5.3.3 Dynamic Linking.......................................................................................49
5.4 Assemble/Link Script........................................................................................50
5.5 Loader................................................................................................................51
5.6 Debugger...........................................................................................................52
5.7 Exercises............................................................................................................52
5.7.1 Quiz Questions..........................................................................................52
6.0 DDD Debugger....................................................................................................55
6.1 Starting DDD.....................................................................................................55
6.1.1 DDD Configuration Settings.....................................................................57
6.2 Program Execution with DDD..........................................................................57
6.2.1 Setting Breakpoints...................................................................................57
6.2.2 Executing Programs...................................................................................58
6.2.2.1 Run / Continue...................................................................................60
6.2.2.2 Next / Step.........................................................................................60
6.2.3 Displaying Register Contents....................................................................60
6.2.4 DDD/GDB Commands Summary.............................................................62
6.2.4.1 DDD/GDB Commands, Examples....................................................63
6.2.5 Displaying Stack Contents........................................................................65
6.2.6 Debugger Commands File (interactive)....................................................65
6.2.6.1 Debugger Commands File (non-interactive).....................................66
6.2.6.2 Debugger Commands File (non-interactive).....................................66
6.3 Exercises............................................................................................................67
6.3.1 Quiz Questions..........................................................................................67
6.3.2 Suggested Projects.....................................................................................68
7.0 Instruction Set Overview....................................................................................69
7.1 Notational Conventions.....................................................................................69
7.1.1 Operand Notation......................................................................................70
7.2 Data Movement.................................................................................................71

Page v
Table of Contents

7.3 Addresses and Values........................................................................................73


7.4 Conversion Instructions.....................................................................................74
7.4.1 Narrowing Conversions.............................................................................74
7.4.2 Widening Conversions..............................................................................74
7.4.2.1 Unsigned Conversions.......................................................................74
7.4.2.2 Signed Conversions...........................................................................76
7.5 Integer Arithmetic Instructions.........................................................................78
7.5.1 Addition.....................................................................................................78
7.5.1.1 Addition with Carry...........................................................................81
7.5.2 Subtraction.................................................................................................83
7.5.3 Integer Multiplication................................................................................87
7.5.3.1 Unsigned Multiplication....................................................................87
7.5.3.2 Signed Multiplication........................................................................91
7.5.4 Integer Division.........................................................................................94
7.6 Logical Instructions.........................................................................................101
7.6.1 Logical Operations..................................................................................102
7.6.2 Shift Operations.......................................................................................103
7.6.2.1 Logical Shift....................................................................................103
7.6.2.2 Arithmetic Shift...............................................................................105
7.6.3 Rotate Operations....................................................................................107
7.7 Control Instructions.........................................................................................108
7.7.1 Labels......................................................................................................109
7.7.2 Unconditional Control Instructions.........................................................109
7.7.3 Conditional Control Instructions.............................................................109
7.7.3.1 Jump Out of Range..........................................................................112
7.7.4 Iteration....................................................................................................115
7.8 Example Program, Sum of Squares.................................................................117
7.9 Exercises..........................................................................................................118
7.9.1 Quiz Questions........................................................................................118
7.9.2 Suggested Projects...................................................................................122
8.0 Addressing Modes.............................................................................................125
8.1 Addresses and Values......................................................................................125
8.1.1 Register Mode Addressing......................................................................126
8.1.2 Immediate Mode Addressing..................................................................126
8.1.3 Memory Mode Addressing......................................................................126
8.2 Example Program, List Summation................................................................129
8.3 Example Program, Pyramid Areas and Volumes............................................131
8.4 Exercises..........................................................................................................136

Page vi
Table of Contents

8.4.1 Quiz Questions........................................................................................136


8.4.2 Suggested Projects...................................................................................138
9.0 Process Stack.....................................................................................................141
9.1 Stack Example.................................................................................................141
9.2 Stack Instructions............................................................................................142
9.3 Stack Implementation......................................................................................143
9.3.1 Stack Layout............................................................................................143
9.3.2 Stack Operations......................................................................................145
9.4 Stack Example.................................................................................................147
9.5 Exercises..........................................................................................................148
9.5.1 Quiz Questions........................................................................................148
9.5.2 Suggested Projects...................................................................................149
10.0 Program Development....................................................................................151
10.1 Understand the Problem................................................................................151
10.2 Create the Algorithm.....................................................................................152
10.3 Implement the Program.................................................................................154
10.4 Test/Debug the Program................................................................................156
10.5 Error Terminology.........................................................................................157
10.5.1 Assembler Error.....................................................................................157
10.5.2 Run-time Error.......................................................................................157
10.5.3 Logic Error............................................................................................157
10.6 Exercises........................................................................................................158
10.6.1 Quiz Questions......................................................................................158
10.6.2 Suggested Projects.................................................................................158
11.0 Macros..............................................................................................................161
11.1 Single-Line Macros.......................................................................................161
11.2 Multi-Line Macros........................................................................................162
11.2.1 Macro Definition...................................................................................162
11.2.2 Using a Macro.......................................................................................162
11.3 Macro Example.............................................................................................163
11.4 Debugging Macros........................................................................................165
11.5 Exercises........................................................................................................165
11.5.1 Quiz Questions......................................................................................165
11.5.2 Suggested Projects.................................................................................166
12.0 Functions..........................................................................................................167
12.1 Updated Linking Instructions........................................................................167

Page vii
Table of Contents

12.2 Debugger Commands....................................................................................168


12.2.1 Debugger Command, next.....................................................................168
12.2.2 Debugger Command, step.....................................................................168
12.3 Stack Dynamic Local Variables....................................................................168
12.4 Function Declaration.....................................................................................169
12.5 Standard Calling Convention........................................................................169
12.6 Linkage..........................................................................................................170
12.7 Argument Transmission................................................................................171
12.8 Calling Convention.......................................................................................171
12.8.1 Parameter Passing..................................................................................172
12.8.2 Register Usage.......................................................................................173
12.8.3 Call Frame.............................................................................................174
12.8.3.1 Red Zone........................................................................................176
12.9 Example, Statistical Function 1 (leaf)...........................................................176
12.9.1 Caller.....................................................................................................177
12.9.2 Callee.....................................................................................................177
12.10 Example, Statistical Function2 (non-leaf)...................................................178
12.10.1 Caller...................................................................................................179
12.10.2 Callee...................................................................................................180
12.11 Stack-Based Local Variables......................................................................183
12.12 Summary.....................................................................................................186
12.13 Exercises......................................................................................................187
12.13.1 Quiz Questions....................................................................................187
12.13.2 Suggested Projects...............................................................................188
13.0 System Services...............................................................................................191
13.1 Calling System Services................................................................................191
13.2 Newline Character.........................................................................................192
13.3 Console Output..............................................................................................193
13.3.1 Example, Console Output......................................................................194
13.4 Console Input................................................................................................197
13.4.1 Example, Console Input........................................................................198
13.5 File Open Operations....................................................................................202
13.5.1 File Open...............................................................................................202
13.5.2 File Open/Create....................................................................................203
13.6 File Read.......................................................................................................204
13.7 File Write.......................................................................................................205
13.8 File Operations Examples.............................................................................205
13.8.1 Example, File Write...............................................................................205

Page viii
Table of Contents

13.8.2 Example, File Read...............................................................................211


13.9 Exercises........................................................................................................216
13.9.1 Quiz Questions......................................................................................216
13.9.2 Suggested Projects.................................................................................217
14.0 Multiple Source Files......................................................................................219
14.1 Extern Statement...........................................................................................219
14.2 Example, Sum and Average..........................................................................220
14.2.1 Assembly Main......................................................................................220
14.2.2 Function Source.....................................................................................222
14.2.3 Assemble and Link................................................................................223
14.3 Interfacing with a High-Level Language......................................................224
14.3.1 Example, C++ Main / Assembly Function............................................224
14.3.2 Compile, Assemble, and Link...............................................................225
14.4 Exercises........................................................................................................226
14.4.1 Quiz Questions......................................................................................226
14.4.2 Suggested Projects.................................................................................227
15.0 Stack Buffer Overflow....................................................................................229
15.1 Understanding a Stack Buffer Overflow.......................................................230
15.2 Code to Inject................................................................................................231
15.3 Code Injection...............................................................................................234
15.4 Code Injection Protections............................................................................235
15.4.1 Data Stack Smashing Protector (or Canaries).......................................235
15.4.2 Data Execution Prevention....................................................................236
15.4.3 Data Address Space Layout Randomization.........................................236
15.5 Exercises........................................................................................................236
15.5.1 Quiz Questions......................................................................................236
15.5.2 Suggested Projects.................................................................................237
16.0 Command Line Arguments............................................................................239
16.1 Parsing Command Line Arguments..............................................................239
16.2 High-Level Language Example....................................................................240
16.3 Argument Count and Argument Vector Table..............................................241
16.4 Assembly Language Example.......................................................................242
16.5 Exercises........................................................................................................246
16.5.1 Quiz Questions......................................................................................246
16.5.2 Suggested Projects.................................................................................246
17.0 Input/Output Buffering..................................................................................249

Page ix
Table of Contents

17.1 Why Buffer?..................................................................................................249


17.2 Buffering Algorithm......................................................................................251
17.3 Exercises........................................................................................................254
17.3.1 Quiz Questions......................................................................................254
17.3.2 Suggested Projects.................................................................................255
18.0 Floating-Point Instructions............................................................................257
18.1 Floating-Point Values....................................................................................257
18.2 Floating-Point Registers................................................................................258
18.3 Data Movement.............................................................................................258
18.4 Integer / Floating-Point Conversion Instructions..........................................260
18.5 Floating-Point Arithmetic Instructions..........................................................262
18.5.1 Floating-Point Addition.........................................................................262
18.5.2 Floating-Point Subtraction.....................................................................263
18.5.3 Floating-Point Multiplication................................................................265
18.5.4 Floating-Point Division.........................................................................267
18.5.5 Floating-Point Square Root...................................................................269
18.6 Floating-Point Control Instructions...............................................................271
18.6.1 Floating-Point Comparison...................................................................271
18.7 Floating-Point Calling Conventions..............................................................274
18.8 Example Program, Sum and Average...........................................................275
18.9 Example Program, Absolute Value...............................................................276
18.10 Exercises......................................................................................................277
18.10.1 Quiz Questions....................................................................................278
18.10.2 Suggested Projects...............................................................................278
19.0 Parallel Processing..........................................................................................279
19.1 Distributed Computing..................................................................................280
19.2 Multiprocessing.............................................................................................280
19.2.1 POSIX Threads......................................................................................281
19.2.2 Race Conditions.....................................................................................282
19.3 Exercises........................................................................................................285
19.3.1 Quiz Questions......................................................................................285
19.3.2 Suggested Projects.................................................................................286
20.0 Interrupts.........................................................................................................287
20.1 Multi-user Operating System........................................................................287
20.1.1 Interrupt Classification..........................................................................288
20.1.2 Interrupt Timing....................................................................................288
20.1.2.1 Asynchronous Interrupts................................................................288

Page x
Table of Contents

20.1.2.2 Synchronous Interrupts..................................................................288


20.1.3 Interrupt Categories...............................................................................289
20.1.3.1 Hardware Interrupt.........................................................................289
20.1.3.1.1 Exceptions..............................................................................289
20.1.3.2 Software Interrupts........................................................................290
20.2 Interrupt Types and Levels............................................................................290
20.2.1 Interrupt Types......................................................................................290
20.2.2 Privilege Levels.....................................................................................290
20.3 Interrupt Processing.......................................................................................292
20.3.1 Interrupt Service Routine (ISR).............................................................292
20.3.2 Processing Steps....................................................................................292
20.3.2.1 Suspension.....................................................................................292
20.3.2.2 Obtaining ISR Address..................................................................292
20.3.2.3 Jump to ISR...................................................................................293
20.3.2.4 Suspension Execute ISR................................................................293
20.3.2.5 Resumption....................................................................................294
20.4 Suspension Interrupt Processing Summary...................................................294
20.5 Exercises........................................................................................................295
20.5.1 Quiz Questions......................................................................................295
20.5.2 Suggested Projects.................................................................................296
21.0 Appendix A – ASCII Table............................................................................297
22.0 Appendix B – Instruction Set Summary.......................................................299
22.1 Notation.........................................................................................................299
22.2 Data Movement Instructions.........................................................................300
22.3 Data Conversion instructions........................................................................300
22.4 Integer Arithmetic Instructions.....................................................................301
22.5 Logical, Shift, and Rotate Instructions..........................................................303
22.6 Control Instructions.......................................................................................305
22.7 Stack Instructions..........................................................................................307
22.8 Function Instructions.....................................................................................307
22.9 Floating-Point Data Movement Instructions.................................................307
22.10 Floating-Point Data Conversion Instructions..............................................308
22.11 Floating-Point Arithmetic Instructions........................................................309
22.12 Floating-Point Control Instructions.............................................................313
23.0 Appendix C – System Services.......................................................................315
23.1 Return Codes.................................................................................................315
23.2 Basic System Services...................................................................................315

Page xi
Table of Contents

23.3 File Modes.....................................................................................................317


23.4 Error Codes...................................................................................................318
24.0 Appendix D – Quiz Question Answers..........................................................321
24.1 Quiz Question Answers, Chapter 1...............................................................321
24.2 Quiz Question Answers, Chapter 2...............................................................321
24.3 Quiz Question Answers, Chapter 3...............................................................322
24.4 Quiz Question Answers, Chapter 4...............................................................324
24.5 Quiz Question Answers, Chapter 5...............................................................325
24.6 Quiz Question Answers, Chapter 6...............................................................326
24.7 Quiz Question Answers, Chapter 7...............................................................327
24.8 Quiz Question Answers, Chapter 8...............................................................330
24.9 Quiz Question Answers, Chapter 9...............................................................331
24.10 Quiz Question Answers, Chapter 10...........................................................331
24.11 Quiz Question Answers, Chapter 11...........................................................332
24.12 Quiz Question Answers, Chapter 12...........................................................332
24.13 Quiz Question Answers, Chapter 13...........................................................333
24.14 Quiz Question Answers, Chapter 14...........................................................333
24.15 Quiz Question Answers, Chapter 15...........................................................334
24.16 Quiz Question Answers, Chapter 16...........................................................334
24.17 Quiz Question Answers, Chapter 17...........................................................335
24.18 Quiz Question Answers, Chapter 18...........................................................335
24.19 Quiz Question Answers, Chapter 19...........................................................336
24.20 Quiz Question Answers, Chapter 20...........................................................336
25.0 Alphabetical Index..........................................................................................339

Page xii
Table of Contents

Illustration Index
Illustration 1: Computer Architecture................................................................................7
Illustration 2: CPU Block Diagram..................................................................................15
Illustration 3: Little-Endian Data Layout.........................................................................16
Illustration 4: General Memory Layout...........................................................................17
Illustration 5: Memory Hierarchy....................................................................................18
Illustration 6: Overview: Assemble, Link, Load.............................................................42
Illustration 7: Little-Endian, Multiple Variable Data Layout..........................................44
Illustration 8: Linking Multiple Files...............................................................................49
Illustration 9: Initial Debugger Screen.............................................................................56
Illustration 10: Debugger Screen with Breakpoint Set....................................................58
Illustration 11: Debugger Screen with Green Arrow.......................................................59
Illustration 12: DDD Command Bar................................................................................60
Illustration 13: Register Window.....................................................................................61
Illustration 14: MOV Instruction Overview....................................................................71
Illustration 15: Integer Multiplication Overview.............................................................88
Illustration 16: Integer Division Overview......................................................................96
Illustration 17: Logical Operations................................................................................102
Illustration 18: Logical Shift Overview.........................................................................104
Illustration 19: Logical Shift Operations.......................................................................104
Illustration 20: Arithmetic Left Shift.............................................................................106
Illustration 21: Arithmetic Right Shift...........................................................................106
Illustration 22: Process Memory Layout........................................................................144
Illustration 23: Process Memory Layout Example........................................................145
Illustration 24: Stack Frame Layout..............................................................................175
Illustration 25: Stack Frame Layout with Red Zone......................................................176
Illustration 26: Stack Call Frame Example....................................................................230
Illustration 27: Stack Call Frame Corruption.................................................................235
Illustration 28: Argument Vector Layout......................................................................242
Illustration 29: Privilege Levels.....................................................................................291
Illustration 30: Interrupt Processing Overview..............................................................294

Page xiii
Table of Contents

Page xiv
If you give someone a program, you will Chapter
frustrate them for a day; if you teach them 1
to program, you will frustrate them for a
lifetime.

1.0 Introduction
The purpose of this text is to provide a reference for University level assembly language
and systems programming courses. Specifically, this text addresses the x86-64 1
instruction set for the popular x86-64 class of processors using the Ubuntu 64-bit
Operating System (OS). While the provided code and various examples should work
under any Linux-based 64-bit OS, they have only been tested under Ubuntu 14.04 LTS
(64-bit).
The x86-64 is a Complex Instruction Set Computing (CISC2) CPU design. This refers
to the internal processor design philosophy. CISC processors typically include a wide
variety of instructions (sometimes overlapping), varying instructions sizes, and a wide
range of addressing modes. The term was retroactively coined in contrast to Reduced
Instruction Set Computer (RISC3).

1.1 Prerequisites
It must be noted that the text is not geared toward learning how to program. It is
assumed that the reader has already become proficient in a high-level programming
language. Specifically, the text is generally geared toward a compiled, C-based high-
level language such as C, C++, or Java. Many of the explanations and examples assume
the reader is already familiar with programming concepts such as declarations,
arithmetic operations, control structures, iteration, function calls, functions, indirection
(i.e., pointers), and variable scoping issues.
Additionally, the reader should be comfortable using a Linux-based operating system
including using the command line. If the reader is new to Linux, the Additional
References section has links to some useful documentation.

1 For more information, refer to: http://en.wikipedia.org/wiki/X86-64


2 For more information, refer to: http://en.wikipedia.org/wiki/Complex_instruction_set_computing
3 For more information, refer to: http://en.wikipedia.org/wiki/Reduced_instruction_set_computing

Page 1
Other documents randomly have
different content
*D-39 Telegrams relating to activities
against partisans in Italy. (GB 275) VI 1023
*D-569 File of circulars from Reichsfuehrer
SS, the OKW, Inspector of
Concentration Camps, Chief of
Security Police and SD, dating from
29 October 1941 through 22
February 1944, relative to
procedure in cases of unnatural
death of Soviet PW, execution of
Soviet PW, etc. (GB 277) VII 74
D-730 Statement of PW Walther Grosche,
11 December 1945. (GB 279) VII 177
*D-731 Statement of PW Ernst Walde, 13
December 1945. (GB 278) VII 183
*D-735 Memorandum of conference
between German Foreign Minister
and Count Ciano in presence of
Keitel and Marshal Cavallero, 19
December 1942. (GB 295) VII 190
*D-763 Circular of OKW, 18 August 1944,
regarding penal jurisdiction of non-
German civilians in Occupied
Territories. (GB 300) VII 222
*D-764 Circular of OKW, 18 August 1944,
concerning combatting of
“terrorists” and “saboteurs” in
Occupied Territories and
jurisdiction relative thereto. (GB
299) VII 223
*D-765 Directives of OKW, 2 September
1944, regarding offenses by non-
German civilians in Occupied
Territories. (GB 302) VII 225
*D-766 Circular of OKW, 4 September
1944, regarding offenses by non-
German civilians in Occupied
Territories. (GB 301) VII 226
*D-767 Memorandum, 13 September
1944, on offenses by non-German
civilians in Occupied Territories.
(GB 303) VII 228
*D-769 Telegram signed by Gen.
Christiansen, 21 September 1940,
relative to application of capital
punishment in connection with
Railway strike in Holland. (GB 304) VII 229
D-770 Circular, 24 September 1944, on
offenses of non-German civilians in
Occupied Territories. (GB 305) VII 229
*D-774 Directive of Chief of OKW to
German Foreign Office at Salzburg,
on treatment of Allied “Terrorist”-
flyers 14 June 1944. (GB 307) VII 231
*D-775 Draft of directive, 14 June 1944,
from OKW to Supreme
Commander of “Luftwaffe”,
regarding treatment of Allied
“Terrorist”-flyers. (GB 308) VII 232
*D-776 Draft of directive of Chief of OKW,
15 June 1944, to German Foreign
Office at Salzburg, concerning
treatment of Allied “Terrorist”-
flyers. (GB 309) VII 233
*D-777 Draft of directive, 15 June 1944, VII 234
from OKW to Supreme
Commander of “Luftwaffe”
concerning treatment of Allied
“Terrorist”-flyers. (GB 310)
*D-779 Letter from Reichsmarshal to Chief
of OKW, 19 August 1944,
regarding treatment of Allied
“Terrorist”-flyers. (GB 312) VII 235
*D-780 Draft of communication from
Ambassador Ritter, Salzburg, to
Chief of OKW, 20 June 1944, on
treatment of Allied “Terrorist”-
flyers. (GB 313) VII 236
*D-781 Note of OKW to Supreme
Commander of “Luftwaffe”, 23
June 1944, regarding treatment of
Allied “Terrorist”-flyers. (GB 314) VII 239
*D-782 Note from German Foreign Office,
Salzburg, 25 June 1944, to OKW.
(GB 315) VII 239
D-783 Note of a telephone
communication, 26 June 1944,
with regard to treatment of
“Terrorist”-aviators. (GB 316) VII 240
*D-784 Note from Operation Staff of OKW
signed Warlimont, 30 June 1944,
concerning treatment of Allied
“Terrorist”-flyers. (GB 317) VII 240
*D-785 Note from OKW to Supreme
Commander of “Luftwaffe”, 4 July
1944, concerning “Terror”-flyers.
(GB 318) VII 241
*D-786 Note, 5 July 1944, on “Terror”-
flyers. (GB 319) VII 242
*EC-177 Minutes of second session of VII 328
Working Committee of the Reich
Defense held on 26 April 1933.
(USA 390)
*EC-194 Secret memorandum of Keitel
concerning use of prisoners of war
in the war industry, 31 October
1941. (USA 214) VII 336
*EC-286 Correspondence between Schacht
and Goering, March-April 1937,
concerning price control. (USA
833) VII 380
EC-338 Memorandum of 15 September
1941 from Canaris to Keitel
concerning an OKW Order
regulating the treatment of Soviet
prisoners of war. VII 411
*EC-406 Minutes of Eleventh Meeting of
Reichs Defense Council, 6
December 1935. (USA 772) VII 455
*EC-407 Minutes of Twelfth Meeting of
Reichs Defense Council, 14 May
1936. (GB 247) VII 462
L-3 Contents of Hitler’s talk to
Supreme Commander and
Commanding Generals,
Obersalzberg, 22 August 1939.
(USA 28) (Referred to but not
offered in evidence.) VII 752
*L-52 Memorandum and Directives for
conduct of war in the West, 9
October 1939. (USA 540) VII 800
*L-79 Minutes of conference, 23 May
1939, “Indoctrination on the
political situation and future aims”.
(USA 27) VII 847
*L-90 Fuehrer decree, February 1942,
concerning prosecution of offenses
in Occupied Territory; “First
Ordinance” signed by Keitel for
execution of the directive;
memorandum of 12 December
1941, signed by Keitel. (USA 503) VII 871
*L-158 Circular letter from SIPO and SD
Commander of Radom District, 28
March 1944, concerning measures
to be taken against escaped
officers and non-commissioned
officer PWs. (USA 514) VII 906
L-179 Letter from RSHA to police
officials, 5 November 1942,
concerning criminal procedure
against Poles and members of
Eastern people. VII 976
*L-211 OKW circular entitled Direction of
War as Problem of Organization,
19 April 1938. (GB 161) VII 1043
*L-221 Bormann report on conference of
16 July 1941, concerning
treatment of Eastern populations
and territories. (USA 317) VII 1086
*R-100 Minutes of instructions given by
Hitler to General von Brauchitsch
on 25 March 1939. (USA 121) VIII 83
UK-20 Keitel Order on treatment of
supporters of De Gaulle who fight
for Russians, 26 May 1943. (GB
163) VIII 538
*UK-57 Keitel directives, 4 January 1944 VIII 539
and 21 April 1944, concerning
counteraction to Kharkov show
trial. (GB 164)
*UK-66 Report of British War Crimes
Section of Allied Force
Headquarters on German reprisals
for partisan activity in Italy. (GB
274) VIII 572
Affidavit A Affidavit of Erwin Lahousen, 21
January 1946, substantially the
same as his testimony on direct
examination before the
International Military Tribunal at
Nurnberg 30 November and 1
December 1945. VIII 587
Affidavit I Affidavit of Leopold Buerkner, 22
January 1946. VIII 647
Statement III The Origin of the Directives of the
Supreme Command of the Armed
Forces, by Wilhelm Keitel,
Nurnberg, 15 September 1945. VIII 669
Statement IV The Position and Powers of the
Chief of the OKW, by Wilhelm
Keitel, Nurnberg, 9 October 1945. VIII 672
Statement V Notes Concerning Actions of
German Armed Forces During the
War and in Occupied Territory, by
Wilhelm Keitel, Nurnberg, 19
October 1945. VIII 678
Statement VI The Relationship Between Canaris
and Keitel, by Erwin Lahousen,
Nurnberg, 23 October 1945. VIII 682
Statement IX My Relationship to Adolf Hitler and
to the Party, by Erich Raeder,
Moscow, fall 1945. VIII 707
**Chart No. 7 Organization of the Wehrmacht
1938-1945. (Enlargement
displayed to Tribunal.) VIII 776

5. ALFRED JODL

A. POSITIONS HELD BY JODL.

Operations Department of the Army (Heer), 1932-35.


Chief of the National Defense Section in the High Command
of the Armed Forces (Abteilung Landesverteidigung im OKW),
1935-Oct. 1938.
Artillery Commander (“Artillerie Kommandeur”) of the 44th
Division. Vienna and Brno, Oct 1938-27 Aug. 1939.
Chief of Operation Staff of the High Command of the Armed
Forces (Chef des Wehrmachtsfuhrungstabes in
Oberkommando der Wehrmacht), August 1939-1945.

Dates of Promotion:

1932—Major and Oberstleutnant


1936—Oberst
1939—Generalmajor
1940—General der Artillerie
1944—Generaloberst (2865-PS).

B. FUNCTIONS OF JODL’S POSITIONS.


Jodl’s most important office was that of Chief of the Operations
Staff (Wehrmachtsfuehrungstab) in OKW. In this capacity he was
directly subordinate to Keitel and equal in status to other
departmental chiefs in OKW. However, insofar as the planning and
conduct of military affairs are concerned, Jodl and his staff were
more influential than the other departments.
The OKW Operations Staff was also divided into sections. Of
these the most important was the “National Defense” section, of
which Warlimont was chief. He was primarily concerned with the
development of strategic questions. From 1941 onwards Warlimont,
though charged with the same duties, was known as Deputy Chief of
the OKW Operations Staff. (3707-PS)
Jodl drafted many directives for Hitler to sign, for the preparation
of military operations and plans of deployment, and for the possible
initiation and commencement of military measures relating to
matters of organization, operations, or “war-economics.” While in a
theater of operations, Jodl would report twice daily to Hitler about
operations, and then prepare the Fuehrer directives. There was
direct contact between Hitler and Jodl, though Keitel was kept
informed of what passed between them.
In addition to certain ministerial functions, the OKW was Hitler’s
military staff. Its most important duty was the development of
strategic and operational plans. Such plans were worked out by the
OKW Operations Staff in broad outline, and then in more detail by
the Commanders and Chiefs of Staffs of the Army, Navy, and Air
Force. After Hitler had approved the plans they were transmitted by
the OKW to the appropriate military authorities (3705-PS; 3702-PS;
3707-PS).

C. JODL’S PART IN THE CONSPIRACY TO COMMIT CRIMES AGAINST


PEACE.
Jodl’s loyalty to the Nazi party doctrine is evident in a speech he
delivered on 7 November 1943. He spoke of the National Socialist
Movement and its struggle for internal power as the preparation for
liberation from the Treaty of Versailles. (L-172) He also stated, in a
speech on the occasion of the attempted assassination of Hitler, that
his aims had been in general agreement with the aims of the party.
(1808-PS)
At the sixth meeting of the Working Committee of the Reich
Defense Council on 7 February 1934 Jodl pointed out that the
practical execution of the preparations for mobilization, which had
been ordered by the Army and the highest Reich authorities, were
making a considerable enlargement of personnel necessary. He
suggested, however, that this enlargement of personnel ought not to
result in “the disquieting of foreign countries through conspicuous
mobilization measures.” (EC-405)
In the presence of Jodl, Generalmajor Keitel pointed out at the
eleventh meeting that the mobilization year was to begin on 1 April
and to end on 31 March of the following year. A “Mobilization Book
for Civilian Agencies” was to be issued for the first time on 1 April
1936. Keitel said that this day, to the extent possible, should find the
nation ready and prepared. He declared that, according to the will of
the Fuehrer, the economic management of the country should put
the enhancement of military capacity deliberately above all other
national tasks. It was the function of all members of the Reich
Defense Council, he emphasized, to use all available resources
economically and to ask for only such funds and raw materials that
were absolutely and exclusively needed for the defense of the Reich.
Colonel Jodl said that the Mobilization Book for the Civilian
Departments constituted the unified basis for the carrying out of
mobilization outside of the Army (EC-406).

D. JODL’S PART IN PLANNING AND LAUNCHING WARS OF


AGGRESSION.
(See “F,” 1 through 7, in Section 4 of this Chapter on Keitel, where the joint
responsibility of Keitel and Jodl for these activities is discussed.)

E. JODL’S PART IN THE CONSPIRACY TO COMMIT WAR CRIMES


AND CRIMES AGAINST HUMANITY.
(1) Murder and ill treatment of civilian population in occupied,
territories and on the high seas. Jodl ordered the forcible evacuation
of all persons in a northern district of Norway, and the burning of all
their dwellings. This was to be done so that the inhabitants of that
area could not help the Russians (754-PS). Shortly thereafter an
evacuation took place in Finnmark County in northern Norway, in the
course of which 30,000 houses were damaged. (1800-PS)
Jodl was aware that in 1942 there were continual arrests in
Belgrade, and that from fifteen to thirty followers of Mihalovic were
shot every day. (1383-PS)
Jodl initialled an order signed for Hitler by Keitel, which provided
that enemy civilians guilty of offenses against German troops should
be killed without a military trial, and that punishment could be
waived in the case of German soldiers who committed offenses
against enemy civilians. (886-PS)
Rosenberg was appointed by Hitler on 20 April 1941 “Deputy for
a Centralized Treatment of Problems concerning the Eastern
Territories.” The highest Reich authorities were to cooperate fully,
and Keitel was asked to designate a representative of OKW to sit
with Rosenberg. Jodl was appointed as Keitel’s representative with
Warlimont as his deputy, and Keitel wrote to Rosenberg on 25 April
1941 that Jodl and Warlimont would be the OKW representatives.
(865-PS)
Responsibility for crimes committed under Rosenberg’s authority
thus attach to Jodl as well. In this connection reference is made to
Section 7 of this chapter on Rosenberg.
(2) Deportation of civilian populations of and in Occupied
Territories for slave labor and for other purposes. Jodl knew of the
deportation of workers, for he once told Hitler that the military
commander of France had reported that over 220,000 workers had
been deported into the Reich in the past six months. (1383-PS)
(3) Murder and ill treatment of prisoners of war, and of other
members of the Armed Forces of the countries with whom Germany
was at war and of persons on the high seas. On 18 October 1942
Hitler ordered that commando troops, even if in uniform, should be
killed, not only in battle, but in flight or while attempting to
surrender. This order was issued by Jodl’s department. (498-PS)
A supplementary explanation of the commando order, signed by
Hitler, was distributed to commanding officers only, with a covering
memorandum dated 19 October 1942, signed by Jodl (503-PS).
Several cases are known in which the order was carried out. (508-
PS; 509-PS)
Three specific instances were mentioned by the G-3 of the C in
C, Norway, where captured members of sabotage units were
executed after interrogations which resulted in valuable intelligence.
These occurred at Gloafjord, Drontheim, and at Stavanger. (512-PS)
On 23 June 1944 C in C West requested instructions re-defining
the scope of the commando order. In view of the extensive landings
in Normandy, it had become difficult to decide which paratroops
should be considered sabotage troops under the terms of the order,
and which should be considered as engaged in normal combat
operations. The question was answered by an order of 25 June
1944, one copy of which was signed by Keitel, reaffirming the full
force of the original order. (531-PS; 551-PS)
When allied fliers were forced to land in Germany, they were
sometimes killed by the civilian population. The police had orders
not to protect the fliers, nor to punish civilians for lynching them. A
proposal was considered to order the shooting without court-martial
of enemy airmen who had been forced down after engaging in
specified “acts of terror.” It is not certain that the order was ever
issued, but it is certain that Keitel and Jodl knew of the lynchings,
did nothing to prevent them and in fact considered giving them
official justification.
(See also “F” at the end of Section 4 of this Chapter on Keitel,
where the joint responsibility of Keitel and Jodl for the lynching of
Allied airmen is discussed.)
LEGAL REFERENCES AND LIST OF DOCUMENTS RELATING TO
ALFRED JODL

Document Description Vol. Page

Charter of the International


Military Tribunal, Article 6. I 5
International Military Tribunal,
Indictment Number 1, Section
IV (H); Appendix A. I 29, 66
————
Note: A single asterisk (*) before a
document indicates that the
document was received in
evidence at the Nurnberg trial. A
double asterisk (**) before a
document number indicates that
the document was referred to
during the trial but was not
formally received in evidence, for
the reason given in parentheses
following the description of the
document. The USA series number,
given in parentheses following the
description of the document, is the
official exhibit number assigned by
the court.
————
*388-PS File of papers on Case Green (the
plan for the attack on
Czechoslovakia), kept by
Schmundt, Hitler’s adjutant, April-
October 1938. (USA 26) III 305
444-PS Original Directive No. 18 from III 403
Fuehrer’s Headquarters signed by
Hitler and initialled by Jodl, 12
November 1940, concerning plans
for prosecution of war in
Mediterranean Area and
occupation of Greece. (GB 116)
*446-PS Top Secret Fuehrer Order No. 21
signed by Hitler and initialled by
Jodl, Warlimont and Keitel, 18
December 1940, concerning the
Invasion of Russia (case
Barbarossa). (USA 31) III 407
*448-PS Hitler Order No. 22, initialled by
Keitel and Jodl, 11 January 1941,
concerning participation of German
Forces in the Fighting in the
Mediterranean Theater of
Operations. (GB 118) III 413
*498-PS Top Secret Fuehrer Order for
killing of commandos, 18 October
1942. (USA 501) III 416
*503-PS Letter signed by Jodl, 19 October
1942, concerning Hitler’s
explanation of his commando
order of the day before (Document
498-PS). (USA 542) III 426
*508-PS OKW correspondence, November
1942, about shooting of British
glider troops in Norway. (USA 545) III 430
*509-PS Telegram to OKW, 7 November
1943, reporting “special
treatment” for three British
commandos. (USA 547) III 433
*512-PS Teletype from Army Commander in III 433
Norway, 13 December 1942,
concerning interrogation of
saboteurs before shooting; and
memorandum in reply from OKW,
14 December 1942. (USA 546)
531-PS OKW memorandum, 23 June 1944,
citing inquiry from Supreme
Command West about treatment
of paratroopers. (USA 550) III 435
*551-PS Order signed by Keitel, 26 June
1944, concerning treatment of
Commando participants. (USA
551) III 440
*754-PS Teletype Order signed by Jodl, 28
October 1944, for evacuation of
Norwegians and burning of
houses. (GB 490) III 544
*789-PS Speech of the Fuehrer at a
conference, 23 November 1939, to
which all Supreme Commanders
were ordered. (USA 23) III 572
*865-PS Correspondence between Keitel,
Rosenberg and Lammers, April
1941, concerning appointment of
Jodl and Warlimont as OKW
representatives with Rosenberg.
(USA 143) III 621
874-PS Draft letter to Todt, initialled K, J,
and W, 9 March 1941, concerning
Deception measures. III 634
886-PS Fuehrer decree, 13 May 1941, on
courts-martial and treatment of
enemy civilians in the district
“Barbarossa”, signed by Keitel for
Hitler, and initialled by Jodl. III 637
*1039-PS Report concerning preparatory
work regarding problems in
Eastern Territories, 28 June 1941,
found in Rosenberg’s “Russia File”.
(USA 146) III 695
1229-PS OKW Directive to the German
Intelligence Service in the East,
signed by Jodl, 6 September 1940.
(USA 130) III 849
*1383-PS Extract from transcription of
stenographic report on discussion
of current military situation, 12
December 1942. (GB 489) III 958
*1541-PS Directive No. 20, Operation Marita,
13 December 1940. (GB 117) IV 101
1642-PS Distribution list, 1 March 1941, for
secret map of Soviet Union. IV 154
*1746-PS Conference between German and
Bulgarian Generals, 8 February
1941; speech by Hitler to German
High Command on situation in
Yugoslavia, 27 March 1941; plan
for invasion of Yugoslavia, 28
March 1941. (GB 120) IV 272
*1775-PS Propositions to Hitler by OKW, 14
February 1938. (USA 73) IV 357
*1780-PS Excerpts from diary kept by
General Jodl, January 1937 to
August 1939. (USA 72) IV 360
1800-PS Preliminary report on Germany’s
crimes against Norway, prepared
by the Royal Norwegian
Government. IV 375
*1808-PS Excerpt of speech by Jodl to
Officers and officials of Armed
Forces Operations Staff, 24 July
1944. (GB 493) IV 377
*1809-PS Entries from Jodl’s diary, February
1940 to May 1940. (GB 88) IV 377
*2865-PS Statement by Jodl, showing
positions held by him. (USA 16) V 526
*3702-PS Affidavit of Colonel-General Franz
Halder, 7 November 1945. (USA
531) VI 411
3705-PS Affidavit of Field Marshal Walter
von Brauchitsch, 7 November
1945. (USA 535) VI 415
*3707-PS Affidavit of Colonel-General Franz
Halder, 13 November 1945. (USA
533) VI 419
*3786-PS Stenographic transcript of a
meeting in the Fuehrer’s
Headquarters, 27 January 1945.
(USA 787) VI 655
*C-2 Examples of violations of
International Law and proposed
counter propaganda, issued by
OKW, 1 October 1938. (USA 90) VI 799
*C-39 Timetable for Barbarossa,
approved by Hitler and signed by
Keitel. (USA 138) VI 857
*C-59 Order signed by Warlimont for
execution of operation “Marita”, 19
February 1941. (GB 121) VI 879
*C-64 Raeder’s report, 12 December
1939, on meeting of Naval Staff
with Fuehrer. (GB 86) VI 884
*C-72 Orders postponing “A” day in the
West, November 1939 to May
1940. (GB 109) VI 893
*C-75 OKW Order No. 24 initialled Jodl,
signed Keitel, 5 March 1941,
concerning collaboration with
Japan. (USA 151) VI 906
*C-78 Schmundt’s Order of 9 June 1941,
convening conference on
Barbarossa on 14 June. (USA 139) VI 909
*C-102 Document signed by Hitler relating
to operation “Otto”, 11 March
1938. (USA 74) VI 911
*C-103 Directive signed by Jodl, 11 March
1938, on conduct towards Czech
or Italian troops in Austria. (USA
75) VI 913
C-123 Jodl Order on capitulation of
Leningrad, 7 October 1941. VI 929
*C-134 Letter from Jodl enclosing
memorandum on conference
between German and Italian
Generals on 19 January and
subsequent speech by Hitler, 20
January 1941. (GB 119) VI 939
*C-152 Extract from Naval War Staff files,
18 March 1941, concerning
audience of C-in-C of Navy with
Hitler on 18 March 1941. (GB 122) VI 966
*C-167 Report of meeting between Raeder
and Hitler, 18 March 1941. (GB
122) VI 977
*C-182 Directive No. 2 from Supreme VI 1017
Commander Armed Forces,
initialled Jodl, 11 March 1938.
(USA 77)
*D-777 Draft of directive, 15 June 1944,
from OKW to Supreme
Commander of “Luftwaffe”
concerning treatment of Allied
“Terrorist”-flyers. (GB 310) VII 234
*D-779 Letter from Reichsmarshal to Chief
of OKW, 19 August 1944,
regarding treatment of Allied
“Terrorist”-flyers. (GB 312) VII 235
*EC-405 Minutes of Tenth Meeting of
Working Committee of Reichs
Defense Council, 26 June 1935.
(GB 160) VII 450
*EC-406 Minutes of Eleventh Meeting of
Reichs Defense Council, 6
December 1935. (USA 772) VII 455
*L-79 Minutes of conference, 23 May
1939, “Indoctrination on the
political situation and future aims”.
(USA 27) VII 847
L-172 “The Strategic Position at the
Beginning of the 5th Year of War”,
a lecture delivered by Jodl on 7
November 1943 at Munich to Reich
and Gauleiters. (USA 34) VII 920
Statement II A Short Historical Consideration of
German War Guilt, by Alfred Jodl,
Nurnberg, 6 September 1945. VIII 662
Statement IX My Relationship to Adolf Hitler and
to the Party, by Erich Raeder,
Moscow, fall 1945. VIII 707
**Chart No. 7 Organization of the Wehrmacht
1938-1945. (Enlargement
displayed to Tribunal.) VIII 776

6. ERNST KALTENBRUNNER

A. KALTENBRUNNER ENTERED THE NATIONAL SOCIALIST


MOVEMENT IN ITS EARLY STAGES, AND SUPPORTED IT, AND WAS A
LEADER IN IT UNTIL THE END.
Ernst Kaltenbrunner was born on 4 October 1903 at Ried on Inn
(near Braunau) Austria. He spent his youth in Hitler’s native district.
Later he moved to Linz, where he attended the State
Realgymnasium. He studied law and obtained a law degree in 1926.
He spent the first year as apprentice lawyer at Linze-on-Danube and
then worked as a lawyer-candidate, first at Salzburg and after 1928
at Linz (2938-PS).
Kaltenbrunner joined the Nazi Party and the SS in Austria in
1932. Prior to 1933 he was the District speaker (Gauredner) and
legal counsellor (Rechtsberater) of the SS division (Abschnitt) VIII.
After 1933 he was the fuehrer of regiment (Standarte) 37 and later
of the SS division VIII (2892-PS).
In January 1934 Kaltenbrunner was jailed by the Dollfuss
government on account of his Nazi views, and sent with other
leading National Socialists into the concentration camp
Kaisersteinbruch. He is said to have started and led a hunger strike
of the prisoners and thereby to have forced the government to
dismiss 490 National Socialist prisoners. In the following year he was
jailed again because of suspicion of High Treason and committed to
the military court at Wels (Upper Danube). After an investigation of
many months the accusation of High Treason was dropped, but he
was condemned to six months’ imprisonment for conspiracy. His
right to practice law was suspended because of his Nazi activities
(2938-PS).
After the Spring of 1935 Kaltenbrunner was the leader of the
Austrian SS. In the magazine of the SIPO and SD, issue of 15 May
1943, it is stated:

“It redounds to his credit that in this important position he


succeeded through energetic leadership in maintaining the
unity of the Austrian SS, which he had built up, in spite of all
persecution, and succeeded in committing it successfully at
the right moment. After the annexation, in which the SS was
a decisive factor, he was appointed State Secretary for
Security Matters on 11 March 1938 in the new National-
Socialist cabinet of Seyss-Inquart. A few hours later he was
able to report to Reichsfuehrer SS Heinrich Himmler, who had
landed at Aspern, the Vienna airport, on 12 March 1938, 3 a.
m., as the first National Socialist leader, that the Movement
had achieved a complete victory and that ‘The SS is in
formation and awaiting further orders.’ ” (2938-PS)

Hitler promoted Kaltenbrunner on the date of the Anschluss to


the rank of SS Brigadefuehrer and leader of the SS Oberabschnitt
Donau. On 11 September 1938 he was promoted to the rank of SS
Gruppenfuehrer. During the liquidation of the Austrian national
government and the reorganization of Austria into Alps and Danube
Districts, he was appointed Higher SS and Police Leader to the
governors of Vienna, Lower Danube, and Upper Danube, in Corps
Area (Wehrkreis) XVII, and in April 1941 was promoted to Major
General of the Police (2938-PS).
On 30 January 1943 Kaltenbrunner was appointed Chief of the
Security Police and SD (RSHA), succeeding Heydrich, who had been
assassinated in Prague in June 1942. Kaltenbrunner held this
position until the end of the war (2644-PS).
On 4 October 1943 at Pozen, Poland, in a speech delivered to
Gruppenfuehrers of the SS, Himmler made special reference to “our
comrade Obergruppenfuehrer Kaltenbrunner, who has succeeded our
fallen friend Heydrich” (1919-PS).
On 9 December 1944 the decoration known as the Knight’s Cross
of the War Merit, Cross with Swords, was given to SS
Obergruppenfuehrer and General of the Police Dr. Ernst
Kaltenbrunner, Chief of the Security Police and the SD (2770-PS).
In addition he held the Golden insignia of Honor and the
Blutorden. He was a member of the Reichstag after the 9th election
period 1938 (2892-PS).
Toward the end of the war, Kaltenbrunner’s power increased
greatly, especially after the attack on Hitler of 20 July 1944. He
gained direct access to Hitler. He was very friendly with Fegelein and
his wife, who was the sister of Eva Braun. So powerful had
Kaltenbrunner become toward the end that even Himmler feared
him. On 13 April 1945 the chief of the German foreign intelligence
service, Schellenberg, asked Himmler to receive the representative
of the Jewish World Congress, Mr. Storsch, from Stockholm, and
Himmler said,
“But how am I going to do that in regard to Kaltenbrunner? I
shall then be completely at his mercy!” (2990-PS).

B. DURING KALTENBRUNNER’S TERM IN OFFICE AS CHIEF OF THE


SECURITY POLICE AND SD, NUMEROUS AND VAST CRIMES WERE
COMMITTED BY THE SIPO AND SD IN THE COURSE OF OFFICIAL
DUTIES.
As Chief of the Security Police after 30 January 1943,
Kaltenbrunner was the head of the RSHA and the regional offices of
the Gestapo, SD, and Kripo. Directly under Kaltenbrunner were the
Chiefs of the main offices of the RSHA, including Amt III (the SD),
Amt IV (the Gestapo), Amt V (the Kripo), and Amt VI (the SD in
foreign intelligence) (L-219).
Kaltenbrunner had direct responsibility over the offices of the
RSHA. All important matters had to be referred to him or had to be
handled under general or special authority granted by him to office
chiefs.

“All decisions of principal character are signed by the Chief of


the Security Police personally. An office chief has only the
authority to sign ‘acting for’ and a chairman ‘by order of’ if
the subjects treated in the respective decrees fit into the
general laid-down principles according to the plan of
distribution of authority. In case of doubt it was the duty to
get the question cleared up by reporting it to the Chief of
Security Police and SD.” (L-34)
“To my knowledge no chief of office or any of the officials of
the RSHA, authorized to sign, had the right to sign in any
principal affairs of particular political significance without
consent of the Chief of the Security Police—not even during
his temporary absence. From my own experience I can
furthermore declare that the chief of Amt IV, Mueller,
particularly was very hesitant in signing documents
concerning questions of general nature and in some cases of

You might also like