Commit 82c0522a authored by Igor Zhirkov's avatar Igor Zhirkov
Browse files

Update the description

parent 6c5e42dd
......@@ -4,7 +4,7 @@
# Подготовка
- Прочитайте главу 12 (стр. 221, 231-239) и 13 (целиком) "Low-level programming: C, assembly and program execution".
- Прочитайте главу 12 (стр. 221, 231–239) и 13 (целиком) "Low-level programming: C, assembly and program execution".
На защите мы можем обсуждать любые вопросы из учебника из глав 8–13 включительно.
......@@ -94,6 +94,37 @@ struct bmp_header __attribute__((packed))
struct image rotate( struct image const source );
```
# Пользователям компилятора от Microsoft
Вам придётся задать структуру по-другому, без атрибута `packed`:
```c
#include <stdint.h>
#pragma pack(push, 1)
struct bmp_header
{
uint16_t bfType;
uint32_t bfileSize;
uint32_t bfReserved;
uint32_t bOffBits;
uint32_t biSize;
uint32_t biWidth;
uint32_t biHeight;
uint16_t biPlanes;
uint16_t biBitCount;
uint32_t biCompression;
uint32_t biSizeImage;
uint32_t biXPelsPerMeter;
uint32_t biYPelsPerMeter;
uint32_t biClrUsed;
uint32_t biClrImportant;
};
#pragma pack(pop)
```
Объяснение этого прочтите находится на страницах 235&ndash;239 учебника.
# Для самопроверки:
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment