Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
This gets us everything we need (I hope!) to support 16-bit code in LX binaries and call into 16-bit OS/2 APIs. This is just enough to call into VioGetMode() (which isn't otherwise implemented yet) as an example. If this is ever used Winelib-style to provide an OS/2 API to native Linux binaries, the 16-bit system APIs are 32-bit clean and C callable, as one might expect them to be. All the tapdancing is to support existing LX binaries in the loader and bridge between the 32-bit clean APIs and existing 16-bit code that expects to call 16-bit APIs. This was a staggering amount of effort, but yay! Other fixes and improvements probably leaked into this commit, as a lot of code got touched and a lot of research and debugging took place.
- Loading branch information
Showing
10 changed files
with
694 additions
and
57 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
#!/usr/bin/perl -w | ||
|
||
# run this on the output from ndisasm. | ||
|
||
use warnings; | ||
use strict; | ||
|
||
while (<>) { | ||
chomp; | ||
my ($bytes, $asm) = /\A.*?\s+(.*?)\s+(.*)\Z/; | ||
my $first = 1; | ||
while ($bytes ne '') { | ||
$bytes =~ s/\A(..)//; | ||
my $hex = $1; | ||
if ($first and ($bytes eq '')) { | ||
print(" *(ptr++) = 0x$hex; /* $asm */\n"); | ||
} elsif ($first) { | ||
print(" *(ptr++) = 0x$hex; /* $asm... */\n"); | ||
} else { | ||
print(" *(ptr++) = 0x$hex; /* ...$asm */\n"); | ||
} | ||
$first = 0; | ||
} | ||
} | ||
|
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.