Re: [Freedos-kernel] patch: batch and make files

2004-04-04 Thread Arkady V.Belousov
Hi!

4-Апр-2004 22:41 [EMAIL PROTECTED] (Bernd Blaauw) wrote to
[EMAIL PROTECTED]:

BB> *can anyone point me to a DIFF program?

http://thproxy.jinr.ru/file-archive/mirrors/djgpp/v2gnu/dif28b.zip
http://thproxy.jinr.ru/file-archive/mirrors/djgpp/v2gnu/pat253b.zip

BB> *Can there be a hint as to NASM use?
BB> I did this wrong. Bart's config.b has a line "set NASM=NASM16"
BB> I thought this pointed at a directory.. ofcourse compiling failed :)
BB> so please add a comment like "complete path+filename for 16 bit NASM
BB> executable"

 Just now I made this in my edition. :)

:- define NASM executable. Remember - it should not be protected

BB> Once I have the DIFF tool I can see what Arkady made of his batchfiles.

 To apply patches you should use PATCH (see above). I apply patches with
next batch file:

@if not "%1"=="" patch -fZp1<%1

`p1' mean to omit one level in pathes, which mentioned in diff files (eg,
from "0new\build.bat" will be used only "build.bat" part).




---
This SF.Net email is sponsored by: IBM Linux Tutorials
Free Linux tutorial presented by Daniel Robbins, President and CEO of
GenToo technologies. Learn everything from fundamentals to system
administration.http://ads.osdn.com/?ad_id70&alloc_id638&op=click
___
Freedos-kernel mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/freedos-kernel


Re[2]: [Freedos-kernel] patch: batch and make files

2004-04-04 Thread Kenneth J. Davis
On Sun, 04 Apr 2004 22:41:35 +0200 Bernd Blaauw <[EMAIL PROTECTED]> wrote:

...
BB> *Can there be a hint as to NASM use?
BB> I did this wrong.
BB> Bart's config.b has a line "set NASM=NASM16"
BB> I thought this pointed at a directory.. ofcourse compiling failed :)
BB> so please add a comment like "complete path+filename for 16 bit NASM executable"
BB> and then change nasm16 into nasm16.exe
BB> however [set NASM=NASM16 -> set NASM=NASM16.EXE] means 4 extra bytes of 
environment space.
BB> ( the .EXE part).

If you build on Windows, I found using nasmw.exe tends to work better.

BB> 
BB> Once I have the DIFF tool I can see what Arkady made of his batchfiles. That's 
something I
BB> have a little bit more experience with..to some people's despair sometimes :)

I use DJGPP's diff, it tends to works better than cygwin's on handling DOS and/or Unix 
newlines.
(see htdocs on fdos for diff.exe)

BB> 
BB> kernel compilation worked fine after correcting NASM line.
BB> 
BB> Bernd
BB> 

Off to work,
Jeremy




---
This SF.Net email is sponsored by: IBM Linux Tutorials
Free Linux tutorial presented by Daniel Robbins, President and CEO of
GenToo technologies. Learn everything from fundamentals to system
administration.http://ads.osdn.com/?ad_id=1470&alloc_id=3638&op=click
___
Freedos-kernel mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/freedos-kernel


Re: [Freedos-kernel] patch: batch and make files

2004-04-04 Thread Bernd Blaauw
Arkady V.Belousov schreef:

 2Bernd: thank you.
you're welcome.
I've managed to setup OpenWatcom. Just like Bart said: it's a lot easier than it seems.
Two things though:
*can anyone point me to a DIFF program? I'd like to experiment with some things.
I have almost no C knowledge but by looking at the sourcecode I learn a few things.
I've posted several minor 'bugs' (actually enhancements) at Bugzilla that I might
solve this way all by myself :)
*Can there be a hint as to NASM use?
I did this wrong.
Bart's config.b has a line "set NASM=NASM16"
I thought this pointed at a directory.. ofcourse compiling failed :)
so please add a comment like "complete path+filename for 16 bit NASM executable"
and then change nasm16 into nasm16.exe
however [set NASM=NASM16 -> set NASM=NASM16.EXE] means 4 extra bytes of environment 
space.
( the .EXE part).
Once I have the DIFF tool I can see what Arkady made of his batchfiles. That's 
something I
have a little bit more experience with..to some people's despair sometimes :)
kernel compilation worked fine after correcting NASM line.

Bernd

---
This SF.Net email is sponsored by: IBM Linux Tutorials
Free Linux tutorial presented by Daniel Robbins, President and CEO of
GenToo technologies. Learn everything from fundamentals to system
administration.http://ads.osdn.com/?ad_id=1470&alloc_id=3638&op=click
___
Freedos-kernel mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/freedos-kernel


Re: [Freedos-kernel] patch: batch and make files

2004-04-04 Thread Arkady V.Belousov
Hi!

4-Апр-2004 20:24 [EMAIL PROTECTED] (Bernd Blaauw) wrote to
[EMAIL PROTECTED]:

>> te> btw: there is absolutely no need to mess with them - they usually work.
>>  "they"="BC"? It depends. :)
BB> 'they' = '(your changed) batchfiles'

 2Bernd: thank you.

 2tom: original batch files _almost_ work, but with troubles. Eg, I was
_forced_ to change BC5.MAK, because my TLIB placed _not_ to directory, where
other BC binaries are placed. I was _forced_ to change wlinker.bat, because
input redirection doesn't works for batch files (for me wlink called through
batch file). When I was use original batch files, then I was don't know if
processing was successful or aborted. And I was forced to use option -r for
build.bat after change in options (CPU or FAT support) or compiler to
properly recompile kernel. I think, all of this is sufficient to update
batch and make files to make them better.




---
This SF.Net email is sponsored by: IBM Linux Tutorials
Free Linux tutorial presented by Daniel Robbins, President and CEO of
GenToo technologies. Learn everything from fundamentals to system
administration.http://ads.osdn.com/?ad_id70&alloc_id638&op=click
___
Freedos-kernel mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/freedos-kernel


Re: [Freedos-kernel] patch: batch and make files

2004-04-04 Thread Bernd Blaauw
Arkady V.Belousov schreef:
Hi!

4-Апр-2004 17:55 [EMAIL PROTECTED] (tom ehlert) wrote to "Arkady V.Belousov"
<[EMAIL PROTECTED]>:
AVB>>  I test batch and make files both under OW12 and BC31
te> would be great if you ewoild
 "ewoild"="perform"?

"would" -> 'if you would test them'
te> test them with TV 2.01 also (this is a reference compiler, BC31 not)

 How big is it? Where I may download it (without answering question and
other scripting issues)? If it longer than 3M (www4mail limit), who may send
it to me?
te> btw: there is absolutely no need to mess with them - they usually work.

 "they"="BC"? It depends. :)

'they' = '(your changed) batchfiles'

---
This SF.Net email is sponsored by: IBM Linux Tutorials
Free Linux tutorial presented by Daniel Robbins, President and CEO of
GenToo technologies. Learn everything from fundamentals to system
administration.http://ads.osdn.com/?ad_id70&alloc_id638&op=click
___
Freedos-kernel mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/freedos-kernel


Re: [Freedos-kernel] patch: batch and make files

2004-04-04 Thread Arkady V.Belousov
Hi!

4-Апр-2004 17:55 [EMAIL PROTECTED] (tom ehlert) wrote to "Arkady V.Belousov"
<[EMAIL PROTECTED]>:

AVB>>  I test batch and make files both under OW12 and BC31
te> would be great if you ewoild

 "ewoild"="perform"?

te> test them with TV 2.01 also (this is a reference compiler, BC31 not)

 How big is it? Where I may download it (without answering question and
other scripting issues)? If it longer than 3M (www4mail limit), who may send
it to me?

te> btw: there is absolutely no need to mess with them - they usually work.

 "they"="BC"? It depends. :)




---
This SF.Net email is sponsored by: IBM Linux Tutorials
Free Linux tutorial presented by Daniel Robbins, President and CEO of
GenToo technologies. Learn everything from fundamentals to system
administration.http://ads.osdn.com/?ad_id70&alloc_id638&op=click
___
Freedos-kernel mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/freedos-kernel


Re: [Freedos-kernel] patch: batch and make files

2004-04-04 Thread tom ehlert
Hello Arkady,

AVB>  I test batch and make files both under OW12 and BC31
would be great if you ewoild test them with TV 2.01 also (this is a
reference compiler, BC31 not)

btw: there is absolutely no need to mess with them - they usually
work.

tom




---
This SF.Net email is sponsored by: IBM Linux Tutorials
Free Linux tutorial presented by Daniel Robbins, President and CEO of
GenToo technologies. Learn everything from fundamentals to system
administration.http://ads.osdn.com/?ad_id=1470&alloc_id=3638&op=click
___
Freedos-kernel mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/freedos-kernel


[Freedos-kernel] patch: batch and make files (diff file, 1/2)

2004-04-04 Thread Arkady V.Belousov
--- Begin Message ---
diff -ruNp 0old/build.bat 0new/build.bat
--- 0old/build.bat  2004-03-27 01:42:32.0 +
+++ 0new/build.bat  2004-04-03 10:16:14.0 +
@@ -3,18 +3,22 @@
 :- batch file to build everything
 :- $Id$
 
+:---
 :- Syntax: BUILD [-r] [fat32|fat16] [msc|wc|tc|tcpp] [86|186|386]
 :- option case is significant !!
+:---
 
-if "%1" == "-r" call clobber
-if "%1" == "-r" shift
+set XERROR=1
+if "%XERROR%" == "" goto noenv
 
-set XERROR=
+if "%1" == "-r" call clobber.bat
+if "%1" == "-r" shift
 
 if not exist config.bat echo You must copy CONFIG.B to CONFIG.BAT and edit it to 
reflect your setup!
 if not exist config.bat goto abort
 
-call config
+call config.bat
+if "%LAST%" == "" goto noenv
 
 :---
 :- following is command line handling
@@ -41,7 +45,8 @@ if not "%1" == "" goto loop_commandline
 if "%COMPILER%" == "" echo you MUST define a COMPILER variable in CONFIG.BAT
 if "%COMPILER%" == "" goto abort
 
-call default
+call defaults.bat
+if "%LAST%" == "" goto noenv
 
 :---
 :- finally - we are going to compile
@@ -51,50 +56,51 @@ echo.
 echo Process UTILS ++
 echo.
 cd utils
-%MAKE% production
+call %MAKE% production
 if errorlevel 1 goto abort-cd
 
 echo.
 echo Process LIB 
 echo.
 cd ..\lib
-%MAKE%
+call %MAKE%
 if errorlevel 1 goto abort-cd
 
 echo.
 echo Process DRIVERS 
 echo.
 cd ..\drivers
-%MAKE% production
+call %MAKE% production
 if errorlevel 1 goto abort-cd
 
 echo.
 echo Process BOOT +++
 echo.
 cd ..\boot
-%MAKE% production
+call %MAKE% production
 if errorlevel 1 goto abort-cd
 
 echo.
 echo Process SYS 
 echo.
 cd ..\sys
-%MAKE% production
+call %MAKE% production
 if errorlevel 1 goto abort-cd
 
 echo.
 echo Process KERNEL +
 echo.
 cd ..\kernel
-%MAKE% production
+call %MAKE% production
 if errorlevel 1 goto abort-cd
 
 cd ..
 
-:- if you like, put some finalizing commands (like copy to floppy)
-:- into build2.bat
+:- if you like, put finalizing commands (like copy to floppy) into build2.bat
+
+set XERROR=
 
-if exist build2.bat call build2
+if exist build2.bat call build2.bat
 
 echo.
 echo Processing is done.
@@ -104,9 +110,9 @@ goto end
 
 :abort-cd
 cd ..
+:noenv
 :abort
 echo Compilation was aborted!
-set XERROR=1
 
 :end
-default clearset
+defaults.bat clearset
diff -ruNp 0old/buildall.bat 0new/buildall.bat
--- 0old/buildall.bat   2004-03-27 01:42:32.0 +
+++ 0new/buildall.bat   2004-03-31 13:25:20.0 +
@@ -3,62 +3,54 @@
 :- $Id$
 
 :--
-:- batch file to build _many_ KERNELS, hope build works
+:- batch file to build _many_ KERNELS, hope build works.
 :- takes 3 minutes on my(TE) Win2K/P700. your milage may vary :-)
 :--
 
 if "%1" == "$SUMMARY" goto summary
 
-set onerror=if not "%%XERROR%%" == "" goto daswarwohlnix
+call config.bat
+if "%LAST%" == "" goto end
 
 :* MSCL kernels
 
-call config.bat
+if "%MSCL8_BASE%" == "" goto no_ms
+   call build.bat -r msc 386 fat16
+if "%XERROR%" == "" call build.bat -r msc 186 fat16
+if "%XERROR%" == "" call build.bat -r msc  86 fat16
+if "%XERROR%" == "" call build.bat -r msc 386 fat32
+if "%XERROR%" == "" call build.bat -r msc 186 fat32
+if "%XERROR%" == "" call build.bat -r msc  86 fat32
 
-if "%MS_BASE%" == "" goto no_ms
-call build -r msc 386 fat16
-%ONERROR%
-call build -r msc 186 fat16
-%ONERROR%
-call build -r msc  86 fat16
-%ONERROR%
-call build -r msc 386 fat32
-%ONERROR%
-call build -r msc 186 fat32
-%ONERROR%
-call build -r msc  86 fat32
-%ONERROR%
+if not "%XERROR%" == "" goto daswarwohlnix
 :no_ms
 
 :* TC 2.01 kernels
 
 if "%TC2_BASE%" == "" goto no_tc
-call build -r tc   186 fat16
-%ONERROR%
-call build -r tc86 fat16
-%ONERROR%
-call build -r tc   186 fat32
-%ONERROR%
-call build -r tc86 fat32
-%ONERROR%
+   call build.bat -r tc 186 fat16
+if "%XERROR%" == "" call build.bat -r tc  86 fat16
+if "%XERROR%" == "" call build.bat -r tc 186 fat32
+if "%XERROR%" == "" call build.bat -r tc  86 fat32
+
+if not "%XERROR%" == "" goto daswarwohlnix
 :no_tc
 
 :* (Open) Watcom kernels
 
 if "%WATCOM%" == "" goto no_wc
-call build -r wc386 fat32
-%ONERROR%
-call build -r wc386 fat16
-%ONERROR%
-call build -r wc 86 fat32
-%ONERROR%
-call build -r wc 86 fat16
-%ONERROR%
+   call build.bat -

[Freedos-kernel] patch: batch and make files (diff file, 2/2)

2004-04-04 Thread Arkady V.Belousov
--- Begin Message ---
diff -ruNp 0old/kernel/kernel.cfg 0new/kernel/kernel.cfg
--- 0old/kernel/kernel.cfg  2001-07-09 23:19:32.0 +
+++ 0new/kernel/kernel.cfg  1970-01-01 00:00:00.0 +
@@ -1,14 +0,0 @@
--1-
--f-
--ff-
--O
--Z
--d
--k-
--vi-
--w
--wpro
--weas
--wpre
--I..\hdr
--v -X- -I. -D__STDC__=0 -DTSC -DDEBUG -DKERNEL -DI86 -DPROTO -DSHWR -DASMSUPT
diff -ruNp 0old/kernel/makefile 0new/kernel/makefile
--- 0old/kernel/makefile2004-01-25 22:37:20.0 +
+++ 0new/kernel/makefile2004-04-03 12:41:04.0 +
@@ -6,36 +6,18 @@
 
 !include "../mkfiles/generic.mak"
 
-RELEASE = 1.00
-
-# Compiler and Options 
-
-INCLUDE=..\hdr
-LIB=$(COMPILERBASE)\lib
-
-LIBPATH = .
-#AFLAGS  = /Mx /DSTANDALONE=1 /I..\HDR
-
-LIBS=..\lib\device.lib ..\lib\libm.lib
-#INITCFLAGS =$(ALLCFLAGS) -zAINIT -zCINIT_TEXT -zDIB -zRID -zTID -zPIGROUP -zBIB \
-#-zGIGROUP -zSIGROUP
-#CFLAGS =$(ALLCFLAGS) -zAHMA -zCHMA_TEXT
+LIBS=..\lib\device.lib ..\lib\libm.lib
 HDR=../hdr/
 
-#   *Implicit Rules*
-# 'standard' compiles
-
-.c.obj :
-   $(CC) $(CFLAGS) $<
-
-#   *List Macros*
-
+# *List Macros*
+# only 8 files per definition; this is limitation of DOS batch
+# files (only 9 directly accessible parameters).
 
 OBJS1=kernel.obj entry.obj io.obj console.obj serial.obj printer.obj dsk.obj \
 sysclk.obj
 OBJS2=asmsupt.obj execrh.obj nlssupt.obj procsupt.obj dosidle.obj int2f.obj \
 nls_hc.obj
-OBJS3= apisupt.obj intr.obj irqstack.obj blockio.obj chario.obj systime.obj \
+OBJS3=apisupt.obj intr.obj irqstack.obj blockio.obj chario.obj systime.obj \
 error.obj
 OBJS4=break.obj dosfns.obj fatdir.obj fatfs.obj fattab.obj fcbfns.obj \
 inthndlr.obj
@@ -43,184 +25,177 @@ OBJS5=ioctl.obj dosnames.obj memmgr.obj 
 OBJS6=prf.obj misc.obj strings.obj syspack.obj lfnapi.obj
 OBJS7=main.obj config.obj initoem.obj inithma.obj dyninit.obj iprf.obj \
 initdisk.obj initclk.obj
-OBJS = $(OBJS1) $(OBJS2) $(OBJS3) $(OBJS4) $(OBJS5) $(OBJS6) $(OBJS7)
+OBJS=$(OBJS1) $(OBJS2) $(OBJS3) $(OBJS4) $(OBJS5) $(OBJS6) $(OBJS7)
 
 #   *Explicit Rules*
 
-production: ..\bin\kernel.sys
+production:..\bin\$(TARGET).sys
 
-..\bin\kernel.sys: kernel.sys
+..\bin\$(TARGET).sys: kernel.sys
copy kernel.sys ..\bin
-   copy kernel.sys ..\bin\$(THETARGET).sys
-   copy kernel.map ..\bin\$(THETARGET).map
+   copy kernel.sys ..\bin\$(TARGET).sys
+   copy kernel.map ..\bin\$(TARGET).map
 
 kernel.sys:kernel.exe ..\utils\exeflat.exe
$(XUPX) kernel.exe
..\utils\exeflat kernel.exe kernel.sys 0x60 -S0x10 -S0x8B $(UPXOPT)
 
-clobber:clean
+kernel.exe:$(TARGET).lnk $(OBJS) $(LIBS)
+   $(LINK) @$(TARGET).lnk;
+
+clobber:   clean
-$(RM) kernel.exe kernel.sys status.me
 
 clean:
-   -$(RM) *.res *.obj *.bak *.crf *.xrf *.map *.lst *.cod *.err *.lnk
+   -$(RM) *.obj *.bak *.crf *.xrf *.map *.lst *.cod *.err *.lnk
 
 # XXX: This is a very ugly way of linking the kernel, forced upon us by the
 # inability of Turbo `make' 2.0 to perform command line redirection. -- ror4
 
 ECHOTO=..\utils\echoto
 
