Commit Graph

573 Commits

Author SHA1 Message Date
Bart Oldeman
f57099220b Introduce clear_dir() to clear a directory, this was code shared between
dos_mkdir() and extend_dir(). Now dos_mkdir() calls this function to clear
the new directory, and then creates the . and .. entries using higher level
functions instead of dealing with the blocks directly.


git-svn-id: https://svn.code.sf.net/p/freedos/svn/kernel/trunk@1421 6ac86273-5f31-0410-b378-82cca8765d1b
2009-06-05 14:53:05 +00:00
Bart Oldeman
ec30074f48 Make the fnode f_flags completely equal to the SFT sft_flags.
Rename SFT_FDIRTY to SFT_FCLEAN to avoid confusion.


git-svn-id: https://svn.code.sf.net/p/freedos/svn/kernel/trunk@1420 6ac86273-5f31-0410-b378-82cca8765d1b
2009-06-05 00:06:05 +00:00
Bart Oldeman
fedf951beb Eliminate the fnode F_DDIR flag which has no SFT equivalent:
f_sft_idx==0xff can do the same. rwblock() is never called for directories
so the checks could be removed.


git-svn-id: https://svn.code.sf.net/p/freedos/svn/kernel/trunk@1419 6ac86273-5f31-0410-b378-82cca8765d1b
2009-06-04 23:40:17 +00:00
Bart Oldeman
60e8c56f91 Flip target and source checks to avoid calling ParseDosName for in-directory
renames. Do not allow to rename directories between different directories.


git-svn-id: https://svn.code.sf.net/p/freedos/svn/kernel/trunk@1418 6ac86273-5f31-0410-b378-82cca8765d1b
2009-06-03 12:24:16 +00:00
Bart Oldeman
063c57e237 RENAME: if the source and target directories are the same, rename the directory
entry in-place instead of creating a new one and deleting the old one.
Fixes archived bugzilla bug:
http://www.freedos.org/bugzilla/cgi-bin/show_bug.cgi?id=1908


git-svn-id: https://svn.code.sf.net/p/freedos/svn/kernel/trunk@1417 6ac86273-5f31-0410-b378-82cca8765d1b
2009-06-03 03:11:23 +00:00
Bart Oldeman
4a6e5677ad Change dos_rmdir to only use 1 fnode. It now first checks if the directory
is empty and then opens the parent and deletes the real directory.
No longer returns DE_FILENOTFND(2), but return DE_PATHNOTFND(3) instead.


git-svn-id: https://svn.code.sf.net/p/freedos/svn/kernel/trunk@1416 6ac86273-5f31-0410-b378-82cca8765d1b
2009-06-03 01:01:47 +00:00
Bart Oldeman
b10d86bcaa Introduce get_cds1 to merge common code that checks for 0=default_drive,1=A,etc.
Make load_transfer() static.


git-svn-id: https://svn.code.sf.net/p/freedos/svn/kernel/trunk@1414 6ac86273-5f31-0410-b378-82cca8765d1b
2009-06-01 14:55:11 +00:00
Bart Oldeman
eb318177c1 Inline cooked_write_char() into cooked_write().
git-svn-id: https://svn.code.sf.net/p/freedos/svn/kernel/trunk@1413 6ac86273-5f31-0410-b378-82cca8765d1b
2009-06-01 13:41:03 +00:00
Bart Oldeman
2fb8715bdc Fix compilation with Turbo C.
git-svn-id: https://svn.code.sf.net/p/freedos/svn/kernel/trunk@1411 6ac86273-5f31-0410-b378-82cca8765d1b
2009-05-29 00:50:28 +00:00
Bart Oldeman
5b46738372 Eliminate dir_close().
Its only purpose left was to flush buffers, which isn't necessary after
just open/read, so we can move that to dir_write().


git-svn-id: https://svn.code.sf.net/p/freedos/svn/kernel/trunk@1410 6ac86273-5f31-0410-b378-82cca8765d1b
2009-05-29 00:25:38 +00:00
Bart Oldeman
1cc33a1a5e Move the open/creat access checks to more efficient places.
git-svn-id: https://svn.code.sf.net/p/freedos/svn/kernel/trunk@1409 6ac86273-5f31-0410-b378-82cca8765d1b
2009-05-29 00:03:27 +00:00
Bart Oldeman
7b89e44274 Make merge_file_changes more direct dealing with SFTs and merge the
"close open files setfattr wants to change" functionality there.


git-svn-id: https://svn.code.sf.net/p/freedos/svn/kernel/trunk@1408 6ac86273-5f31-0410-b378-82cca8765d1b
2009-05-28 18:33:22 +00:00
Bart Oldeman
896908d6f7 Eliminate DosGetFile -- it is no longer necessary because the filename
is already copied from the fnode.


git-svn-id: https://svn.code.sf.net/p/freedos/svn/kernel/trunk@1407 6ac86273-5f31-0410-b378-82cca8765d1b
2009-05-26 21:09:56 +00:00
Bart Oldeman
9a415b14b2 Fix a regression with sft_flags overwriting what dos_open wrote so file
dates/times would always be updated, even for reads!


git-svn-id: https://svn.code.sf.net/p/freedos/svn/kernel/trunk@1406 6ac86273-5f31-0410-b378-82cca8765d1b
2009-05-26 20:57:55 +00:00
Bart Oldeman
a0382d32e4 Eliminate dos_setfsize, dos_setftime, and dos_lseek, by just using the SFT.
dos_setfsize still needed to merge changes for SHARE so the call was replaced
by a new dos_merge_file_changes() call.


git-svn-id: https://svn.code.sf.net/p/freedos/svn/kernel/trunk@1405 6ac86273-5f31-0410-b378-82cca8765d1b
2009-05-26 20:44:44 +00:00
Bart Oldeman
76f1c10a4e Eliminate xlt_fd(), save_far_f_node(), and the redundant fnode f_mode field.
git-svn-id: https://svn.code.sf.net/p/freedos/svn/kernel/trunk@1404 6ac86273-5f31-0410-b378-82cca8765d1b
2009-05-26 18:34:05 +00:00
Bart Oldeman
4a81e6e9a2 Let merge_file_changes operate directly on the other SFTs.
dos_setfattr with SHARE now closes open SFTs referring to that file
in compat mode.


git-svn-id: https://svn.code.sf.net/p/freedos/svn/kernel/trunk@1403 6ac86273-5f31-0410-b378-82cca8765d1b
2009-05-26 18:23:35 +00:00
Bart Oldeman
386fc961e3 Fix SFT/fnode fields so the SHARE related functions is_same_file() and
merge_file_changes() work.


git-svn-id: https://svn.code.sf.net/p/freedos/svn/kernel/trunk@1402 6ac86273-5f31-0410-b378-82cca8765d1b
2009-05-26 16:49:57 +00:00
Bart Oldeman
c179284147 Remove redundant checks for fnodes==0 since the checks are done in dosfns.c.
Replace global f_nodes[] array by f_sft_idx fields in the fnodes.


git-svn-id: https://svn.code.sf.net/p/freedos/svn/kernel/trunk@1401 6ac86273-5f31-0410-b378-82cca8765d1b
2009-05-26 14:44:44 +00:00
Bart Oldeman
a69b4ba011 Eliminate the sft_status field as it is now equal to the SFT index.
git-svn-id: https://svn.code.sf.net/p/freedos/svn/kernel/trunk@1400 6ac86273-5f31-0410-b378-82cca8765d1b
2009-05-26 14:11:50 +00:00
Bart Oldeman
f9f2fe447d Eliminate dos_getftime, dos_getfsize, and dos_getfattr_fd, because we can
now get these properties directly from the SFT.


git-svn-id: https://svn.code.sf.net/p/freedos/svn/kernel/trunk@1399 6ac86273-5f31-0410-b378-82cca8765d1b
2009-05-26 13:59:44 +00:00
Bart Oldeman
e63e5dd125 Eliminate f_count field in fnodes and some no-op functions.
git-svn-id: https://svn.code.sf.net/p/freedos/svn/kernel/trunk@1398 6ac86273-5f31-0410-b378-82cca8765d1b
2009-05-26 13:47:52 +00:00
Bart Oldeman
d7d201a53b This is the main change to eliminate far fnodes.
SFT info is copied from and to the two near fnodes.
Some cleanups still follow.


git-svn-id: https://svn.code.sf.net/p/freedos/svn/kernel/trunk@1397 6ac86273-5f31-0410-b378-82cca8765d1b
2009-05-26 13:24:14 +00:00
Bart Oldeman
0ad01cd768 Handle sft_count before calling dos_open and after calling dos_close so
the SFT is open for longer, during fatfs.c operations.


git-svn-id: https://svn.code.sf.net/p/freedos/svn/kernel/trunk@1395 6ac86273-5f31-0410-b378-82cca8765d1b
2009-05-25 22:55:06 +00:00
Bart Oldeman
cb4ab16a22 Fix compilation with -DDOSEMU set.
git-svn-id: https://svn.code.sf.net/p/freedos/svn/kernel/trunk@1394 6ac86273-5f31-0410-b378-82cca8765d1b
2009-05-25 00:04:03 +00:00
Bart Oldeman
affddaaf64 Handle dos_getfattr and dos_setfattr directly at the directory level, instead
of opening the file, to avoid needing to claim SFTs in later changes.
Clarify and implement parts of the correct SHARE behaviour.


git-svn-id: https://svn.code.sf.net/p/freedos/svn/kernel/trunk@1393 6ac86273-5f31-0410-b378-82cca8765d1b
2009-05-23 02:04:03 +00:00
Bart Oldeman
7083b0a4fa On close or commit, only update those directory entry fields that have an
SFT equivalent. The rest stays unmodified on disk.


git-svn-id: https://svn.code.sf.net/p/freedos/svn/kernel/trunk@1392 6ac86273-5f31-0410-b378-82cca8765d1b
2009-05-22 00:25:11 +00:00
Bart Oldeman
ba75006b67 Use explicit dir_write() instead of letting dir_close() do the writing.
This is to prepare for an updating version to deal with SFTs.


git-svn-id: https://svn.code.sf.net/p/freedos/svn/kernel/trunk@1391 6ac86273-5f31-0410-b378-82cca8765d1b
2009-05-22 00:01:27 +00:00
Bart Oldeman
d39420dc11 Add f_dirsector (sector containing dentry) and f_diridx (index within
sector) fields to the fnode, to make fnodes more compatible with SFTs.
Use them to simplify dir_read() and dir_write().


git-svn-id: https://svn.code.sf.net/p/freedos/svn/kernel/trunk@1390 6ac86273-5f31-0410-b378-82cca8765d1b
2009-05-21 12:57:37 +00:00
Bart Oldeman
2092745236 Force near fnode use to use either fnode[0] or fnode[1] instead of the
allocation scheme. This eliminates the checks done in inthndlr.c because
the f_count field is no longer checked.


git-svn-id: https://svn.code.sf.net/p/freedos/svn/kernel/trunk@1389 6ac86273-5f31-0410-b378-82cca8765d1b
2009-05-20 18:13:37 +00:00
Bart Oldeman
d6ad12a3dc Add Linux cross-compile capability, using Open Watcom:
* Flip \ to / where possible.
* Introduce $(DIRSEP) (/ or \) for use inside commands in makefiles
  where / won't work in DOS.
* Override various settings for Linux in owlinux.mak.
* Add quotes in exeflat.c to avoid shell expansion of $$$$$.
* Let "make all", "make clean", and "make clobber" do the job.


git-svn-id: https://svn.code.sf.net/p/freedos/svn/kernel/trunk@1387 6ac86273-5f31-0410-b378-82cca8765d1b
2009-05-19 21:39:29 +00:00
Kenneth J Davis
9e2421746b correct FCB fix from Bart, during open only certain fields of FCB should be initialized, programs may expect others to remain as set prior to open/create call
git-svn-id: https://svn.code.sf.net/p/freedos/svn/kernel/trunk@1380 6ac86273-5f31-0410-b378-82cca8765d1b
2009-05-17 01:06:07 +00:00
Kenneth J Davis
01cc83bc82 From Eric, reduce unnecessary calls to share hook, only re-check (int 2f/1000) on open/close, not on each access
git-svn-id: https://svn.code.sf.net/p/freedos/svn/kernel/trunk@1379 6ac86273-5f31-0410-b378-82cca8765d1b
2009-05-11 22:04:43 +00:00
Kenneth J Davis
d41599e2cc from Lucho, there is no any key, don't ask the user to press it
git-svn-id: https://svn.code.sf.net/p/freedos/svn/kernel/trunk@1378 6ac86273-5f31-0410-b378-82cca8765d1b
2009-05-11 21:45:12 +00:00
Kenneth J Davis
da25cd58b4 use total cylinders (+1 for count, not maximum value)
git-svn-id: https://svn.code.sf.net/p/freedos/svn/kernel/trunk@1377 6ac86273-5f31-0410-b378-82cca8765d1b
2009-05-11 17:11:30 +00:00
Kenneth J Davis
c6b55c1119 From Tom, return 0xFF on invalid drives for int 21h/1c get drive allocation information (sectors/clusters)
git-svn-id: https://svn.code.sf.net/p/freedos/svn/kernel/trunk@1376 6ac86273-5f31-0410-b378-82cca8765d1b
2009-05-10 12:36:57 +00:00
Kenneth J Davis
d9e2861a44 improve comments regarding call PSP:5 patch
git-svn-id: https://svn.code.sf.net/p/freedos/svn/kernel/trunk@1375 6ac86273-5f31-0410-b378-82cca8765d1b
2009-05-08 00:00:17 +00:00
Kenneth J Davis
0d16215fef adjust so FCB reads return data (fix loading of config file [assign.sys] by GEM versions that use FCBs)
git-svn-id: https://svn.code.sf.net/p/freedos/svn/kernel/trunk@1374 6ac86273-5f31-0410-b378-82cca8765d1b
2009-05-07 01:42:16 +00:00
Kenneth J Davis
65f8276a45 fix nasm warning - add missing colon to label
git-svn-id: https://svn.code.sf.net/p/freedos/svn/kernel/trunk@1373 6ac86273-5f31-0410-b378-82cca8765d1b
2009-05-04 03:12:53 +00:00
Kenneth J Davis
240bcc30e2 commit Bart's patch to fix CP/M call psp:05h compatibility call along with some comments to explain the call trampoline
git-svn-id: https://svn.code.sf.net/p/freedos/svn/kernel/trunk@1372 6ac86273-5f31-0410-b378-82cca8765d1b
2009-05-01 04:25:27 +00:00
Kenneth J Davis
ae3d48ab33 Change how DosGetExtFree checks for drive so int 21h/7303h more lax about path given, support driver specifier with or without slash (C: or C:\) and just slash (\) for current drive (does allow some additional bogus paths to return success)
git-svn-id: https://svn.code.sf.net/p/freedos/svn/kernel/trunk@1369 6ac86273-5f31-0410-b378-82cca8765d1b
2009-04-30 05:16:31 +00:00
Eric Auer
31bc1f6149 Added support for BUFFERSHIGH as alias to BUFFERS: No new code
but useful for people who are used to writing HIGH everywhere.
Thanks to Christian Wallbaum the hint that config.txt had both.
Removed code which called int 16.1 in a loop before 16.0 - this
would only be useful if you invoke HLT before each int 16.1 ...


git-svn-id: https://svn.code.sf.net/p/freedos/svn/kernel/trunk@1366 6ac86273-5f31-0410-b378-82cca8765d1b
2008-06-01 22:44:19 +00:00
Eric Auer
74167734ff Compatibility: Allow fat/data/dir type hints even for disk read
in int 21.7305 to fix compat issue found by Christian Wallbaum.


git-svn-id: https://svn.code.sf.net/p/freedos/svn/kernel/trunk@1365 6ac86273-5f31-0410-b378-82cca8765d1b
2008-04-12 15:54:29 +00:00
Eric Auer
bfb40c4b1c Workaround for y2k BIOS bugs at the only location where FreeDOS
reads the BIOS (CMOS RTC) date (at boot). Note that according to
RBIL, DRDOS would even hook int 1a ah=4 to force a correct year.

/* A BIOS with y2k (year 2000) bug will always report year 19nn */
if ((dosregs.c.x >= 1900) && (dosregs.c.x < 1980)) dosregs.c.x += 100;


git-svn-id: https://svn.code.sf.net/p/freedos/svn/kernel/trunk@1359 6ac86273-5f31-0410-b378-82cca8765d1b
2008-03-09 16:11:10 +00:00
Eric Auer
26f116a217 More secure FAT handling: Avoids risk of cross links for example if
you reboot while files are open... Reported by Hardi Stengelin :-).

Always test *link_fat* result. New function is_free_cluster.  Extra
checks in *link_fat* (bad r/w offset, i/o, write) and *next_cluster*
(dangling chain: bad value in chain) with short messages (no msg for
bad chain start). Shorter "Bad DPB" (FAT size) msg.  More comments!

Update FS INFO on disk only when needed.  Check if chain EOF was at
expected place when extending.  Call *link_fat* before! *setdstart*
when a FAT chain grows.   [Q: Does 0 byte write always trunc? Why?]


git-svn-id: https://svn.code.sf.net/p/freedos/svn/kernel/trunk@1358 6ac86273-5f31-0410-b378-82cca8765d1b
2008-03-08 20:31:37 +00:00
Eric Auer
0cc297cf2d The truename function must use the current working directory of
the virtual / created-by-subst drive when it resolves relative
paths, even though truename returns the "real" drive and dir
of where your files actually are in the end. Using the current
directory of the "real" drive made truename give wrong results.

PS: If "subst e: d:\" says "physical path x:\ cannot be made",
then it refers to "making" a root dir. "subst e: d:\foo" works.


git-svn-id: https://svn.code.sf.net/p/freedos/svn/kernel/trunk@1357 6ac86273-5f31-0410-b378-82cca8765d1b
2007-09-15 22:01:03 +00:00
Bart Oldeman
69d767be50 Let exeflat call UPX itself like in the unstable branch. Simplifies makefile.
git-svn-id: https://svn.code.sf.net/p/freedos/svn/kernel/trunk@1353 6ac86273-5f31-0410-b378-82cca8765d1b
2007-08-29 08:49:02 +00:00
Bart Oldeman
266398c247 Add ASM to HaltCpuWhileIdle declarations for compatibility with Turbo C.
git-svn-id: https://svn.code.sf.net/p/freedos/svn/kernel/trunk@1350 6ac86273-5f31-0410-b378-82cca8765d1b
2007-08-27 11:41:13 +00:00
Eric Auer
94d0560e7b Do not ABORT if image size is above 1 MB - Instead, handle size
MODULO 1 MB (paras = low_16_bits(pages<<5) ...) because for e.g.
Turbo C++ 3.0 needs this: Their IDE is 1.3 MB BOSS NE style EXE,
the first < 0.3 MB load a DOS ext which loads and runs the rest.


git-svn-id: https://svn.code.sf.net/p/freedos/svn/kernel/trunk@1348 6ac86273-5f31-0410-b378-82cca8765d1b
2007-08-25 02:37:59 +00:00
Eric Auer
f7320f6452 Init HaltCpuWhileIdle to 0 before installing int handlers.
Removed HaltCpuWhileIdle handling from GetBiosKey because it is
only used *before* IDLEHALT is processed anyway - in the config
sys menu *and* in CheckContinueBootFromHarddisk. Adding s.th.
like "switches /i" would be a way to enable it a bit earlier.


git-svn-id: https://svn.code.sf.net/p/freedos/svn/kernel/trunk@1346 6ac86273-5f31-0410-b378-82cca8765d1b
2007-08-17 19:33:24 +00:00
Eric Auer
ab53a50c49 Mktemp (21.5a) only inserts leading backslash in temp file name
if no directory given in template if DOS version is 5.
Older and newer DOS versions just use no dirspec in that case.
This helps ftp.sac.sk/pub/sac/pack/iup067.zip exepacker which
tries to rename the temp file to a file in current directory.

Prepared Truename (21.60) to return 0 if okay, 3a00 if char dev
(and not JOIN / network?). May need further coding to actually
have the intended effect...? Note: The shell TRUENAME command
may change names for display!

Changed the "true DOS version" for FAT16 kernels from 5.0 to
6.22 to reflect the updates in 21.5a and 21.60, other 5 / 6
differences are not simply in the kernel but more in COUNTRY,
KEYB, HIMEM, SMARTDRV, DBLSPACE, EMM386, COMMAND and so on.
In addition, 6.22 is a popular version number to report :-).


git-svn-id: https://svn.code.sf.net/p/freedos/svn/kernel/trunk@1345 6ac86273-5f31-0410-b378-82cca8765d1b
2007-07-28 19:03:40 +00:00
Bart Oldeman
c3bd779112 Reinstated _IRQTEXT, now with corrected segment loads in irqstack.asm.
It is better to use groups than segments here.


git-svn-id: https://svn.code.sf.net/p/freedos/svn/kernel/trunk@1343 6ac86273-5f31-0410-b378-82cca8765d1b
2007-07-23 11:23:11 +00:00
Eric Auer
c2fababb01 Reverted the "add new IRQTEXT" segment patch from 1324->1325
again, as this made the kernel crash in Bochs in PostConfig
(or short before or after it). FASTBOOT should still be okay.


git-svn-id: https://svn.code.sf.net/p/freedos/svn/kernel/trunk@1341 6ac86273-5f31-0410-b378-82cca8765d1b
2007-07-21 21:46:17 +00:00
Eric Auer
1e5efe260e New config.sys (config.c, config.txt) options: IDLEHALT=n to activate
"HLT on idle" (dosidle.asm, int2f.asm) and KEYBUF=n[,m] to relocate
the keyboard buffer to another area in the 40:ac..40:1ff range. Global
functions and variables: proto.h DosIdle_hlt, init-mod.h and globals.h
DosIdle_hlt() and HaltCpuWhileIdle.


git-svn-id: https://svn.code.sf.net/p/freedos/svn/kernel/trunk@1339 6ac86273-5f31-0410-b378-82cca8765d1b
2007-07-21 03:37:53 +00:00
Eric Auer
cf05259924 Removed "Dutch plurals" ("Dutch plural's" ;-)) from the source code:
kernel/fatfs.c kernel/config.c kernel/kernel.asm kernel/initdisk.c
kernel/fattab.c kernel/dyninit.c kernel/int2f.asm kernel/memmgr.c
kernel/task.c kernel/dsk.c kernel/printer.asm kernel/globals.h
kernel/dosfns.c docs/config.txt hdr/device.h drivers/rdpcclk.asm


git-svn-id: https://svn.code.sf.net/p/freedos/svn/kernel/trunk@1338 6ac86273-5f31-0410-b378-82cca8765d1b
2007-07-20 20:52:33 +00:00
Bart Oldeman
c10f276c46 Really fix the 8086 issue!
git-svn-id: https://svn.code.sf.net/p/freedos/svn/kernel/trunk@1337 6ac86273-5f31-0410-b378-82cca8765d1b
2007-06-17 21:23:12 +00:00
Bart Oldeman
4d7fc0f7ed Disable interrupts before storing IVTs and fix the 8086 kernel.
git-svn-id: https://svn.code.sf.net/p/freedos/svn/kernel/trunk@1336 6ac86273-5f31-0410-b378-82cca8765d1b
2007-06-17 21:20:50 +00:00
Bart Oldeman
a4bc22884c Use the largest possible lastdrive value ('Z',26) for the initial CDS.
This allows device=f:\foo.sys to work.


git-svn-id: https://svn.code.sf.net/p/freedos/svn/kernel/trunk@1335 6ac86273-5f31-0410-b378-82cca8765d1b
2007-06-04 16:54:11 +00:00
Bart Oldeman
3f1938d8e8 Fix bug 1953: 21h/29h returns 0 (valid) for all drive root names up to
LASTDRIVE. Also, if the drive is invalid this function no longer fills in
any values in the destination FCB.


git-svn-id: https://svn.code.sf.net/p/freedos/svn/kernel/trunk@1334 6ac86273-5f31-0410-b378-82cca8765d1b
2007-06-04 16:35:53 +00:00
Bart Oldeman
5fa8f24fb7 Fix zero timeouts for GetBiosKey (F5/F8 handling).
git-svn-id: https://svn.code.sf.net/p/freedos/svn/kernel/trunk@1332 6ac86273-5f31-0410-b378-82cca8765d1b
2007-05-28 18:01:59 +00:00
Bart Oldeman
ce58a924fe Fix builds with Turbo C.
git-svn-id: https://svn.code.sf.net/p/freedos/svn/kernel/trunk@1330 6ac86273-5f31-0410-b378-82cca8765d1b
2007-05-26 21:57:11 +00:00
Bart Oldeman
29d6eb79f1 Use dos/sys compression if the uncompressed kernel is less than 64K. That
makes the compressed kernel about 2K smaller.


git-svn-id: https://svn.code.sf.net/p/freedos/svn/kernel/trunk@1329 6ac86273-5f31-0410-b378-82cca8765d1b
2007-05-26 21:20:58 +00:00
Bart Oldeman
ad58440395 Process relocations before compressing kernel.sys. This shaves about 130 bytes
off the compressed kernel.sys.


