Bart Oldeman
7eb9514377
Move the ddt bitfields to df_descflags. Let SetLogDev call GetLogdev,
...
eliminating common code.
git-svn-id: https://svn.code.sf.net/p/freedos/svn/kernel/trunk@868 6ac86273-5f31-0410-b378-82cca8765d1b
2004-04-13 10:54:33 +00:00
Bart Oldeman
5d712fc2a6
Avoid bitfields for fnodes, using flags instead.
...
Replaced droot field by checks for f_dirstart == 0.
git-svn-id: https://svn.code.sf.net/p/freedos/svn/kernel/trunk@867 6ac86273-5f31-0410-b378-82cca8765d1b
2004-04-13 10:46:37 +00:00
Bart Oldeman
5c72b4a0e9
Fixed some missing dots
...
git-svn-id: https://svn.code.sf.net/p/freedos/svn/kernel/trunk@866 6ac86273-5f31-0410-b378-82cca8765d1b
2004-04-12 09:36:07 +00:00
Bart Oldeman
46833929f9
Some variables need to be DOSFAR now; init code is no longer tiny but small.
...
git-svn-id: https://svn.code.sf.net/p/freedos/svn/kernel/trunk@865 6ac86273-5f31-0410-b378-82cca8765d1b
2004-04-11 17:22:18 +00:00
Bart Oldeman
c6c49e1ec1
Some makefile cleanups from Arkady. Also Lucho reported that nmake/nologo
...
doesn't always work in 4dos, but nmake /nologo works.
git-svn-id: https://svn.code.sf.net/p/freedos/svn/kernel/trunk@864 6ac86273-5f31-0410-b378-82cca8765d1b
2004-04-11 12:21:25 +00:00
Bart Oldeman
ca11edc6fd
Buffer config fixes from Arkady.
...
git-svn-id: https://svn.code.sf.net/p/freedos/svn/kernel/trunk@863 6ac86273-5f31-0410-b378-82cca8765d1b
2004-04-10 22:48:26 +00:00
Bart Oldeman
6ad8b415dd
Applied Arkady's corrections to int2f/ax=4a01/2.
...
git-svn-id: https://svn.code.sf.net/p/freedos/svn/kernel/trunk@862 6ac86273-5f31-0410-b378-82cca8765d1b
2004-04-10 21:07:06 +00:00
Bart Oldeman
dd6ace383a
No longer include duplicate execrh, asmsupt, and u8m/d functions for the
...
init text in the Watcom compiled kernel, since they can be called "near"
in the resident code.
git-svn-id: https://svn.code.sf.net/p/freedos/svn/kernel/trunk@861 6ac86273-5f31-0410-b378-82cca8765d1b
2004-04-10 15:11:16 +00:00
Bart Oldeman
147f4069e4
Make CS the same for INIT and HMA text for Watcom. Move HMA text up
...
in kernel.asm. Use std for the memory move: helps if there's overlap
(PCs with a very low amount of RAM).
git-svn-id: https://svn.code.sf.net/p/freedos/svn/kernel/trunk@860 6ac86273-5f31-0410-b378-82cca8765d1b
2004-04-10 14:18:25 +00:00
Bart Oldeman
e6e3b7a3a4
Use the "small" model for the init code (split code/data). This will enable
...
us to use the same CS for resident and init code for Watcom (Borland's
too big), and share a bit.
git-svn-id: https://svn.code.sf.net/p/freedos/svn/kernel/trunk@859 6ac86273-5f31-0410-b378-82cca8765d1b
2004-04-10 10:59:57 +00:00
Bart Oldeman
512f48e962
Use pointer to MK_FP(0,0x5e0) to save a bit of code.
...
git-svn-id: https://svn.code.sf.net/p/freedos/svn/kernel/trunk@858 6ac86273-5f31-0410-b378-82cca8765d1b
2004-04-10 09:38:38 +00:00
Bart Oldeman
78995ad7cc
Move some common code into a "push_ddt" function.
...
git-svn-id: https://svn.code.sf.net/p/freedos/svn/kernel/trunk@857 6ac86273-5f31-0410-b378-82cca8765d1b
2004-04-10 09:37:45 +00:00
Bart Oldeman
cfed8c6f29
We must do "sbb ax, ax" *before* "popf" otherwise it won't be predictable!
...
git-svn-id: https://svn.code.sf.net/p/freedos/svn/kernel/trunk@856 6ac86273-5f31-0410-b378-82cca8765d1b
2004-04-09 23:51:44 +00:00
Bart Oldeman
11e57c64db
fmemcpy->memcpy
...
git-svn-id: https://svn.code.sf.net/p/freedos/svn/kernel/trunk@855 6ac86273-5f31-0410-b378-82cca8765d1b
2004-04-09 16:08:57 +00:00
Bart Oldeman
6e6e34024b
Make UMB_get_largest "pascal". Let it use the xms driver address from
...
the HMA code. Misc small config.c cleanups.
The uncompressed 386/fat32 kernel is now below 70000 bytes (69896).
git-svn-id: https://svn.code.sf.net/p/freedos/svn/kernel/trunk@854 6ac86273-5f31-0410-b378-82cca8765d1b
2004-04-09 15:43:01 +00:00
Bart Oldeman
4af102b61f
"Cache" far drive data table near. Enable to eliminate many far
...
pointers in initdisk.c. Also clear up ConvPartTableEntryToIntern --
most of the casts were completely unnecessary.
git-svn-id: https://svn.code.sf.net/p/freedos/svn/kernel/trunk@853 6ac86273-5f31-0410-b378-82cca8765d1b
2004-04-09 15:39:56 +00:00
Bart Oldeman
c415f74ee4
Use pascal calling conventions for all clock related asm functions.
...
git-svn-id: https://svn.code.sf.net/p/freedos/svn/kernel/trunk@852 6ac86273-5f31-0410-b378-82cca8765d1b
2004-04-09 13:47:20 +00:00
Bart Oldeman
c5f6ed4aa8
Use pascal calling conventions for the remaining intr() functions (XMS
...
related)
git-svn-id: https://svn.code.sf.net/p/freedos/svn/kernel/trunk@851 6ac86273-5f31-0410-b378-82cca8765d1b
2004-04-09 13:13:06 +00:00
Bart Oldeman
7012672d7d
Use pascal calling conventions for floppy asm functions.
...
git-svn-id: https://svn.code.sf.net/p/freedos/svn/kernel/trunk@850 6ac86273-5f31-0410-b378-82cca8765d1b
2004-04-09 13:11:25 +00:00
Bart Oldeman
950078ad08
Use the pascal calling convention for most intr.asm functions, and let
...
them pop the stack (smaller code than using bx).
Tell Watcom which registers are clobbered; save some more registers
for intr() -- especially for intr() this helps.
git-svn-id: https://svn.code.sf.net/p/freedos/svn/kernel/trunk@849 6ac86273-5f31-0410-b378-82cca8765d1b
2004-04-09 11:37:40 +00:00
Bart Oldeman
a7ca14c46c
Use pascal calling conventions for execrh().
...
git-svn-id: https://svn.code.sf.net/p/freedos/svn/kernel/trunk@848 6ac86273-5f31-0410-b378-82cca8765d1b
2004-04-09 11:16:03 +00:00
Bart Oldeman
00e9730e32
Fix typo
...
git-svn-id: https://svn.code.sf.net/p/freedos/svn/kernel/trunk@847 6ac86273-5f31-0410-b378-82cca8765d1b
2004-04-09 11:01:34 +00:00
Bart Oldeman
0897ba9b38
Use the "-r" switch for Watcom to preserve ES around calls -- saves ~350
...
bytes.
git-svn-id: https://svn.code.sf.net/p/freedos/svn/kernel/trunk@846 6ac86273-5f31-0410-b378-82cca8765d1b
2004-04-07 16:16:07 +00:00
Bart Oldeman
7ae98cee2a
Introduce VA_CDECL: only Turbo C 2.01 needs an explicit cdecl for printf,
...
all other compilers can use it with pascal or "register" calling conventions.
Saves ~50 bytes for the init code.
git-svn-id: https://svn.code.sf.net/p/freedos/svn/kernel/trunk@845 6ac86273-5f31-0410-b378-82cca8765d1b
2004-04-07 16:13:23 +00:00
Bart Oldeman
e56f81d6a9
Use xreg struct and macros to optimize the int2f/12,4a handler a bit
...
~25 bytes (mostly from Arkady)
git-svn-id: https://svn.code.sf.net/p/freedos/svn/kernel/trunk@844 6ac86273-5f31-0410-b378-82cca8765d1b
2004-04-06 23:51:33 +00:00
Bart Oldeman
ab21f9be76
buffer intersection check should use > instead of >= (spotted by Arkady)
...
small optimization -- the segment in bp == firstbuf is always the same
so we just need to compare offsets.
git-svn-id: https://svn.code.sf.net/p/freedos/svn/kernel/trunk@843 6ac86273-5f31-0410-b378-82cca8765d1b
2004-04-06 23:03:51 +00:00
Bart Oldeman
83f044fbe0
Use strchr and strlen more often; also use strchr in the init code.
...
git-svn-id: https://svn.code.sf.net/p/freedos/svn/kernel/trunk@842 6ac86273-5f31-0410-b378-82cca8765d1b
2004-04-06 22:48:12 +00:00
Bart Oldeman
deecf43882
Better to call fmemset than to do things manually.
...
git-svn-id: https://svn.code.sf.net/p/freedos/svn/kernel/trunk@841 6ac86273-5f31-0410-b378-82cca8765d1b
2004-04-06 16:38:01 +00:00
Bart Oldeman
8ea4701226
Preserve bx and cx for WATCOMC in asmsupt.asm as well. Saves another
...
200 bytes.
git-svn-id: https://svn.code.sf.net/p/freedos/svn/kernel/trunk@840 6ac86273-5f31-0410-b378-82cca8765d1b
2004-04-06 16:29:27 +00:00
Bart Oldeman
8e80462093
Be more specific about which registers are clobbered by asmsupt.asm
...
functions. Preserve "ES" for Watcom.
Saves ~150 bytes resident, ~90 bytes nonresident, more for 386 kernels.
git-svn-id: https://svn.code.sf.net/p/freedos/svn/kernel/trunk@839 6ac86273-5f31-0410-b378-82cca8765d1b
2004-04-02 00:38:24 +00:00
Bart Oldeman
eed84806f8
dos_commit was missing a save_far_f_node() call. That caused the tar xzvf
...
problem. Also fixed the case when no far fnodes are available anymore.
git-svn-id: https://svn.code.sf.net/p/freedos/svn/kernel/trunk@837 6ac86273-5f31-0410-b378-82cca8765d1b
2004-03-27 17:12:16 +00:00
Bart Oldeman
03138b0ed4
explicitly use .bat for call, etc., otherwise 4DOS doesn't like us...
...
git-svn-id: https://svn.code.sf.net/p/freedos/svn/kernel/trunk@836 6ac86273-5f31-0410-b378-82cca8765d1b
2004-03-27 12:13:10 +00:00
Bart Oldeman
29bcbde334
It doesn't work with two * two % (at least in FreeCOM)
...
git-svn-id: https://svn.code.sf.net/p/freedos/svn/kernel/trunk@835 6ac86273-5f31-0410-b378-82cca8765d1b
2004-03-27 02:36:50 +00:00
Bart Oldeman
3fe15616e7
.BAT file cleanups from Arkady
...
git-svn-id: https://svn.code.sf.net/p/freedos/svn/kernel/trunk@834 6ac86273-5f31-0410-b378-82cca8765d1b
2004-03-27 01:42:33 +00:00
Bart Oldeman
66a756f1a3
Simplify memory access mode check.
...
git-svn-id: https://svn.code.sf.net/p/freedos/svn/kernel/trunk@833 6ac86273-5f31-0410-b378-82cca8765d1b
2004-03-27 00:35:34 +00:00
Bart Oldeman
db1a71bfff
Remove wrong "512" value for number of root directory entries on FAT32
...
partitions.
git-svn-id: https://svn.code.sf.net/p/freedos/svn/kernel/trunk@832 6ac86273-5f31-0410-b378-82cca8765d1b
2004-03-27 00:30:32 +00:00
Bart Oldeman
d5cb4e950c
Fixed screwed up comment sequence.
...
git-svn-id: https://svn.code.sf.net/p/freedos/svn/kernel/trunk@831 6ac86273-5f31-0410-b378-82cca8765d1b
2004-03-27 00:27:11 +00:00
Bart Oldeman
9aa77bef50
Get rid of SFT_M* mode values. O_* values are sufficient.
...
git-svn-id: https://svn.code.sf.net/p/freedos/svn/kernel/trunk@830 6ac86273-5f31-0410-b378-82cca8765d1b
2004-03-27 00:23:06 +00:00
Bart Oldeman
1fb4a30294
Add forward declaration for config_init_fnodes. Made static too.
...
git-svn-id: https://svn.code.sf.net/p/freedos/svn/kernel/trunk@829 6ac86273-5f31-0410-b378-82cca8765d1b
2004-03-26 23:27:18 +00:00
Bart Oldeman
0f4d6ea6a1
Define O_ACCMODE and use it instead of "3" for the open access mask.
...
git-svn-id: https://svn.code.sf.net/p/freedos/svn/kernel/trunk@828 6ac86273-5f31-0410-b378-82cca8765d1b
2004-03-26 23:20:55 +00:00
Bart Oldeman
46b58be248
Change default STACKS= size to 256.
...
git-svn-id: https://svn.code.sf.net/p/freedos/svn/kernel/trunk@827 6ac86273-5f31-0410-b378-82cca8765d1b
2004-03-26 23:15:23 +00:00
Bart Oldeman
ba0b070222
Allocate fnodes in the HMA instead of in an UMB
...
git-svn-id: https://svn.code.sf.net/p/freedos/svn/kernel/trunk@826 6ac86273-5f31-0410-b378-82cca8765d1b
2004-03-26 23:10:13 +00:00
Bart Oldeman
9db450a9b7
Remove lpOldTop variable. It is no longer necessary (has not been
...
for some time) and the assignment in config_init_buffers() was
wrong (screwed up fnodes, so that buffers overlapped fnodes...).
This should fix most of the reported fnode problems.
git-svn-id: https://svn.code.sf.net/p/freedos/svn/kernel/trunk@825 6ac86273-5f31-0410-b378-82cca8765d1b
2004-03-26 21:50:12 +00:00
Bart Oldeman
9c14e2f86d
Misc small cleanups.
...
git-svn-id: https://svn.code.sf.net/p/freedos/svn/kernel/trunk@824 6ac86273-5f31-0410-b378-82cca8765d1b
2004-03-26 11:26:55 +00:00
Bart Oldeman
416e1014cf
Declare save_far_fnode before use.
...
git-svn-id: https://svn.code.sf.net/p/freedos/svn/kernel/trunk@823 6ac86273-5f31-0410-b378-82cca8765d1b
2004-03-25 00:42:27 +00:00
Bart Oldeman
d17f333243
From Lucho (and I think Arkady had this as well at some point):
...
save 33 bytes by eliminating a switch for memory/UMB access modes.
git-svn-id: https://svn.code.sf.net/p/freedos/svn/kernel/trunk@822 6ac86273-5f31-0410-b378-82cca8765d1b
2004-03-25 00:20:20 +00:00
Bart Oldeman
f63eea565a
Made the main fnodes far so they can be in UMBs.
...
Internally the kernel uses two near fnodes though, to save on codesize
and fmemcpy's if necessary. Having memory management on two fnodes is
a little silly but I just want to make sure with the panic message
that we never accidentally try to use three near fnodes at the same time.
(two are used at the same time by rename, commit, and merge_file_changes).
This can be cleaned up later.
Anyway. 644736 bytes free conv memory isn't bad.
git-svn-id: https://svn.code.sf.net/p/freedos/svn/kernel/trunk@821 6ac86273-5f31-0410-b378-82cca8765d1b
2004-03-23 22:45:38 +00:00
Bart Oldeman
13ab8971fd
Code size reduction and dead code removal from Lucho.
...
git-svn-id: https://svn.code.sf.net/p/freedos/svn/kernel/trunk@820 6ac86273-5f31-0410-b378-82cca8765d1b
2004-03-23 22:03:20 +00:00
Bart Oldeman
d39d3a84f4
Merge three almost identical pieces of code used to allocate a new
...
directory entry in creat, rename, and mkdir, into alloc_find_free.
git-svn-id: https://svn.code.sf.net/p/freedos/svn/kernel/trunk@819 6ac86273-5f31-0410-b378-82cca8765d1b
2004-03-23 01:36:16 +00:00
Bart Oldeman
05cd65a193
Merge find_fat_free() and extend() -- they were almost identical.
...
Have a simplified clause for f_cluster == FREE.
Set f_cluster = FREE in shrink_file if the file is set to 0 bytes; in
that case we should set the current cluster to FREE even if it is
currently a LONG_LAST_CLUSTER.
git-svn-id: https://svn.code.sf.net/p/freedos/svn/kernel/trunk@818 6ac86273-5f31-0410-b378-82cca8765d1b
2004-03-23 00:45:24 +00:00