Final changes for kernel 2029

git-svn-id: https://svn.code.sf.net/p/freedos/svn/kernel/trunk@543 6ac86273-5f31-0410-b378-82cca8765d1b
This commit is contained in:
Bart Oldeman 2003-03-15 04:18:09 +00:00
parent a54e7ab2bf
commit bf5d83c016
9 changed files with 97 additions and 85 deletions

View File

@ -17,32 +17,37 @@ You will also need to download the latest version of NASM and Turbo C
where) and then be sure to edit the CONFIG.MAK file to reflect where where) and then be sure to edit the CONFIG.MAK file to reflect where
you put the tools. you put the tools.
*TE******* Make sure to use the NASMR version, as the DosExtender version You can find NASM at http://nasm.sourceforge.net. Version 0.98.36 is
_seems_ to produce wrong code. the tested version is strongly recommended. The older 0.98 will also work fine, but
NASM98R, 06/04/99, 202.606 bytes. any version in between is likely to fail. It's best to use a NASM
*Bart***** This is probably only true for Windows NT/2k/XP; In that that is native to your host; that is, when compiling in Windows, use
case you could use the Win32 version anyway. the win32 version. The DJGPP version is less likely to run out of
Look at memory than the DOS version.
ftp://ftp.kernel.org/pub/software/devel/nasm
or a mirror of ftp.kernel.org.
Optionally, the kernel can be compressed using UPX. You can find
UPX at http://upx.sourceforge.net. Simply adjust config.bat to
enable it.
This kernel will now compile with Turbo C 2.01 (now freely This kernel will now compile with Turbo C 2.01, Turbo C++ 1.01 (now freely
available!), Turbo C 3.0, Borland C 4.51 & 5.01. It should work with available!), Turbo C 3.0, Borland C 4.51 & 5.01. It should work with
other Borland compilers, Microsoft C and Watcom C. other Borland compilers, Microsoft C and (Open)Watcom C.
The Watcom C 11.0c beta compiler for DOS can now be downloaded at The OpenWatcom 1.0 compiler for DOS can now be downloaded at
www.openwatcom.org: you need at least the following zips from www.openwatcom.org: you need at least the following zips from
ftp://ftp.openwatcom.org/watcom/zips/ ftp://ftp.openwatcom.org/watcom/zips/
core_all - Core binaries (All hosts) cm_core_all - Core binaries (All hosts)
clib_hdr - C runtime library header files cm_clib_hdr - C runtime library header files
cm_clib_a16 - C runtime libraries (16-bit all targets)
clib_a16 - C runtime libraries (16-bit all targets) clib_a16 - C runtime libraries (16-bit all targets)
cm_clib_d16 - C runtime libraries (16-bit DOS)
clib_d16 - C runtime libraries (16-bit DOS) clib_d16 - C runtime libraries (16-bit DOS)
core_binw - Core binaries (DOS host) cm_core_dos - Core binaries (DOS host)
c_binw - C compiler (DOS host) core_doswin - Core binaries (DOS & Win16 hosts)
c_doswin - C compiler (DOS & Win16 hosts)
ext_dos4gw - DOS/4GW DOS extender
Replace binw by binnt for an NT host or binp for an OS/2 host. Replace "dos" by "nt" for an NT/Win9x host or "os2" for an OS/2 host.
The host needs to be a 386+ with at least 8MB of memory. The host needs to be a 386+ with at least 8MB of memory.
If you feel hardy, read on to understand the directory structure. A If you feel hardy, read on to understand the directory structure. A

View File

@ -1,3 +1,22 @@
2002 Mar 14 - Build 2029
-------- Bart Oldeman (bart@dosemu.org)
+ Changes Tom
* fattab.c, fat.h removed the wrong ELSE_ISFAT32()
* fatfs.c: rmdir would crash if you rmdir'ed an existing file
* config.c, main.c, portab.h
implement INSTALL and INSTALLHIGH for config.sys
basic COUNTRY=xxx support (with a little help from others,
mentioned in config.c)
* execrh.asm: save si, di for strategy device driver handler
* (adjusted by Bart): the internal "truename" has to reject
wildcards for all commands except for the exposed "truename"
(DosTrueName, int21/ah=60), FindFirst and FCB functions.
+ Changes Bart
* add top level makefile with list of files to zip for releases
* remove obsolete documentation and intr.h
* eliminated the "f_highwater" fnode field.
* reintroduced HMA_TEXT segment and adjust segments in libm.lib
to solve problems with Borland compilers.
2002 Dec 9 - Build 2028 2002 Dec 9 - Build 2028
-------- Bart Oldeman (bart@dosemu.org) -------- Bart Oldeman (bart@dosemu.org)
+ Changes Tom + Changes Tom