git-svn-id: https://svn.code.sf.net/p/freedos/svn/kernel/trunk@1328 6ac86273-5f31-0410-b378-82cca8765d1b
2007-05-26 20:03:51 +00:00
Bart Oldeman
eeef2f7efd Implement an int19 hook (from Japheth's JEMFBHLP.ASM).
git-svn-id: https://svn.code.sf.net/p/freedos/svn/kernel/trunk@1326 6ac86273-5f31-0410-b378-82cca8765d1b
2007-05-26 17:34:12 +00:00
Bart Oldeman
dc840d98f4 Jemm's FASTBOOT needs interrupt vectors at 0070:0100 so put them there,
eliminating the need for JEMFBHLP.EXE


git-svn-id: https://svn.code.sf.net/p/freedos/svn/kernel/trunk@1325 6ac86273-5f31-0410-b378-82cca8765d1b
2007-05-26 16:57:15 +00:00
Bart Oldeman
acbc504765 Fix Bugzilla Bug 1956: all file opens fail under specific conditions.
git-svn-id: https://svn.code.sf.net/p/freedos/svn/kernel/trunk@1323 6ac86273-5f31-0410-b378-82cca8765d1b
2007-05-21 02:29:01 +00:00
Bart Oldeman
4a8c30c6e2 Fix problem with an old game that calls findfirst with attribute 77a8:
the kernel should not return a volume label in that case.


git-svn-id: https://svn.code.sf.net/p/freedos/svn/kernel/trunk@1322 6ac86273-5f31-0410-b378-82cca8765d1b
2007-05-21 02:17:44 +00:00
Bart Oldeman
ea91fd0236 Extra check for EBDA move: ramsize == peek(0, RAMSIZE) by Tom Ehlert
git-svn-id: https://svn.code.sf.net/p/freedos/svn/kernel/trunk@1321 6ac86273-5f31-0410-b378-82cca8765d1b
2007-05-21 02:16:36 +00:00
Bart Oldeman
fbd8d43ccb From Eric: add some comments about what intr() does.
git-svn-id: https://svn.code.sf.net/p/freedos/svn/kernel/trunk@1320 6ac86273-5f31-0410-b378-82cca8765d1b
2007-05-21 02:15:56 +00:00
Bart Oldeman
7d18a16081 Read partition tables using CHS methods unless instructed to do otherwise.
Fixes problems with some older boot sector managers like PROT.


git-svn-id: https://svn.code.sf.net/p/freedos/svn/kernel/trunk@1319 6ac86273-5f31-0410-b378-82cca8765d1b
2007-05-21 01:57:21 +00:00
Bart Oldeman
c20a106569 Fix warning with OW 1.7 in-development.
git-svn-id: https://svn.code.sf.net/p/freedos/svn/kernel/trunk@1318 6ac86273-5f31-0410-b378-82cca8765d1b
2007-05-21 01:14:20 +00:00
Bart Oldeman
d99cfc38c1 Add Tom Ehlert's freeing of near f_node's work-around for problems with
INT24 handling.


git-svn-id: https://svn.code.sf.net/p/freedos/svn/kernel/trunk@1317 6ac86273-5f31-0410-b378-82cca8765d1b
2007-05-15 17:50:22 +00:00
Bart Oldeman
1e98a86033 Remove unused intr prototype for resident code; add dir kernel.exe (TE),
cosmetic p=A -> p = A (TE).


git-svn-id: https://svn.code.sf.net/p/freedos/svn/kernel/trunk@1316 6ac86273-5f31-0410-b378-82cca8765d1b
2007-05-15 17:48:47 +00:00
Bart Oldeman
2618be338f Implement floppy change notification via int2f/ax=4a00 (originally by
Tom Ehlert). Add forgotten bit of NLS int2f.asm change.


git-svn-id: https://svn.code.sf.net/p/freedos/svn/kernel/trunk@1314 6ac86273-5f31-0410-b378-82cca8765d1b
2007-05-15 17:44:02 +00:00
Bart Oldeman
f2823f9f27 Changed and optimized call_nls a bit to return the id in the high word
of a long, eliminating the on-stack pointer.


git-svn-id: https://svn.code.sf.net/p/freedos/svn/kernel/trunk@1313 6ac86273-5f31-0410-b378-82cca8765d1b
2007-05-15 17:41:35 +00:00
Bart Oldeman
85856ae35b Always set lr.ES just before the "break". Enables the compiler to do some
tail merge optimizations.


git-svn-id: https://svn.code.sf.net/p/freedos/svn/kernel/trunk@1312 6ac86273-5f31-0410-b378-82cca8765d1b
2007-05-15 04:26:45 +00:00
Bart Oldeman
81da8db94d Having set extended error like Tom is a little smaller.
git-svn-id: https://svn.code.sf.net/p/freedos/svn/kernel/trunk@1311 6ac86273-5f31-0410-b378-82cca8765d1b
2007-05-15 04:22:30 +00:00
Bart Oldeman
f777f91f4c Ioctl optimization using a command table, present both in Tom's and the
unstable kernel. ~83 bytes saved.


git-svn-id: https://svn.code.sf.net/p/freedos/svn/kernel/trunk@1310 6ac86273-5f31-0410-b378-82cca8765d1b
2007-05-15 04:12:53 +00:00
Bart Oldeman
2faf38e208 Fix typo in booot (from Tom's kernel).
git-svn-id: https://svn.code.sf.net/p/freedos/svn/kernel/trunk@1309 6ac86273-5f31-0410-b378-82cca8765d1b
2007-05-15 03:10:02 +00:00
Bart Oldeman
2466934534 Fix OW 1.6 warnings about functions redeclared as 'static'.
git-svn-id: https://svn.code.sf.net/p/freedos/svn/kernel/trunk@1308 6ac86273-5f31-0410-b378-82cca8765d1b
2007-05-15 00:05:41 +00:00
Bart Oldeman
818e1bf0da Fix OW warnings about "unsigned int <= 0".
git-svn-id: https://svn.code.sf.net/p/freedos/svn/kernel/trunk@1307 6ac86273-5f31-0410-b378-82cca8765d1b
2007-05-14 23:53:46 +00:00
Bart Oldeman
46d959f0cb Fix the NUL device so it returns 0 bytes for reads, independent of whether
cooked or raw mode is used. It was broken for raw mode. Fixes problem
with DJGPP sed (see
http://sourceforge.net/tracker/index.php?func=detail&aid=1429741&group_id=49784&atid=457447)


git-svn-id: https://svn.code.sf.net/p/freedos/svn/kernel/trunk@1306 6ac86273-5f31-0410-b378-82cca8765d1b
2007-05-14 23:52:39 +00:00
Bart Oldeman
56d8008672 Fix QB4 MCB problem (from FD1.0 kernel).
git-svn-id: https://svn.code.sf.net/p/freedos/svn/kernel/trunk@1304 6ac86273-5f31-0410-b378-82cca8765d1b
2006-10-31 21:08:12 +00:00
Bart Oldeman
c952ceff61 Clear high 4 bits of FAT32 FAT table entries & diagnostics. From FD 1.0
kernel.


git-svn-id: https://svn.code.sf.net/p/freedos/svn/kernel/trunk@1303 6ac86273-5f31-0410-b378-82cca8765d1b
2006-10-31 21:05:09 +00:00
Bart Oldeman
4768a9d2f8 Serial code fixes from the FD1.0 kernel.
git-svn-id: https://svn.code.sf.net/p/freedos/svn/kernel/trunk@1302 6ac86273-5f31-0410-b378-82cca8765d1b
2006-10-31 21:01:38 +00:00
Eric Auer
ba7bde0bdf VERSION=x.yy must set the setver-able DOS version, not the "true internal"
DOS version. The setver-able version is the one queried by int 21.30 and
settable by int 21.33fc, internal version is the one queried by int 21.3306.


git-svn-id: https://svn.code.sf.net/p/freedos/svn/kernel/trunk@1190 6ac86273-5f31-0410-b378-82cca8765d1b
2006-05-21 18:50:30 +00:00
Eric Auer
db243d4688 Updated the year in the "copyright" string which is used for the
signon message at boot time. Note that the string in globals.h is
no longer used! Message is now:
(C) Copyright 1995-2004 Pasquale J. Villani and The FreeDOS Project.
All Rights Reserved. This is free software and comes with ABSOLUTELY NO
WARRANTY; you can redistribute it and/or modify it under the terms of the
GNU General Public License as published by the Free Software Foundation;
either version 2, or (at your option) any later version.


git-svn-id: https://svn.code.sf.net/p/freedos/svn/kernel/trunk@1189 6ac86273-5f31-0410-b378-82cca8765d1b
2006-05-20 21:01:29 +00:00
Eric Auer
5c9ae102b4 added stub for function 0x6301/0x6302 Korean Hangul keyboard input methods
in int 0x21 handler (0x63xx is DBCS support related), returns AL=-1 (error)


git-svn-id: https://svn.code.sf.net/p/freedos/svn/kernel/trunk@1185 6ac86273-5f31-0410-b378-82cca8765d1b
2006-05-20 20:50:44 +00:00
Eric Auer
265efa8b8b removed the "protect 386 registers" patch again, a fixed version of free-
EMM386 is available. This reduces device driver call overhead in terms of
CPU and stack usage.  Older EMM386 versions destroyed eax ebx ecx edi esi
ebp fs gs, now go_driver_entry in emm386.asm saves those registers. Only
the INIT was broken, but the execrh.asm patch protected ALL functions.


git-svn-id: https://svn.code.sf.net/p/freedos/svn/kernel/trunk@1184 6ac86273-5f31-0410-b378-82cca8765d1b
2006-05-20 20:49:59 +00:00
Eric Auer
40276450af changed the os_release version message to be
"build 2036 cvs [version Sep 09 2005 compiled May 20 2006]" as opposed to
the old "version 1.1.35 (Build 2035b-cvs) [Jul 23 2005 12:34:56]"
-> removed the "1.1.35" and compile TIME, added SOURCE DATE


git-svn-id: https://svn.code.sf.net/p/freedos/svn/kernel/trunk@1182 6ac86273-5f31-0410-b378-82cca8765d1b
2006-05-20 20:48:43 +00:00
Kenneth J Davis
b08bb299b1 from Eduardo, fix Spanish (34, not duplicate of 33)
git-svn-id: https://svn.code.sf.net/p/freedos/svn/kernel/trunk@1142 6ac86273-5f31-0410-b378-82cca8765d1b
2005-09-08 23:48:25 +00:00
Kenneth J Davis
6d9f6c60c0 protect 386 registers from emm386 on 386 kernel build (prevent crash, workaround)
git-svn-id: https://svn.code.sf.net/p/freedos/svn/kernel/trunk@1136 6ac86273-5f31-0410-b378-82cca8765d1b
2005-07-24 09:34:10 +00:00
Kenneth J Davis
696614a6c1 do not compares filenames to name field in block devices
git-svn-id: https://svn.code.sf.net/p/freedos/svn/kernel/trunk@1127 6ac86273-5f31-0410-b378-82cca8765d1b
2005-07-10 01:19:29 +00:00
Kenneth J Davis
790ad53fee don't leave fd open when failing DIR bit check
git-svn-id: https://svn.code.sf.net/p/freedos/svn/kernel/trunk@1124 6ac86273-5f31-0410-b378-82cca8765d1b
2005-04-10 15:00:37 +00:00
Kenneth J Davis
4dcdd071e5 bug 1874 fix, do not consider setting DIR bit an error for int 21/4301=set attribute, if really is a directory
git-svn-id: https://svn.code.sf.net/p/freedos/svn/kernel/trunk@1123 6ac86273-5f31-0410-b378-82cca8765d1b
2005-04-05 15:08:30 +00:00
Kenneth J Davis
bd50aa5d40 from Arkady, use direct access instead of reading from copy made on stack
git-svn-id: https://svn.code.sf.net/p/freedos/svn/kernel/trunk@1122 6ac86273-5f31-0410-b378-82cca8765d1b
2005-03-15 15:31:35 +00:00
Kenneth J Davis
c41380e578 merge from dev kernel, Jason Hood's patch for extended DPBs and Set Extended Error function
git-svn-id: https://svn.code.sf.net/p/freedos/svn/kernel/trunk@1120 6ac86273-5f31-0410-b378-82cca8765d1b
2005-03-06 16:58:33 +00:00
Kenneth J Davis
e501067d7b insure bpb_huge is initialized (zeroed) [merge from dev kernel]
git-svn-id: https://svn.code.sf.net/p/freedos/svn/kernel/trunk@1119 6ac86273-5f31-0410-b378-82cca8765d1b
2005-03-06 16:12:34 +00:00
Kenneth J Davis
063efbfef3 from Eric (similar already in dev), set driver request field with subunit number
git-svn-id: https://svn.code.sf.net/p/freedos/svn/kernel/trunk@1115 6ac86273-5f31-0410-b378-82cca8765d1b
2005-02-24 20:35:48 +00:00
Kenneth J Davis
42c99c7d70 ensure f_nodes.f_count are initialized to 0 (always clear KernelAlloc'd memory)
git-svn-id: https://svn.code.sf.net/p/freedos/svn/kernel/trunk@1098 6ac86273-5f31-0410-b378-82cca8765d1b
2005-01-29 04:59:31 +00:00