aboutsummaryrefslogtreecommitdiff
path: root/int21dos.h
diff options
context:
space:
mode:
authorJavier <dev.git@javispedro.com>2022-04-14 00:00:19 +0200
committerJavier <dev.git@javispedro.com>2022-04-14 00:00:19 +0200
commitb11d085f98465aae2b5a861066b963fce5aeaae3 (patch)
tree85ce02217e85d913fbbb827945e593d1d53b1845 /int21dos.h
parenta77ce98811ba6040dafec8f75b5387ae5b2813aa (diff)
downloadvbados-b11d085f98465aae2b5a861066b963fce5aeaae3.tar.gz
vbados-b11d085f98465aae2b5a861066b963fce5aeaae3.zip
add wheel support to win16 mouse driver
Diffstat (limited to 'int21dos.h')
-rw-r--r--int21dos.h21
1 files changed, 19 insertions, 2 deletions
diff --git a/int21dos.h b/int21dos.h
index 0a04ac0..a76c2c5 100644
--- a/int21dos.h
+++ b/int21dos.h
@@ -67,6 +67,25 @@ enum dos_error {
DOS_ERROR_CANNOT_MAKE = 82,
};
+// General functions
+static inline void dos_print_string(const char *s);
+#pragma aux dos_print_string = \
+ "mov ah, 0x09" \
+ "int 0x21" \
+ __parm [dx] \
+ __modify [ah]
+
+static inline uint8_t dos_read_character(void);
+#pragma aux dos_read_character = \
+ "mov ah, 0x08" \
+ "int 0x21" \
+ __value [al] \
+ __modify [ax]
+
+// Memory manipulation functions
+
+typedef __segment segment_t;
+
enum dos_allocation_strategy {
DOS_FIT_FIRST = 0,
DOS_FIT_BEST = 1,
@@ -76,8 +95,6 @@ enum dos_allocation_strategy {
DOS_FIT_HIGHONLY = 0x40,
};
-typedef __segment segment_t;
-
/** Converts bytes to paragraphs (16 bytes), rounding up. */
static inline unsigned get_paragraphs(unsigned bytes)
{