Skip to content

Return clock() with the high word in DX - #722

Merged
enusbaum merged 1 commit into
mbbsemu:masterfrom
BradAF:fix/clock-dx-ax
Oct 19, 2026
Merged

enusbaum merged 1 commit into
mbbsemu:masterfrom
BradAF:fix/clock-dx-ax

Conversation

@BradAF

@BradAF BradAF commented Oct 19, 2026

Copy link
Copy Markdown
Contributor

clock() returns a 32-bit clock_t in DX:AX, with DX holding the high word. The two words were swapped, so the module saw a value that wrapped around every 65.5 seconds and changed sign every 32.8, breaking any elapsed-time arithmetic done with it.

clock() returns a 32-bit clock_t in DX:AX, with DX holding the high
word. The two words were swapped, so the module saw a value that
wrapped around every 65.5 seconds and changed sign every 32.8, breaking
any elapsed-time arithmetic done with it.

Adds clock_Test.
@enusbaum
enusbaum merged commit 9ebf07f into mbbsemu:master Oct 19, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants