aboutsummaryrefslogtreecommitdiff
path: root/unixtime.h
diff options
context:
space:
mode:
Diffstat (limited to 'unixtime.h')
-rw-r--r--unixtime.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/unixtime.h b/unixtime.h
index 7dc4824..92e2b0c 100644
--- a/unixtime.h
+++ b/unixtime.h
@@ -51,6 +51,10 @@ static void timestampns_to_dos_time(uint16_t __far *dos_time, uint16_t __far *do
int per_year, per_month;
bool is_leap;
+ // Since we can only run on >= 386 anyway, let's do the initial
+ // 64-bit division and the rest of 32-bit divisions/modulos
+ // in asm using 386 32-bit instructions.
+
__asm {
push eax /* Preserve 32-bit regs */
push ecx