Difference between revisions of "MOP-en"
(Blanked the page) (Tag: Blanking) |
|||
Line 1: | Line 1: | ||
__NOTOC__ |
|||
<!--{{TocRight|2}}--> |
|||
<big> |
|||
'''Shortcuts:''' |
|||
[[#Calendar | Calendar]] | |
|||
[[#Assignments | Assignments]] | |
|||
[[#Resources | Resources]] | |
|||
[[#{{CURRENTDAY2}}.{{CURRENTMONTH}}.{{CURRENTYEAR}}. | Today <small>(if there is a class)</small>]] |
|||
</big> |
|||
'''Course: Assembly Programming''' |
|||
=Calendar= |
|||
{| border=1 cellspacing=0 cellpadding=4 style = 'border-color: #ddd;' |
|||
|- |
|||
! Date |
|||
! Topic, content |
|||
! Deliverables |
|||
|- style='vertical-align: top;' |
|||
| |
|||
====03.09.21==== |
|||
11:10 |
|||
| |
|||
{| width='100%' style='background-color:#ddd;' |
|||
|<big>'''Introduction'''</big> |
|||
|} |
|||
Microprocessors and microcontrollers. Applications. Architectures. Coourse outline. |
|||
| |
|||
|- style='vertical-align: top;' |
|||
| |
|||
====14.09.21==== |
|||
11:10 |
|||
| |
|||
{| width='100%' style='background-color:#ddd;' |
|||
|<big>'''Hexadecimal arithmetic'''</big> |
|||
|} |
|||
Representation of non-negative numbers in hardware, registers and memory. Decimal, binary, octal, and hexadecimal systems. Converting between the systems. |
|||
| |
|||
|- style='vertical-align: top;' |
|||
| |
|||
====17.09.21==== |
|||
11:10 |
|||
| |
|||
{| width='100%' style='background-color:#ddd;' |
|||
|<big>'''Lab :: Quiz 1'''</big> |
|||
|} |
|||
'''Lab''' |
|||
Practicing the conversion between the counting systems |
|||
'''Quiz 1''' |
|||
Decimal, binary, octal and hexadecimal systems. |
|||
| |
|||
* Assignment '''Lab_Binary''' - Lab |
|||
|- style='vertical-align: top;' |
|||
| |
|||
====21.09.21==== |
|||
11:10 |
|||
| |
|||
{| width='100%' style='background-color:#ddd;' |
|||
|<big>'''Two's complement'''</big> |
|||
|} |
|||
Representing negative numbers in hardware. Register size, and why it is important. Methods for encoding negative numbers: packed, signed, bias, one's complement and two's complement. Converting between the value and two's complement in binary and hexadecimal systems. |
|||
| |
|||
|- style='vertical-align: top;' |
|||
| |
|||
====24.09.21==== |
|||
11:10 |
|||
| |
|||
{| width='100%' style='background-color:#ddd;' |
|||
|<big>'''Lab :: Quiz 2'''</big> |
|||
|} |
|||
'''Lab''' |
|||
Exercises with the two's complement |
|||
'''Quiz 2''' |
|||
Two's complement. |
|||
| |
|||
* Assignment '''Lab_Complement''' - Lab |
|||
|- style='vertical-align: top;' |
|||
| |
|||
====28.09.21==== |
|||
11:10 |
|||
| |
|||
{| width='100%' style='background-color:#ddd;' |
|||
|<big>'''Processor architecture'''</big> |
|||
|} |
|||
Architecture of a processor. Registers, register file, ALU, datapath. CISC vs. RISC architectures. x86 architecture as CISC representative. ARM architecture as RISC. Instruction encoding. |
|||
| |
|||
|- style='vertical-align: top;' |
|||
| |
|||
====01.10.21==== |
|||
11:10 |
|||
| |
|||
{| width='100%' style='background-color:#ddd;' |
|||
|<big>'''Lab'''</big> |
|||
|} |
|||
Developing and testing a simple Assembly program. Using cross-compilation tools. Introduction to the Make system. |
|||
| |
|||
* Assignment '''Lab_Make''' - Lab |
|||
|- style='vertical-align: top;' |
|||
| |
|||
====05.10.21==== |
|||
11:10 |
|||
| |
|||
{| width='100%' style='background-color:#ddd;' |
|||
|<big>'''Computing environment'''</big> |
|||
|} |
|||
Environment and tools for compiling and debugging Assembly programs. Compiler, preprocessor, assembly, linker, loader, debugger. Cross-compilation and toolchains. Emulators and virtual machines. |
|||
| |
|||
|- style='vertical-align: top;' |
|||
| |
|||
====08.10.21==== |
|||
11:10 |
|||
| |
|||
{| width='100%' style='background-color:#ddd;' |
|||
|<big>'''Lab'''</big> |
|||
|} |
|||
Advanced features of the Make system. |
|||
| |
|||
* Assignment '''Lab_Make_2''' - Lab |
|||
|- style='vertical-align: top;' |
|||
| |
|||
====12.10.21==== |
|||
11:10 |
|||
| |
|||
{| width='100%' style='background-color:#ddd;' |
|||
|<big>'''ARM Assembly and arithmetic'''</big> |
|||
|} |
|||
Introduction to ARM Assembly language and programming. Instruction types. Arithmetic instructions. MOV, ADD, SUB. MVN, ADC, SBC, RSB, RSC. Barrel Shifter. |
|||
| |
|||
|- style='vertical-align: top;' |
|||
| |
|||
====15.10.21==== |
|||
11:10 |
|||
| |
|||
{| width='100%' style='background-color:#ddd;' |
|||
|<big>'''Lab'''</big> |
|||
|} |
|||
Evaluating and following the code "on paper". |
|||
| |
|||
* Assignment '''Lab_Dry_Run''' - Lab |
|||
|- style='vertical-align: top;' |
|||
| |
|||
====19.10.21==== |
|||
11:10 |
|||
| |
|||
{| width='100%' style='background-color:#ddd;' |
|||
|<big>'''Flow control and tests'''</big> |
|||
|} |
|||
Flow control in Assembly. Branch instructions. B, BL, BX, BLX. Working directly with PC register. CPSR flags. Condition field. Bit operations. AND, ORR, EOR, BIC, shift and rotation. CMP, CMN, TST, TEQ. Fast flags and the S postfix. |
|||
| |
|||
|- style='vertical-align: top;' |
|||
| |
|||
====22.10.21==== |
|||
11:10 |
|||
| |
|||
{| width='100%' style='background-color:#ddd;' |
|||
|<big>'''Lab :: Quiz 3'''</big> |
|||
|} |
|||
'''Lab''' |
|||
Debugging Assembly programs. Gnu debugger gdb. |
|||
'''Quiz 3''' |
|||
Code comprehension. |
|||
| |
|||
* Assignment '''Lab_Debug''' - Lab |
|||
* '''Due''' '''HW1''' - Arithmetic progression |
|||
|- style='vertical-align: top;' |
|||
| |
|||
====26.10.21==== |
|||
11:10 |
|||
| |
|||
{| width='100%' style='background-color:#ddd;' |
|||
|<big>'''Memory instructions'''</big> |
|||
|} |
|||
Reading and writing data to memory. Memory access instructions. STR, LDR, STRB, STRH, LDRB, LDRH, LDRSB, LDRSH. Addressing modes: offset, pre-indexed and post-indexed. Using barrel shifter with addressing. Data alignment in memory. |
|||
| |
|||
|- style='vertical-align: top;' |
|||
| |
|||
====29.10.21==== |
|||
11:10 |
|||
| |
|||
{| width='100%' style='background-color:#ddd;' |
|||
|<big>'''Lab'''</big> |
|||
|} |
|||
TBD |
|||
| |
|||
* Assignment '''Lab_TBD''' - Lab |
|||
|- style='vertical-align: top;' |
|||
| |
|||
====02.11.21==== |
|||
11:10 |
|||
| |
|||
{| width='100%' style='background-color:#ddd;' |
|||
|<big>'''Calling subroutines and interfacing with C'''</big> |
|||
|} |
|||
Variable types in C: static, automatic and dynamic. Calling subroutines and parameter passing conventions. Parameters and return value. Stack and registers. Saving the registers, the context. Loading and storing multiple registers: LDM, STM. Interfacing between Assembly and C. |
|||
| |
|||
|- style='vertical-align: top;' |
|||
| |
|||
====05.11.21==== |
|||
11:10 |
|||
| |
|||
{| width='100%' style='background-color:#ddd;' |
|||
|<big>'''Lab'''</big> |
|||
|} |
|||
TBD |
|||
| |
|||
* Assignment '''Lab_TBD''' - Lab |
|||
* '''Due''' '''HW2''' - Matrix multiplication |
|||
|- style='vertical-align: top;' |
|||
| |
|||
====09.11.21==== |
|||
11:10 |
|||
| |
|||
{| width='100%' style='background-color:#ddd;' |
|||
|<big>'''Symbols'''</big> |
|||
|} |
|||
Symbol encoding in hardware and software. Code tables. ASCII. EBCDIC. ISO code tables. Foreign letter symbols. UTF-8, UTF-16. Strings in C and memory. Converting values to symbols and strings. |
|||
| |
|||
|- style='vertical-align: top;' |
|||
| |
|||
====12.11.21==== |
|||
11:10 |
|||
| |
|||
{| width='100%' style='background-color:#ddd;' |
|||
|<big>'''Midterm'''</big> |
|||
|} |
|||
Data representation in memory. |
|||
Assembly code comprehension. |
|||
Two programming tasks. |
|||
| |
|||
* Assignment '''Proj''' - Project |
|||
|- style='vertical-align: top;' |
|||
| |
|||
====16.11.21==== |
|||
11:10 |
|||
| |
|||
{| width='100%' style='background-color:#ddd;' |
|||
|<big>'''Expressions and Macro commands'''</big> |
|||
|} |
|||
Expressions in Assembly. Operators in expressions. Constants. Assigning values to symbols. Directives: .set, .equiv, .eqv. Conditional compilation. Directives .if, .ifdef, .endif., ifb, .ifc, .ifeqs. More conditionals .ifeq, .ifge, .ifne and others. Macro commands: .macro, .endm., .rept. Recursive macros. Local macros. Macros across sections. |
|||
| |
|||
* '''Due''' '''M1P1''' - Midterm 1 programming task 1, tested |
|||
* '''Due''' '''M1P2''' - Midterm 1 programming task 2, tested |
|||
|- style='vertical-align: top;' |
|||
| |
|||
====23.11.21==== |
|||
11:10 |
|||
| |
|||
{| width='100%' style='background-color:#ddd;' |
|||
|<big>'''Lab'''</big> |
|||
|} |
|||
TBD |
|||
| |
|||
* Assignment '''Lab_TBD''' - Lab |
|||
|- style='vertical-align: top;' |
|||
| |
|||
====26.11.21==== |
|||
11:10 |
|||
| |
|||
{| width='100%' style='background-color:#ddd;' |
|||
|<big>'''Inline Assembly'''</big> |
|||
|} |
|||
Including Assembly in C code. Inline code and Assembly code operands. Tasks for the compiler, linker and loader. Dynamic loaders and libraries. |
|||
| |
|||
|- style='vertical-align: top;' |
|||
| |
|||
====30.11.21==== |
|||
11:10 |
|||
| |
|||
{| width='100%' style='background-color:#ddd;' |
|||
|<big>'''Optimizations'''</big> |
|||
|} |
|||
Execution time for instructions. Case study for code optimization. Leveraging the documentation and specification of instructions. Reordering the code. Unrolling loops. Taking advantage of branch prediction. Cache memory and the code performance. |
|||
| |
|||
|- style='vertical-align: top;' |
|||
| |
|||
====03.12.21==== |
|||
11:10 |
|||
| |
|||
{| width='100%' style='background-color:#ddd;' |
|||
|<big>'''Lab'''</big> |
|||
|} |
|||
Review of the course topics |
|||
| |
|||
* Assignment '''Lab_Summary''' - Lab |
|||
* '''Due By midnight''' '''Proj''' - Project |
|||
|- style='vertical-align: top;' |
|||
| |
|||
====13-22.12.2021==== |
|||
| |
|||
{| width='100%' style='background-color:#ddd;' |
|||
|<big>'''Exam week'''</big> |
|||
|} |
|||
Time for exams |
|||
| |
|||
|- style='vertical-align: top;' |
|||
| |
|||
====16.12.21==== |
|||
11:10 |
|||
| |
|||
{| width='100%' style='background-color:#ddd;' |
|||
|<big>'''Exam'''</big> |
|||
|} |
|||
Data representation in memory. |
|||
Assembly code comprehension. |
|||
Multiple choice questions and a programming task. |
|||
| |
|||
* '''Due''' '''ExamP1''' - Exam programming task, tested |
|||
|} |
|||
=Assignments= |
|||
=Resources= |
|||
*[https://www.cs.colby.edu/maxwell/courses/tutorials/maketutor/ A simple Makefile tutorial] |
|||
* [https://developers.redhat.com/blog/2021/04/30/the-gdb-developers-gnu-debugger-tutorial-part-1-getting-started-with-the-debugger GDB getting started tutorial] |