A Short Video Course on
Assembly Programming and Instruction Set Architecture
Prof. Harry H. Porter III, Ph.D.
Portland State University
*****     
Last updated: Feb. 3, 2015
     *****
Overview
These videos introduce and explain
machine code,
assembly language programming, and
processor architecture.
Topics include:
      •
how code in a high-level programming language is compiled into assembly language
      •
the details of machine architecture
      •
how the processor executes machine code
The videos are intended for serious students but assume no prior knowledge, beyond knowing the general concepts of programming.
To make the concepts concrete, these videos describe a specific instruction set architecture called the BLITZ architecture. The BLITZ processor has a clean and logical design. Its use allows us to focus on the core ideas of assembly language programming, without getting bogged down in manufacturer-specific details. These videos explain the fundamental concepts you'll need in order to understand the complex designs of modern processors.
Every Computer Science student should learn this material and every qualified systems programmer will fully grasp this knowledge. This material is technical and not necessary for junior programmers.
Number of videos: 33 (so far; work continuing)
Total time: 555 minutes (9 hours, 15 minutes)
Average time per video: 17 minutes
Created: January 2015
The Videos
Bits, Bytes, Words, and Doublewords (15 mins)
     
The main sizes of binary data; equivalence of hex and binary.
Main Memory and Registers (20 mins)
     
Computer organization, including processor, memory, I/I devices, and the bus; registers.
Fetch, Increment, Execute (8 mins)
     
The fetch-increment-execute cycle; program counter (PC), the instruction register; the BLITZ architecture.
An Example Instruction (13 mins)
     
The ADD instruction; assembly code vs. machine code; instruction encoding; immediate data within an instruction; different formats for the ADD instruction; storing instructions in memory; how instructions are fetched and executed.
Assembly Language: Assembling and Linking (14 mins)
     
Th assembler tool; building executable files; compiling, assembling, and linking; relevant commands in a Unix/Linux environment; the syntax of assembly language; the GCC tool.
Addition and Subtraction (25 mins)
     
The algorithm for binary addition and subtraction; full adders and the hardware implementation; signed numbers; overflow conditions for addition and subtraction.
Logic Gates (7 mins)
     
Representing bits with electricity; the AND, OR, and NOT gates; schematic symbols for circuit diagrams; DeMorgan's Laws as related to logic gates.
Arithmetic and Logic Instructions (16 mins)
     
The arithmetic, logical, and shift instructions; ADD, SUB, MUL, DIV, REM, NEG, AND, OR, XOR, ANDN, NOT, SLL, SRL, SRA; logic function tables; binary and unary operations.
MOV, Immediate Values, Signed Numbers, Register R0, Synthetic Instructions (18 mins)
     
The MOV instruction; the encoding of immediate values within instructions; signed two's complement numbers; sign extension; ranges of data values; register R0, synthetic instructions; NEG, NOT, CLR.
Compiling Simple Assignment Statements and Expressions (17 mins)
     
Storing variables in registers; using MOV to implement assignment statements; using the arithmetic, logic, and shift instructions to implement the basic operators of the source program.
The SET, LOAD, and STORE Instructions (15 mins)
     
xxxxxxxxxx
Address Modes (28 mins)
     
xxxxxxxxxx
Labels and the JMP Instruction (28 mins)
     
xxxxxxxxxx
The Stack and the PUSH and POP Instructions (11 mins)
     
xxxxxxxxxx
Functions and the CALL and RETURN Instructions (16 mins)
     
xxxxxxxxxx
The Status Register and the Condition Code Bits (12 mins)
     
xxxxxxxxxx
The CMP, JMP, and Conditional Branch Instructions (18 mins)
     
xxxxxxxxxx
Compiling Flow-Of-Control Statements (16 mins)
     
xxxxxxxxxx
Conditional Branching: Details (13 mins)
     
xxxxxxxxxx
Address Computations: LDADDR and LEA (12 mins)
     
xxxxxxxxxx
Misc. Instructions (19 mins)
     
xxxxxxxxxx
System Mode and Privileged Instructions (7 mins)
     
xxxxxxxxxx
Interrupt Processing (33 mins)
     
xxxxxxxxxx
User Registers and System Registers (9 mins)
     
xxxxxxxxxx
The SYSCALL Instruction (8 mins)
     
xxxxxxxxxx
Floating Point Instructions (17 mins)
     
xxxxxxxxxx
Instruction Encoding (19 mins)
     
xxxxxxxxxx
Assembler Syntax (11 mins)
     
xxxxxxxxxx
Pseudo-Ops: Assembler Directives (16 mins)
     
xxxxxxxxxx
Segments and Memory Layout (22 mins)
     
xxxxxxxxxx
Labels and Assembler Symbols (21 mins)
     
xxxxxxxxxx
Introduction to Linking (14 mins)
     
xxxxxxxxxx
Linking, Relocation, and Object Files (37 mins)
     
xxxxxxxxxx
xxxxx (xxx mins)
     
xxxxxxxxxx
Info about video formatting:
Produced on a Mac; MPEG-4; H.264; Millions; AAC; 2 channels; 32000 Hz; FPS: 23.98.
640 x 360; Data rate: about 350 kbit/s
Problems / Comments on This Web Page