diff options
author | Javier <dev.git@javispedro.com> | 2022-04-14 00:00:19 +0200 |
---|---|---|
committer | Javier <dev.git@javispedro.com> | 2022-04-14 00:00:19 +0200 |
commit | b11d085f98465aae2b5a861066b963fce5aeaae3 (patch) | |
tree | 85ce02217e85d913fbbb827945e593d1d53b1845 /int21dos.h | |
parent | a77ce98811ba6040dafec8f75b5387ae5b2813aa (diff) | |
download | vbados-b11d085f98465aae2b5a861066b963fce5aeaae3.tar.gz vbados-b11d085f98465aae2b5a861066b963fce5aeaae3.zip |
add wheel support to win16 mouse driver
Diffstat (limited to 'int21dos.h')
-rw-r--r-- | int21dos.h | 21 |
1 files changed, 19 insertions, 2 deletions
@@ -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) { |