Добавлена отправка word в IO порт

This commit is contained in:
Aren 2023-12-08 18:11:59 +03:00
parent 67af4e64bc
commit 3909eb183c
2 changed files with 11 additions and 1 deletions

View File

@ -31,4 +31,14 @@ static inline uint8_t inb(uint16_t port) {
return ret;
}
static inline void outw(uint16_t port, uint16_t val) {
asm volatile("outw %0, %1" : : "a"(val), "Nd"(port));
}
static inline uint16_t inw(uint16_t port) {
uint16_t ret;
asm volatile("inw %1, %0" : "=a"(ret) : "Nd"(port));
return ret;
}
#endif // arch.h

View File

@ -1,3 +1,3 @@
#define VERSION_MAJOR 0
#define VERSION_MINOR 1
#define VERSION_BUILD 760
#define VERSION_BUILD 769