/
niceSOFT
/
qboot
Обзор
Документация
Войти
/
niceSOFT
/
qboot
Код
Задачи
Вики
Пакеты
0
Релизы
0
Аналитика
Безопасность
master
include/segment.h
19 строк
387 B
Paolo Bonzini
avoid reserved identifiers for header guards
29 май 2015, 17:50
29 май 2015, 17:50
71f714a
Код
Авторство
О чём код?
#ifndef BIOS_SEGMENT_H #define BIOS_SEGMENT_H static inline uint32_t segment_to_flat(uint16_t selector, uint16_t offset) { return ((uint32_t)selector << 4) + (uint32_t) offset; } static inline uint16_t flat_to_seg16(uint32_t address) { return (address >> 4) & 0xf000; } static inline uint16_t flat_to_off16(uint32_t address) { return address & 65535; } #endif /* KVM_SEGMENT_H */