From 3909eb183c88f6972d1cbf675c9a5f2d96813008 Mon Sep 17 00:00:00 2001 From: Aren Date: Fri, 8 Dec 2023 18:11:59 +0300 Subject: [PATCH] =?UTF-8?q?=D0=94=D0=BE=D0=B1=D0=B0=D0=B2=D0=BB=D0=B5?= =?UTF-8?q?=D0=BD=D0=B0=20=D0=BE=D1=82=D0=BF=D1=80=D0=B0=D0=B2=D0=BA=D0=B0?= =?UTF-8?q?=20word=20=D0=B2=20IO=20=D0=BF=D0=BE=D1=80=D1=82?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- include/arch.h | 10 ++++++++++ include/version.h | 2 +- 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/include/arch.h b/include/arch.h index 850ace9..87ee3af 100644 --- a/include/arch.h +++ b/include/arch.h @@ -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 \ No newline at end of file diff --git a/include/version.h b/include/version.h index 5323310..d0e56cc 100644 --- a/include/version.h +++ b/include/version.h @@ -1,3 +1,3 @@ #define VERSION_MAJOR 0 #define VERSION_MINOR 1 -#define VERSION_BUILD 760 +#define VERSION_BUILD 769