-kernel.res: $(OBJS) $(LIBS)
-   -$(RM) kernel.res
-   $(ECHOTO) kernel.res $(OBJS1)+
-   $(ECHOTO) kernel.res $(OBJS2)+
-   $(ECHOTO) kernel.res $(OBJS3)+
-   $(ECHOTO) kernel.res $(OBJS4)+
-   $(ECHOTO) kernel.res $(OBJS5)+
-   $(ECHOTO) kernel.res $(OBJS6)+
-   $(ECHOTO) kernel.res $(OBJS7)
-   $(ECHOTO) kernel.res kernel.exe
-   $(ECHOTO) kernel.res kernel.map
-   $(ECHOTO) kernel.res $(LIBS)
-
-kernel.exe: kernel.res $(OBJS) $(LIBS)
-   $(LINK) @kernel.res;
+$(TARGET).lnk: turboc.cfg makefile ..\mkfiles\generic.mak ..\mkfiles\$(COMPILER).mak
+   -$(RM) *.lnk
+   $(ECHOTO) $(TARGET).lnk $(OBJS1)+
+   $(ECHOTO) $(TARGET).lnk $(OBJS2)+
+   $(ECHOTO) $(TARGET).lnk $(OBJS3)+
+   $(ECHOTO) $(TARGET).lnk $(OBJS4)+
+   $(ECHOTO) $(TARGET).lnk $(OBJS5)+
+   $(ECHOTO) $(TARGET).lnk $(OBJS6)+
+   $(ECHOTO) $(TARGET).lnk $(OBJS7)
+   $(ECHOTO) $(TARGET).lnk kernel.exe
+   $(ECHOTO) $(TARGET).lnk kernel.map
+   $(ECHOTO) $(TARGET).lnk $(LIBS)
 
 #   *Individual File Dependencies*
-kernel.obj: kernel.asm segs.inc ludivmul.inc
-
-console.obj: console.asm io.inc
 
-printer.obj: printer.asm io.inc
+kernel.obj:kernel.asm segs.inc ludivmul.inc$(TARGET).lnk
 
-serial.obj: serial.asm io.inc
+console.obj:   console.asm io.inc  $(TARGET).lnk
 
-entry.obj: entry.asm segs.inc $(HDR)stacks.inc
+printer.obj:   printer.asm io.inc  $(TARGET).lnk
 
-apisupt.obj: apisupt.asm segs.inc
+serial.obj:serial.asm io.inc   $(TARGET).lnk
 
-execrh.obj: execrh.asm segs.inc
+entry.obj: