mirror of https://github.com/FDOS/kernel.git
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:
parent
a54e7ab2bf
commit
bf5d83c016
|
@ -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
|
||||
you put the tools.
|
||||
|
||||
*TE******* Make sure to use the NASMR version, as the DosExtender version
|
||||
_seems_ to produce wrong code. the tested version is
|
||||
NASM98R, 06/04/99, 202.606 bytes.
|
||||
*Bart***** This is probably only true for Windows NT/2k/XP; In that
|
||||
case you could use the Win32 version anyway.
|
||||
Look at
|
||||
ftp://ftp.kernel.org/pub/software/devel/nasm
|
||||
or a mirror of ftp.kernel.org.
|
||||
You can find NASM at http://nasm.sourceforge.net. Version 0.98.36 is
|
||||
strongly recommended. The older 0.98 will also work fine, but
|
||||
any version in between is likely to fail. It's best to use a NASM
|
||||
that is native to your host; that is, when compiling in Windows, use
|
||||
the win32 version. The DJGPP version is less likely to run out of
|
||||
memory than the DOS version.
|
||||
|
||||
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
|
||||
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
|
||||
ftp://ftp.openwatcom.org/watcom/zips/
|
||||
|
||||
core_all - Core binaries (All hosts)
|
||||
clib_hdr - C runtime library header files
|
||||
cm_core_all - Core binaries (All hosts)
|
||||
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)
|
||||
cm_clib_d16 - C runtime libraries (16-bit DOS)
|
||||
clib_d16 - C runtime libraries (16-bit DOS)
|
||||
core_binw - Core binaries (DOS host)
|
||||
c_binw - C compiler (DOS host)
|
||||
cm_core_dos - Core binaries (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.
|
||||
|
||||
If you feel hardy, read on to understand the directory structure. A
|
||||
|
|
|
@ -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
|
||||
-------- Bart Oldeman (bart@dosemu.org)
|
||||
+ Changes Tom
|
||||
|
|
|
@ -14,7 +14,7 @@ the FreeDOS Kernel.
|
|||
|
||||
Contents of zip files:
|
||||
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
|
||||
|
||||
BUG REPORTS
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
#pragma warning(disable:4103)
|
||||
#endif
|
||||
#pragma pack(1)
|
||||
#elif defined(_QC) || defined(__WATCOM__)
|
||||
#elif defined(_QC) || defined(__WATCOM__) || defined(__GNUC__)
|
||||
#pragma pack(1)
|
||||
#elif defined(__ZTC__)
|
||||
#pragma ZTC align 1
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
#if defined (_MSC_VER) || defined(_QC) || defined(__WATCOMC__)
|
||||
#if defined (_MSC_VER) || defined(_QC) || defined(__WATCOMC__) || defined(__GNUC__)
|
||||
#pragma pack()
|
||||
#elif defined (__ZTC__)
|
||||
#pragma ZTC align
|
||||
|
|
104
kernel/prf.c
104
kernel/prf.c
|
@ -28,25 +28,9 @@
|
|||
|
||||
#include "portab.h"
|
||||
|
||||
#if defined(DEBUG) || defined(FORSYS) || defined(_INIT)
|
||||
|
||||
#ifdef FORSYS
|
||||
#include <io.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
|
||||
|
||||
#ifdef _INIT
|
||||
|
@ -65,33 +49,14 @@ static BYTE *prfRcsId =
|
|||
"$Id$";
|
||||
#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 */
|
||||
/*#define 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)
|
||||
{
|
||||
if (buff_offset >= MAX_BUFSIZE)
|
||||
|
@ -151,6 +116,41 @@ VOID put_console(COUNT c)
|
|||
}
|
||||
#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 */
|
||||
STATIC VOID handle_char(COUNT c)
|
||||
{
|
||||
|
@ -371,26 +371,8 @@ COUNT do_printf(CONST BYTE * fmt, va_list arg)
|
|||
return 0;
|
||||
}
|
||||
|
||||
#else
|
||||
void put_console(int c)
|
||||
{
|
||||
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__ */
|
||||
}
|
||||
#endif
|
||||
#if !defined(FORSYS) && !defined(_INIT)
|
||||
|
||||
extern void put_string(const char *);
|
||||
extern void put_unsigned(unsigned, int, int);
|
||||
|
|
|
@ -11,7 +11,7 @@
|
|||
libm.lib: $(CLIB)
|
||||
-$(RM) libm.lib
|
||||
$(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)
|
||||
-$(RM) *.OBJ
|
||||
|
||||
|
|
|
@ -17,7 +17,7 @@ TARGETOPT=-0
|
|||
!endif
|
||||
|
||||
LIBPATH=$(COMPILERPATH)\lib286
|
||||
LIBUTIL=wlib /q
|
||||
LIBUTIL=wlib -q -n
|
||||
LIBPLUS=
|
||||
LIBTERM=
|
||||
|
||||
|
@ -34,8 +34,8 @@ CLIB=$(COMPILERPATH)\lib286\dos\clibm.lib
|
|||
# we use our own ones, which override these ones when linking.
|
||||
#
|
||||
|
||||
MATH_EXTRACT=*i4d *i4m
|
||||
MATH_INSERT= +i4d +i4m
|
||||
MATH_EXTRACT=
|
||||
MATH_INSERT=
|
||||
|
||||
|
||||
#
|
||||
|
|
|
@ -13,7 +13,11 @@
|
|||
*****************************************************************************/
|
||||
|
||||
#include <stdio.h>
|
||||
#ifdef __GNUC__
|
||||
#include <unistd.h>
|
||||
#else
|
||||
#include <io.h>
|
||||
#endif
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
#include <ctype.h>
|
||||
|
@ -115,11 +119,13 @@ int main(int argc, char *argv[])
|
|||
|
||||
}
|
||||
|
||||
#include "algnbyte.h"
|
||||
struct record {
|
||||
unsigned char rectyp;
|
||||
unsigned datalen;
|
||||
unsigned short datalen;
|
||||
unsigned char buffer[0x2000];
|
||||
} Record, Outrecord;
|
||||
#include "algndflt.h"
|
||||
|
||||
struct verify_pack1 { char x[ sizeof(struct record) == 0x2003 ? 1 : -1];};
|
||||
|
||||
|
|
Loading…
Reference in New Issue