17 Commits
Author SHA1 Message Date
cracyc 8457fc0e22 Implemented a whole bunch of 16-bit APIs. OS/2 1.0's cmd.exe sort of works!
(Most of this work was cracyc's effort, but I started tweaking it before
I thought to perform a commit.  --ryan.)
2018-06-18 15:52:58 -04:00
Ryan C. Gordon 3e83a67d48 Let OS2APIINFO optionally take key/value pairs, use it for export names.
This lets me remove my tcpip32 hack, and will let me export old symbols
as all caps for OS/2's use and something more sane for regular use
(like VioGetCurPos() in modern times is VIOGETCURPOS in viocalls.dll, etc).
2018-06-17 22:21:52 -04:00
Ryan C. Gordon 6821de5ed7 Automate handling of support code for OS/2 binaries.
Now a perl script parses our headers and generates glue code, export tables,
etc. This automates all the macro nonsense and bridge code, and separates
out all the stuff you need for binary compat with OS/2, so you can remove it
all from the build if you want to just build native libraries that supply
the OS/2 API to native apps (like Winelib vs Wine).

This makes upkeep details less nasty, and easier to build native binaries
when implementing and improving APIs, so you can debug directly without
a lot of drama.
2018-02-27 03:25:21 -05:00
Ryan C. Gordon dcf40e843b Added header comments to everything. 2018-02-26 12:54:16 -05:00
Ryan C. Gordon b6c47ee91d Implemented enough of the Presentation Manager API to draw a blank window. 2018-01-15 02:33:27 -05:00
Ryan C. Gordon b72ccd6e5a Implemented just enough of tcpip32.dll and dependencies to run FINGER.EXE.
Finger (etc) also rely on MPTN\DLL\tnls32.dll, which I pulled out a copy of
OS/2 Warp 4.52, which loads and limps along enough to not be a problem.
Reimplementing that library is going to be a pain, so that's a job for another
day. Inexplicably, tnls32 references pmgpi.dll's GpiQueryTextBox(), so I put a
stub for that in, too, but we're nowhere near really implementing GPI yet.

This is enough to run "finger.exe icculus@icculus.org" and see my .plan file,
which I consider a victory. A few more TCP/IP command line tools aren't far
behind.
2017-12-21 17:53:05 -05:00
Ryan C. Gordon 20d2bfa3ff Split out OS2EXPORT from OS2API.
Otherwise, "SomeObj * OS2API FunctionName()" won't work.
2017-12-20 18:31:48 -05:00
Ryan C. Gordon 9251abfe4f Filled in stubs for QUECALLS library. 2016-10-29 23:53:47 -04:00
Ryan C. Gordon c4d2d5ee15 Some initial VIOCALLS support via ncurses, other 16-bit updates. 2016-10-29 02:05:01 -04:00
Ryan C. Gordon 411c204ccb Just enough to get wasm.exe to not crash prompting for the Any key.
This lets the program survive if you run it without command line arguments.
2016-10-27 03:17:23 -04:00
Ryan C. Gordon 26a52988a6 16-bit support!
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.
2016-10-27 01:44:26 -04:00
Ryan C. Gordon dc00a7e998 Implemented more APIs. Watcom C's "wasm.exe" works now. 2016-10-17 02:35:39 -04:00
Ryan C. Gordon 544033f2ae Some APIs that Watcom's wasm.exe needs to start up. 2016-10-15 22:08:00 -04:00
Ryan C. Gordon 0349122bd7 Bunch More Work: more APIs, subprocesses, multithreading.
EMX's GCC compiler can now build hello.c when run from lx_loader!
2016-10-14 02:39:17 -04:00
Ryan C. Gordon 262b428f51 Implemented DosGetDateTime() and DosOpen(). 2016-10-06 15:56:20 -04:00
Ryan C. Gordon f681be1b1f Reworked the native module loading code. 2016-10-02 18:18:31 -04:00
Ryan C. Gordon bee2afe62b Bunch More Work, mostly cleanup and organization.
Wanted to do this now before it gets out of hand.

Ideally, this can be used for a Winelib-like option eventually, too, where you
don't load OS/2 binaries at all but rather compile and link your OS/2-based
source code against this API reimplementation.
2016-09-30 15:58:48 -04:00