diff options
Diffstat (limited to 'utils.h')
-rw-r--r-- | utils.h | 3 |
1 files changed, 3 insertions, 0 deletions
@@ -14,6 +14,9 @@ static inline void breakpoint(void); static inline __segment get_cs(void); #pragma aux get_cs = "mov ax, cs" value [ax] modify exact []; +static inline __segment get_ds(void); +#pragma aux get_ds = "mov ax, ds" 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); |