aboutsummaryrefslogtreecommitdiff
path: root/utils.h
diff options
context:
space:
mode:
authorJavier <dev.git@javispedro.com>2022-04-06 02:44:24 +0200
committerJavier <dev.git@javispedro.com>2022-04-06 02:44:24 +0200
commitca5128008df77599a6a993caa550e0502d95ef8d (patch)
tree383c67f5d4546f31fbc01272905af6c032daa4b0 /utils.h
parent51cdb6b523be973e802cc940c6ac54cc8a50b802 (diff)
downloadvbados-ca5128008df77599a6a993caa550e0502d95ef8d.tar.gz
vbados-ca5128008df77599a6a993caa550e0502d95ef8d.zip
implement autoinstallation to upper memory
Diffstat (limited to 'utils.h')
-rw-r--r--utils.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/utils.h b/utils.h
index c7db435..6cc74da 100644
--- a/utils.h
+++ b/utils.h
@@ -11,6 +11,9 @@
static inline void breakpoint(void);
#pragma aux breakpoint = 0xcd 0x03;
+static inline __segment get_cs(void);
+#pragma aux get_cs = "mov ax, cs" value [ax] modify exact [];
+
/** Map x linearly from range [0, srcmax] to [0, dstmax].
* Equivalent of (x * dstmax) / srcmax but with 32-bit unsigned precision. */
static unsigned scaleu(unsigned x, unsigned srcmax, unsigned dstmax);