Back to home page

DOS ain't dead

Forum index page

Log in | Register

Back to the forum
Board view  Mix view

FPC 2.6.4 released! (Announce)

posted by Rugxulo(R) Homepage, Usono, 23.03.2014, 10:50

> Anyways, it actually seems that yesterday's i8086 (WmTiny) snapshot
> "mostly" works okay under HX (DPMILDR=128). I say "mostly" because I didn't
> fully automate the testing process (due to aforementioned unincorporated
> kludges), nor yet compare binaries' md5sum made atop proper modern Windows.
> So I'll have to try testing more properly later this week.

Here is the automated script I wrote and tested (kludge warning!):

@echo off
REM Sunday, March 23, 2014

if "%DOSDIR%"=="" set DOSDIR=c:\fdos
if "%GSED%"=="" set GSED=gsed
if "%RAMDRIVE%"=="" goto end
md \pp16
cd \pp16

md \others
ctty nul
for %%a in (cwstub wlib wlink) do copy /b c:\c\watcom19\binw\%%a.exe \others
for %%a in (nasm unzip gsed cwsdpmi) do copy /b c:\utils\%%a.exe \others
ren \others\cwstub.exe dos4gw.*
ctty con

REM ... LFNs are mandatory, but OW 1.9 doesn't use them (but 2.0-pre???) ...
ctty nul
ctty con

REM ... HX is mandatory, this is a Win32-hosted (PE) cross-compiler ...
if not exist c:\hx\bin\hdpmi32.exe goto end

set F1=c:\temp\fpc\8086\
if not "%1"=="" if exist %1 set F1=%1
if exist %F1% goto unzipit
set F1=
goto end
unzip -q %F1%
set F1=

path %RAMDRIVE%:\others;c:\hx\bin;%RAMDRIVE%:\pp16\bin\i386-w~1
hxldr32 -q
set DPMILDR=128

REM ... "-s" generates ppas.bat script (still necessary, for now)
unzip -qCj c:\temp\fpc\8086\fpc-i8086-msdos-go32v2hosted.old "*demo\*"

REM 2.7.1 2014/03/22 win32 msdos
echo on
ppcross8086 -iV -iD -iSO -iTO
ppcross8086 -CX -XX -Xs -Fuunits\msdos\rtl-console -s fpctris
@echo off


%GSED% -i -e "s/rtl-console/rtl-co~1/" link.res

REM ... begin sed hack for fpctris_ppas.bat here ...
echo #n>>make.sed
echo s/.*\(wlib\.exe -q -fo -c \)\(.*\)\.a.*/cd \\>>make.sed
echo "dir \/b *.o > \2.rsp\"|%GSED% -e "s/^.//" -e "s/.$//" >>make.sed
echo \1 -n ..\\\2.a @\2.rsp\>>make.sed
echo del \2.rsp\>>make.sed
echo cd../>>make.sed
echo /echo Assembling/s/^/REM />>make.sed
echo s/.*\(wlink\.exe\)  */\1 op q />>make.sed
echo w make.bat>>make.sed
REM ... end sed hack for fpctris_ppas.bat here ...

%GSED% -f make.sed ppas.bat

if not exist make.bat goto end

echo ... Press Ctrl-C if you need to edit MAKE.BAT manually first! ...

call make.bat
if not exist fpctris.exe goto end
dir fpctris.exe | %DOSDIR%\find /i "exe"
set W=c:\temp\fpc\8086\
for %%a in (comp md5sum) do call %DOSDIR%\%%a fpctris.exe %W%
set W=

REM DOS = f4f4c345dce1c949d021115ed04611b1  fpctris.exe
REM WIN = f4f4c345dce1c949d021115ed04611b1  fpctris.exe

if "%GSED%"=="gsed" set GSED=

ctty nul
hxldr32 -u
c:\utils\doslfn -u
ctty con

path %OLDPATH%


The main problems are PPAS.BAT running WLIB with one really long cmdline (or, worse, splitting into two [fpctris 91..11, 10..1], which makes my kludge run twice unnecessarily). The longest line there is 2064 bytes, which is way beyond reasonable. Again, if FPC was smart enough to make the response files itself, that would solve this problem. As is, it's a very tedious kludge just to get things to work. Oh, and sometimes, depending on where WLIB + WLINK are found, it puts their full path in quotes, which breaks my kludge.

ppas.bat :

g:\others\wlib.exe -q -fo -c gameunit.a\GameUnit0s36.o\GameUnit0s35.o\GameUnit0s34.o ...\GameUnit0s1.o
if errorlevel 1 goto linkend

make.bat :

dir /b *.o > gameunit.rsp
wlib.exe -q -fo -c -n ..\gameunit.a @gameunit.rsp
del gameunit.rsp
if errorlevel 1 goto linkend


Complete thread:

Back to the forum
Board view  Mix view
15108 Postings in 1358 Threads, 245 registered users, 16 users online (0 registered, 16 guests)
DOS ain't dead | Admin contact
RSS Feed
powered by my little forum