SvarDOS / edrdos

Enhanced DR-DOS kernel and command interpreter ported to JWasm and OpenWatcom C
http://svardos.org/
Other
25 stars 2 forks source link

compbios and compbdos port to ia16 gcc / libi86 #54

Closed ecm-pushbx closed 3 months ago

ecm-pushbx commented 5 months ago

As mentioned in https://github.com/SvarDOS/edrdos/issues/53

This is the main patch: https://hg.pushbx.org/ecm/edrdos/rev/15f49e42bfae

And here's a patch I missed at first, the casts have to be specified as far too: https://hg.pushbx.org/ecm/edrdos/rev/3f83aad9522a

boeckmann commented 5 months ago

Nice, this should also work on Watcom, so I will pull your change. Do you have problems with IA16-GCC regarding the large memory model, or do you stick to small memory model for reason of size? I did not yet get the IA16-GCC large memory model to work for my MacOS build.

ecm-pushbx commented 5 months ago

I don't think models with multiple data segment are supported yet, which is why I did it this way.

ecm-pushbx commented 5 months ago

(Do correct me if I need to update my toolchain.)

boeckmann commented 4 months ago

I noticed there are some implementation-specific x86 __far pointer attributes in the source. I'd like the sources for COMPBIOS and COMPDOS to be compilable under other OSes than DOS / Windows, and therefore for the moment decided against importing these changes.

ecm-pushbx commented 4 months ago

I could prepare a patch that uses defines for the far keywords and functions, so that they could be used when compiling for 16-bit DOS and omitted / fall back to non-far otherwise. Sound good?

boeckmann commented 4 months ago

I could prepare a patch that uses defines for the far keywords and functions, so that they could be used when compiling for 16-bit DOS and omitted / fall back to non-far otherwise. Sound good?

Sounds good :)

ecm-pushbx commented 4 months ago

I forgot about this for a while. Here's the patch: https://hg.pushbx.org/ecm/edrdos/rev/729bae2f79d7 Or if you prefer one patch for all the changes to the tools, use hg d ltools/ -r e856dafe8fa2 which I wrote to http://pushbx.org/ecm/test/20240510.dif

In this revision, I'm dispatching based on whether __FAR is defined.

boeckmann commented 4 months ago

Thanks! Compiles beautifully under Watcom :) I simply copied over the files from your tip and let Git do the rest. 58e26d4fa56b077978b5351753e3d42a5ec78566