View File

@ -14,7 +14,7 @@ the FreeDOS Kernel.
Contents of zip files: Contents of zip files:
ke20xx_16.zip : binaries for 8086, FAT16 ke20xx_16.zip : binaries for 8086, FAT16
ke20xx_32.zip : binaries for 80386, FAT16,FAT32 ke20xx_32.zip : binaries for 8086, FAT16, FAT32
ke20xxsrc.zip : sources for the kernel ke20xxsrc.zip : sources for the kernel
BUG REPORTS BUG REPORTS

View File

@ -5,7 +5,7 @@
#pragma warning(disable:4103) #pragma warning(disable:4103)
#endif #endif
#pragma pack(1) #pragma pack(1)
#elif defined(_QC) || defined(__WATCOM__) #elif defined(_QC) || defined(__WATCOM__) || defined(__GNUC__)
#pragma pack(1) #pragma pack(1)
#elif defined(__ZTC__) #elif defined(__ZTC__)
#pragma ZTC align 1 #pragma ZTC align 1

View File

@ -1,4 +1,4 @@
#if defined (_MSC_VER) || defined(_QC) || defined(__WATCOMC__) #if defined (_MSC_VER) || defined(_QC) || defined(__WATCOMC__) || defined(__GNUC__)
#pragma pack() #pragma pack()
#elif defined (__ZTC__) #elif defined (__ZTC__)
#pragma ZTC align #pragma ZTC align

View File

@ -28,25 +28,9 @@
#include "portab.h" #include "portab.h"
#if defined(DEBUG) || defined(FORSYS) || defined(_INIT)
#ifdef FORSYS #ifdef FORSYS
#include <io.h> #include <io.h>
#include <stdarg.h> #include <stdarg.h>
#else
/* copied from bcc (Bruce's C compiler) stdarg.h */
typedef char *va_list;
#define va_start(arg, last) ((arg) = (char *) (&(last)+1))
#define va_arg(arg, type) (((type *)(arg+=sizeof(type)))[-1])
#define va_end(arg)
#endif
/*#define DOSEMU */
#ifdef DOSEMU
#define MAX_BUFSIZE 80 /* adjust if necessary */
static int buff_offset = 0;
static char buff[MAX_BUFSIZE];
#endif #endif
#ifdef _INIT #ifdef _INIT
@ -65,33 +49,14 @@ static BYTE *prfRcsId =
"$Id$"; "$Id$";
#endif #endif
static BYTE *charp = 0;
STATIC VOID handle_char(COUNT);
STATIC VOID put_console(COUNT);
STATIC BYTE * ltob(LONG, BYTE *, COUNT);
STATIC COUNT do_printf(CONST BYTE *, REG va_list);
int CDECL printf(CONST BYTE * fmt, ...);
/* The following is user supplied and must match the following prototype */
VOID cso(COUNT);
#if defined(FORSYS) || defined(_INIT)
COUNT fstrlen(BYTE FAR * s) /* don't want globals.h, sorry */
{
int i = 0;
while (*s++)
i++;
return i;
}
#else
COUNT /*ASMCFUNC*/ pascal fstrlen(BYTE FAR * s); /* don't want globals.h, sorry */
#endif
/* special console output routine */ /* special console output routine */
/*#define DOSEMU */
#ifdef DOSEMU #ifdef DOSEMU
#define MAX_BUFSIZE 80 /* adjust if necessary */
static int buff_offset = 0;
static char buff[MAX_BUFSIZE];
VOID put_console(COUNT c) VOID put_console(COUNT c)
{ {
if (buff_offset >= MAX_BUFSIZE) if (buff_offset >= MAX_BUFSIZE)
@ -151,6 +116,41 @@ VOID put_console(COUNT c)
} }
#endif /* DOSEMU */ #endif /* DOSEMU */
#if defined(DEBUG) || defined(FORSYS) || defined(_INIT)
#ifndef FORSYS
/* copied from bcc (Bruce's C compiler) stdarg.h */
typedef char *va_list;
#define va_start(arg, last) ((arg) = (char *) (&(last)+1))
#define va_arg(arg, type) (((type *)(arg+=sizeof(type)))[-1])
#define va_end(arg)
#endif
static BYTE *charp = 0;
STATIC VOID handle_char(COUNT);
STATIC VOID put_console(COUNT);
STATIC BYTE * ltob(LONG, BYTE *, COUNT);
STATIC COUNT do_printf(CONST BYTE *, REG va_list);
int CDECL printf(CONST BYTE * fmt, ...);
/* The following is user supplied and must match the following prototype */
VOID cso(COUNT);
#if defined(FORSYS) || defined(_INIT)
COUNT fstrlen(BYTE FAR * s) /* don't want globals.h, sorry */
{
int i = 0;
while (*s++)
i++;
return i;
}
#else
COUNT /*ASMCFUNC*/ pascal fstrlen(BYTE FAR * s); /* don't want globals.h, sorry */
#endif
/* special handler to switch between sprintf and printf */ /* special handler to switch between sprintf and printf */
STATIC VOID handle_char(COUNT c) STATIC VOID handle_char(COUNT c)
{ {
@ -371,26 +371,8 @@ COUNT do_printf(CONST BYTE * fmt, va_list arg)
return 0; return 0;
} }
#else #endif
void put_console(int c) #if !defined(FORSYS) && !defined(_INIT)
{
if (c == '\n')
put_console('\r');
#if defined(__TURBOC__)
_AX = 0x0e00 | c;
_BX = 0x0070;
__int__(0x10);
#elif defined(I86)
__asm
{
mov al, byte ptr c;
mov ah, 0x0e;
mov bx, 0x0070;
int 0x10;
}
#endif /* __TURBO__ */
}
extern void put_string(const char *); extern void put_string(const char *);
extern void put_unsigned(unsigned, int, int); extern void put_unsigned(unsigned, int, int);

