Hello Jim,

If I swap the comparisons, the gcc-ia16 compiled program works correctly.

Thanks! I've fixed it in source and checked the change into svn on SourceForge:

https://sourceforge.net/p/simple-senet/code/HEAD/tree/trunk/src/senet.c#l138

Thank you!

Can you also share your command line to build with IA-16 GCC and
Libi86? I'm planning to remove the Makefile and instead create a
BUILD.BAT file that builds everything from source. It's a small
project; it doesn't need a Makefile. A simple BAT file will do the job
just fine and will be easier for others to read.

Here is what I did:

if "%DJGPP%"=="" if "%DJDIR%"=="" set DJDIR=%DOSDIR%\..\devel\djgpp
echo -Os -v -I..\include >senet.rsp
echo senet.c board.c play.c sticks.c win.c >>senet.rsp
echo -o senet.exe -li86 >>senet.rsp
call i16gcc @senet.rsp

This should output a tiny-model senet.exe.  (The -v option just makes
the compiler passes more verbose and is not really needed.)

Some notes:

(1)  I am cheating a bit with the `set DJDIR=...' here.  i16gcc.exe
really expects the DJGPP base environment to be properly installed
(http://www.delorie.com/pub/djgpp/current/v2/readme.1st).  It will still
work correctly even if DJGPP base is not there though, as long as
%DJDIR% points to where the DJGPP base should really be.

(2)  I pass options to GCC using a `@' switch: one reason is that the
complete GCC command line might generally be longer than what DOS could
handle.  A more important reason is that --- at least under fdnpkg <
0.99.6 --- i16gcc on %PATH% might be a batch file which might not
properly pass all options to the actual i16gcc.exe.  (fdnpkg 0.99.6 and
above fixes this.)

Sounds like that was the only change needed? Let me know and I'll make

an updated "1.1" (or maybe "1.0A"?) release with this source change.

Yes, that was the only change needed (the other needed changes were on
the libi86 end).  Thank you!

--
https://gitlab.com/tkchia :: https://github.com/tkchia


_______________________________________________
Freedos-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/freedos-devel

Reply via email to