Course detail

Machine level programming

FIT-ISUAcad. year: 2015/2016

Numeral systems: signed and unsigned integer binary representation, binary arithmetic, real numbers in the IEEE-754 format. Assembly language: assembler, basic functions of a central processing unit (CPU). Specific CPU architecture: registers, memory organization, addressing, interrupt system, coprocessors, instruction set and instruction format. Programming in assembler: common control structures, compilation and linking of the code. Relation to the high level programming languages: calling conventions, operating system services. Coprocessor: real number format, instruction set, programming of the floating point unit.

Language of instruction

Czech

Number of ECTS credits

6

Mode of study

Not applicable.

Learning outcomes of the course unit

Students acquaint with one specific processor architecture. They learn how to use the most important instructions of the processor and its coprocessor, programming of the control structures and they develop learn to develop simple applications (compilation and linking). They learn about calling conventions, some basic operating system services and how to call them. They learn how to practically use this knowledge.

Students learn about processor architecture form the low level programming point of view, which is one of the very basic skills of an IT professional. They learn how to develop simple applications or libraries in assembler and how to connect them to high level programming language applications.

Prerequisites

Basic knowledge of the C language programming.

Co-requisites

Not applicable.

Planned learning activities and teaching methods

Not applicable.

Assesment methods and criteria linked to learning outcomes

At least 20 points earned during semester.

To successfully pass the course students must earn at least 25 points from the final examination.

Course curriculum

    Syllabus of lectures:
    1. Introduction, numeral systems, number specification, binary arithmetic.
    2. Basic functions of a processor, machine language, symbolic language, assembler.
    3. Processor architecture - registers, operand, instruction format, memory addressing, interrupts.
    4. Processor architecture - transfers, arithmetical and logical instructions.
    5. Processor architecture - shifts and rotations, control transfer.
    6. Processor architecture - other instructions.
    7. Mid-term written test.
    8. Basics of low level programming, elementary control structures.
    9. Functions and calling conventions.
    10. Modular programming, libraries, operating system services.
    11. Coprocessor FPU - architecture, real number format, instruction set.
    12. Coprocessor FPU - instruction set, programming, examples.
    13. Compiler for assembler - pseudoinstructions, directives, expressions, operators, operands and macros.

    Syllabus of computer exercises:
    1. Integrated Development Environment (IDE) for assemblers, compilation, linking and execution in a command line environment.
    2. Numeral systems (numeral system conversions), number representation (signed integers, real numbers).
    3. Hypothetical computer (programming and debugging in the IDE).
    4. Arithmetical and logical instructions, shifts, rotations.
    5. Test - programming of a simple mathematical problem in assembler.
    6. Jump instructions, essential control structures (if-then-else, while, do-while, for, switch-case).
    7. Memory operands (variables, arrays).
    8. Test - use of the essential control structures.
    9. Function calling and calling conventions.
    10. Calling of services and functions of the operating system, calling of functions from the high level language libraries.
    11. Test - simple application with a user command line input/output.
    12. Programming of the coprocessor (FPU).
    13. Test - using coprocessor (FPU).

Work placements

Not applicable.

Aims

To acquaint students with computer programming at the lowest level with focus at chosen processor architecture. To introduce and teach how to actively work with numeral systems, representation of the signed and unsigned numbers, arithmetic in the binary numeral system and representation of the real numbers. To familiarise with a specific processor architecture, its instruction format and addressing modes. To teach to actively work with the common control structures in assembler using given instruction set. To show connection of programming at low level and high level programming via libraries and operating system services. To teach how to use floating point unit to calculate with real numbers.

Specification of controlled education, way of implementation and compensation for absences

  • Mid-Term written test
  • Evaluation of activity in computer exercises

Recommended optional programme components

Not applicable.

Prerequisites and corequisites

Not applicable.

Basic literature

Intel® 64 and IA-32 architectures software developer’s manual combined volumes: 1, 2A, 2B, 2C, 2D, 3A, 3B, 3C, 3D, and 4. Webové stránky společnosti Intel [online]. [cit. 2022-01-06]. Dostupné z: https://www.intel.com/content/dam/develop/public/us/en/documents/325462-sdm-vol-1-2abcd-3abcd.pdf
The Netwide Assembler: NASM, Quick reference Guide [online]. [cit. 2022-01-06]. Dostupné z: https://www.nasm.us/xdoc/2.15.05/nasmdoc.pdf

Recommended reading

Duntemann, Jeff. Assembly language step-by-step: programming with linux. 3rd ed. Indianapolis: Wiley, 2009. ISBN 978-0470497029.
Intel® 64 and IA-32 architectures software developer’s manual combined volumes: 1, 2A, 2B, 2C, 2D, 3A, 3B, 3C, 3D, and 4. Webové stránky společnosti Intel [online]. [cit. 2022-01-06]. Dostupné z: https://www.intel.com/content/dam/develop/public/us/en/documents/325462-sdm-vol-1-2abcd-3abcd.pdf
Marek, R.: Assembler pro PC - učíme se programovat v jazyce, Computer Press, 2003, ISBN 80-7226-843-0
The Netwide Assembler: NASM, Quick reference Guide [online]. [cit. 2022-01-06]. Dostupné z: https://www.nasm.us/xdoc/2.15.05/nasmdoc.pdf

Classification of course in study plans

  • Programme IT-BC-3 Bachelor's

    branch BIT , 1 year of study, summer semester, compulsory

Type of course unit

 

Lecture

39 hod., optionally

Teacher / Lecturer

Syllabus

  1. Introduction, numeral systems, number specification, binary arithmetic.
  2. Basic functions of a processor, machine language, symbolic language, assembler.
  3. Processor architecture - registers, operand, instruction format, memory addressing, interrupts.
  4. Processor architecture - transfers, arithmetical and logical instructions.
  5. Processor architecture - shifts and rotations, control transfer.
  6. Processor architecture - other instructions.
  7. Mid-term written test.
  8. Basics of low level programming, elementary control structures.
  9. Functions and calling conventions.
  10. Modular programming, libraries, operating system services.
  11. Coprocessor FPU - architecture, real number format, instruction set.
  12. Coprocessor FPU - instruction set, programming, examples.
  13. Compiler for assembler - pseudoinstructions, directives, expressions, operators, operands and macros.

Exercise in computer lab

26 hod., optionally

Teacher / Lecturer

Syllabus

  1. Integrated Development Environment (IDE) for assemblers, compilation, linking and execution in a command line environment.
  2. Numeral systems (numeral system conversions), number representation (signed integers, real numbers).
  3. Hypothetical computer (programming and debugging in the IDE).
  4. Arithmetical and logical instructions, shifts, rotations.
  5. Test - programming of a simple mathematical problem in assembler.
  6. Jump instructions, essential control structures (if-then-else, while, do-while, for, switch-case).
  7. Memory operands (variables, arrays).
  8. Test - use of the essential control structures.
  9. Function calling and calling conventions.
  10. Calling of services and functions of the operating system, calling of functions from the high level language libraries.
  11. Test - simple application with a user command line input/output.
  12. Programming of the coprocessor (FPU).
  13. Test - using coprocessor (FPU).