View File

@ -11,7 +11,7 @@
libm.lib: $(CLIB) libm.lib: $(CLIB)
-$(RM) libm.lib -$(RM) libm.lib
$(LIBUTIL) $(CLIB) $(MATH_EXTRACT) $(LIBTERM) $(LIBUTIL) $(CLIB) $(MATH_EXTRACT) $(LIBTERM)
for %i in (*.obj) do ..\utils\patchobj CODE=LCODE TEXT=_LOWTEXT %i for %i in (*.obj) do if exist %i ..\utils\patchobj CODE=LCODE TEXT=_LOWTEXT %i
$(LIBUTIL) libm $(MATH_INSERT) $(LIBTERM) $(LIBUTIL) libm $(MATH_INSERT) $(LIBTERM)
-$(RM) *.OBJ -$(RM) *.OBJ

View File

@ -17,7 +17,7 @@ TARGETOPT=-0
!endif !endif
LIBPATH=$(COMPILERPATH)\lib286 LIBPATH=$(COMPILERPATH)\lib286
LIBUTIL=wlib /q LIBUTIL=wlib -q -n
LIBPLUS= LIBPLUS=
LIBTERM= LIBTERM=
@ -34,8 +34,8 @@ CLIB=$(COMPILERPATH)\lib286\dos\clibm.lib
# we use our own ones, which override these ones when linking. # we use our own ones, which override these ones when linking.
# #
MATH_EXTRACT=*i4d *i4m MATH_EXTRACT=
MATH_INSERT= +i4d +i4m MATH_INSERT=
# #

View File

@ -13,7 +13,11 @@
*****************************************************************************/ *****************************************************************************/
#include <stdio.h> #include <stdio.h>
#ifdef __GNUC__
#include <unistd.h>
#else
#include <io.h> #include <io.h>
#endif
#include <stdlib.h> #include <stdlib.h>
#include <string.h> #include <string.h>
#include <ctype.h> #include <ctype.h>
@ -115,11 +119,13 @@ int main(int argc, char *argv[])
} }
#include "algnbyte.h"
struct record { struct record {
unsigned char rectyp; unsigned char rectyp;
unsigned datalen; unsigned short datalen;
unsigned char buffer[0x2000]; unsigned char buffer[0x2000];
} Record, Outrecord; } Record, Outrecord;
#include "algndflt.h"
struct verify_pack1 { char x[ sizeof(struct record) == 0x2003 ? 1 : -1];}; struct verify_pack1 { char x[ sizeof(struct record) == 0x2003 ? 1 : -1];};