Commit Graph

479 Commits

Author SHA1 Message Date
Bart Oldeman
237016c1d0 Move memset up a little else it would overwrite too much.
git-svn-id: https://svn.code.sf.net/p/freedos/svn/kernel/trunk@881 6ac86273-5f31-0410-b378-82cca8765d1b
2004-04-14 08:50:35 +00:00
Bart Oldeman
68c3f9ad13 Lucho reported that MSC compiled kernels now work after all. Let's mark
those nasty "BSS" variables explicitly then to try to avoid future problems.


git-svn-id: https://svn.code.sf.net/p/freedos/svn/kernel/trunk@880 6ac86273-5f31-0410-b378-82cca8765d1b
2004-04-13 23:46:25 +00:00
Bart Oldeman
6f6ceadebc As per a suggestion from Arkady: use CPU to enforce 8086 etc instructions.
git-svn-id: https://svn.code.sf.net/p/freedos/svn/kernel/trunk@879 6ac86273-5f31-0410-b378-82cca8765d1b
2004-04-13 20:41:15 +00:00
Bart Oldeman
74970d953b Correct int21/ax=4401: returned AL = old value, should set CY and DE_INVLDDATA
if DH!=0 (RBIL is a little confusing here).


git-svn-id: https://svn.code.sf.net/p/freedos/svn/kernel/trunk@878 6ac86273-5f31-0410-b378-82cca8765d1b
2004-04-13 20:37:30 +00:00
Bart Oldeman
fed4d61e90 Fix new LBA problem.
git-svn-id: https://svn.code.sf.net/p/freedos/svn/kernel/trunk@877 6ac86273-5f31-0410-b378-82cca8765d1b
2004-04-13 17:21:30 +00:00
Bart Oldeman
541b994f99 Correct another shr ...,4
git-svn-id: https://svn.code.sf.net/p/freedos/svn/kernel/trunk@876 6ac86273-5f31-0410-b378-82cca8765d1b
2004-04-13 17:16:39 +00:00
Bart Oldeman
c899541e2e Converted nxtMCBsize back to a macro. There is no need to use far2para;
FP_SEG works fine since MCBs always have offset 0.


git-svn-id: https://svn.code.sf.net/p/freedos/svn/kernel/trunk@875 6ac86273-5f31-0410-b378-82cca8765d1b
2004-04-13 12:13:03 +00:00
Bart Oldeman
e9716d990d Document the fact the MSCL8 compiled kernels don't work.
Don't initialize BSS variables anymore -- now done by the memset in main.c
Removed obsolete BYTE cfgCSYS_fnam[NAMEMAX]; config variable.
Changed cfgInit and cfgInitTail to pointers, adjusted some code to work
with them.


git-svn-id: https://svn.code.sf.net/p/freedos/svn/kernel/trunk@874 6ac86273-5f31-0410-b378-82cca8765d1b
2004-04-13 11:54:09 +00:00
Bart Oldeman
06de625da2 The screen position (for TABs) is only for raw *CONOUT* devices already
updated in dosfns.c


git-svn-id: https://svn.code.sf.net/p/freedos/svn/kernel/trunk@873 6ac86273-5f31-0410-b378-82cca8765d1b
2004-04-13 11:21:29 +00:00
Bart Oldeman
3e1c1a526f AllocateHMASpace needs to check FP_SEG(firstbuf) for 0xffff, since the
buffers may not live in the HMA.


git-svn-id: https://svn.code.sf.net/p/freedos/svn/kernel/trunk@872 6ac86273-5f31-0410-b378-82cca8765d1b
2004-04-13 11:11:09 +00:00
Bart Oldeman
e5f882f2ec Use AL, not AX, for int2f/ax=1213, as per RBIL (from Arkady)
git-svn-id: https://svn.code.sf.net/p/freedos/svn/kernel/trunk@871 6ac86273-5f31-0410-b378-82cca8765d1b
2004-04-13 11:07:59 +00:00
Bart Oldeman
46df83483b Make unnecessary far pointers near.
git-svn-id: https://svn.code.sf.net/p/freedos/svn/kernel/trunk@870 6ac86273-5f31-0410-b378-82cca8765d1b
2004-04-13 11:02:36 +00:00
Bart Oldeman
2aa4789bfc (From Arkady) Avoid "shr cx,4" (it doesn't work on the 8088)
git-svn-id: https://svn.code.sf.net/p/freedos/svn/kernel/trunk@869 6ac86273-5f31-0410-b378-82cca8765d1b
2004-04-13 10:58:06 +00:00
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
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
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
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
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
Bart Oldeman
ce290a033f Eliminate f_back field.
extend() now uses f_cluster instead of f_back, while map_cluster makes
sure it's not set to LONG_LAST_CLUSTER (but to the cluster before it)
when calling extend().
extend() and first_fat() now return the new cluster number or
LONG_LAST_CLUSTER, just like find_fat_free()
Hopefully I didn't break anything... Initial testing was successful.


git-svn-id: https://svn.code.sf.net/p/freedos/svn/kernel/trunk@816 6ac86273-5f31-0410-b378-82cca8765d1b
2004-03-22 22:33:05 +00:00
Bart Oldeman
7e91d9cf9d Revert accidental "changeline for hard disks" change.
git-svn-id: https://svn.code.sf.net/p/freedos/svn/kernel/trunk@815 6ac86273-5f31-0410-b378-82cca8765d1b
2004-03-22 17:50:53 +00:00
Bart Oldeman
df538bb32a Eliminated f_sector and f_boff fields from fnodes.
git-svn-id: https://svn.code.sf.net/p/freedos/svn/kernel/trunk@814 6ac86273-5f31-0410-b378-82cca8765d1b
2004-03-22 16:56:34 +00:00
Bart Oldeman
b0009452ee Remove add_far. adjust_far can do the job.
git-svn-id: https://svn.code.sf.net/p/freedos/svn/kernel/trunk@813 6ac86273-5f31-0410-b378-82cca8765d1b
2004-03-22 16:38:46 +00:00
Bart Oldeman
c73ee8084a Remove the 65535 check for root directories. It's checked against
a different limit later anyway later, and it breaks remove_lfn_entries...


git-svn-id: https://svn.code.sf.net/p/freedos/svn/kernel/trunk@812 6ac86273-5f31-0410-b378-82cca8765d1b
2004-03-22 15:43:56 +00:00
Bart Oldeman
11a7b69e5c Make f_diroff an entry offset so it can be 16bits. Enforce the 65536
entry limit in dir_read(). Saves 80 bytes or so + 2 bytes in every f_node.


git-svn-id: https://svn.code.sf.net/p/freedos/svn/kernel/trunk@811 6ac86273-5f31-0410-b378-82cca8765d1b
2004-03-22 10:29:26 +00:00
Bart Oldeman
1285c36f8c Echo input LF as CR-LF unless it's the first character. Never store LF
in the buffer.


git-svn-id: https://svn.code.sf.net/p/freedos/svn/kernel/trunk@810 6ac86273-5f31-0410-b378-82cca8765d1b
2004-03-21 23:25:53 +00:00
Bart Oldeman
43ca8741b0 echo ^C to stdout, not stdin or stderr.
git-svn-id: https://svn.code.sf.net/p/freedos/svn/kernel/trunk@809 6ac86273-5f31-0410-b378-82cca8765d1b
2004-03-21 22:01:41 +00:00
Bart Oldeman
600e02b1b4 A few suggestions from Arkady. Saves 5 bytes.
git-svn-id: https://svn.code.sf.net/p/freedos/svn/kernel/trunk@808 6ac86273-5f31-0410-b378-82cca8765d1b
2004-03-21 15:31:45 +00:00
Bart Oldeman
82261c0caf add_far can get away with adding 16 bit offsets only. Saves ~200 bytes!
git-svn-id: https://svn.code.sf.net/p/freedos/svn/kernel/trunk@807 6ac86273-5f31-0410-b378-82cca8765d1b
2004-03-21 13:56:13 +00:00
Bart Oldeman
00ef6b1be2 Eliminated long2para and avoided use of "long"s in DosExeLoader, using
paragraphs to measure size instead. Saves ~130 bytes together.


git-svn-id: https://svn.code.sf.net/p/freedos/svn/kernel/trunk@806 6ac86273-5f31-0410-b378-82cca8765d1b
2004-03-21 12:36:47 +00:00
Bart Oldeman
7bf976be3f Saved ~75 bytes in printf and by elimination of fstrlen. There's only one
call and inlining doesn't increase the size.


git-svn-id: https://svn.code.sf.net/p/freedos/svn/kernel/trunk@803 6ac86273-5f31-0410-b378-82cca8765d1b
2004-03-20 10:41:30 +00:00
Bart Oldeman
28be8284a8 Eliminate intr() from resident code. Saves ~200 bytes of HMA resident code.
Also made the nls.c functions SS!=DS safe.


git-svn-id: https://svn.code.sf.net/p/freedos/svn/kernel/trunk@802 6ac86273-5f31-0410-b378-82cca8765d1b
2004-03-19 22:33:48 +00:00
Bart Oldeman
329c7c6e6a Remove wrong automatic "*.*" code from Lixing Yuan -- return DE_PATHNOTFND
or D_NFILES instead (mostly from Lucho)


git-svn-id: https://svn.code.sf.net/p/freedos/svn/kernel/trunk@800 6ac86273-5f31-0410-b378-82cca8765d1b
2004-03-17 22:04:40 +00:00
Bart Oldeman
69faceffe5 int21/ah=26: new_psp now copies the old psp and just sets a few fields
int21/ah=55: child_psp does the rest
init code does the init (fixed values are always copied now)


git-svn-id: https://svn.code.sf.net/p/freedos/svn/kernel/trunk@799 6ac86273-5f31-0410-b378-82cca8765d1b
2004-03-17 21:28:54 +00:00
Bart Oldeman
77331799bd Commit each close, even if the ref count is > 0.
git-svn-id: https://svn.code.sf.net/p/freedos/svn/kernel/trunk@798 6ac86273-5f31-0410-b378-82cca8765d1b
2004-03-17 20:32:55 +00:00
Bart Oldeman
0f56cb2b3b From Lucho: move the lock/unlock simulation of success before the device
GENIOCTL check so that it applies to any device.


git-svn-id: https://svn.code.sf.net/p/freedos/svn/kernel/trunk@797 6ac86273-5f31-0410-b378-82cca8765d1b
2004-03-07 13:07:05 +00:00
Bart Oldeman
0d6d0b8523 (with Lucho) -- remove the dosnames path 67 length check. Review the places
where it really matters (chdir and mkdir).


git-svn-id: https://svn.code.sf.net/p/freedos/svn/kernel/trunk@796 6ac86273-5f31-0410-b378-82cca8765d1b
2004-03-07 12:59:38 +00:00
Bart Oldeman
3e3c05ff22 From Lucho: enable interactive re-execution of the SHELL.
git-svn-id: https://svn.code.sf.net/p/freedos/svn/kernel/trunk@795 6ac86273-5f31-0410-b378-82cca8765d1b
2004-03-07 12:19:43 +00:00
Bart Oldeman
d61defe941 From Lucho: move NLS #defines to nls.h. Move config structure to config.h.
Some cosmetic changes.


git-svn-id: https://svn.code.sf.net/p/freedos/svn/kernel/trunk@794 6ac86273-5f31-0410-b378-82cca8765d1b
2004-03-07 11:56:14 +00:00
Bart Oldeman
1c6f3640a3 Borland C (unlike Turbo C) didn't like this pseudo register use.
git-svn-id: https://svn.code.sf.net/p/freedos/svn/kernel/trunk@792 6ac86273-5f31-0410-b378-82cca8765d1b
2004-03-07 11:09:52 +00:00
Bart Oldeman
a779a14070 Merge "suspect partition" copy/paste code into functions.
git-svn-id: https://svn.code.sf.net/p/freedos/svn/kernel/trunk@790 6ac86273-5f31-0410-b378-82cca8765d1b
2004-02-24 23:46:04 +00:00
Bart Oldeman
d06b147cb0 Save a couple bytes by moving the strncmp_retzero block.
git-svn-id: https://svn.code.sf.net/p/freedos/svn/kernel/trunk@789 6ac86273-5f31-0410-b378-82cca8765d1b
2004-02-24 23:24:27 +00:00
Bart Oldeman
216f51cb65 Use memcpy instead of fmemcpy where possible.
git-svn-id: https://svn.code.sf.net/p/freedos/svn/kernel/trunk@788 6ac86273-5f31-0410-b378-82cca8765d1b
2004-02-24 13:11:14 +00:00
Bart Oldeman
5214472bf7 Use asmsupt string and mem functions for the init code too.
git-svn-id: https://svn.code.sf.net/p/freedos/svn/kernel/trunk@787 6ac86273-5f31-0410-b378-82cca8765d1b
2004-02-24 00:25:56 +00:00
Bart Oldeman
47ae1ab1d3 From Lucho: fix EBDA problems with INSTALL. This fixes the weird
fmemcpy lockup; in reality kernel init code was overwritten.


git-svn-id: https://svn.code.sf.net/p/freedos/svn/kernel/trunk@786 6ac86273-5f31-0410-b378-82cca8765d1b
2004-02-23 23:41:17 +00:00
Bart Oldeman
f03eba4e15 Remove unused variable lpFcb.
git-svn-id: https://svn.code.sf.net/p/freedos/svn/kernel/trunk@779 6ac86273-5f31-0410-b378-82cca8765d1b
2004-02-09 19:35:50 +00:00
Bart Oldeman
0081bfe408 Don't call truename from FcbNameInit(). It was only necessary for "FcbRename",
which can call it itself. This avoids yesterday's hack.


git-svn-id: https://svn.code.sf.net/p/freedos/svn/kernel/trunk@778 6ac86273-5f31-0410-b378-82cca8765d1b
2004-02-09 19:32:22 +00:00
Bart Oldeman
b34b68a265 FcbOpen/FcbFindFirstNext:
Fix a consequence of truename's funny behaviour:
truename(c:nul) = c:/nul and truename(c:/nul) = c:\nul
and for FCBs it's still easiest to call truename twice
so we have to copy c:/nul back to c:nul to compensate.
This fixes the EJECT problem from Lucho.


git-svn-id: https://svn.code.sf.net/p/freedos/svn/kernel/trunk@777 6ac86273-5f31-0410-b378-82cca8765d1b
2004-02-08 20:58:09 +00:00
Bart Oldeman
de444743cc Define I386 and I186 more cleanly.
Add (UWORD) casts to silence the compiler.
Optimize (head*sector) to secs_per_cyl
Add BORLANDC to compiler list and simplify startup printf to one message.
#pragma enable_message(130) for Watcom C causes it to behave a little more
like Borland in terms of warnings.


git-svn-id: https://svn.code.sf.net/p/freedos/svn/kernel/trunk@776 6ac86273-5f31-0410-b378-82cca8765d1b
2004-02-07 18:16:27 +00:00
Bart Oldeman
0e0abcd685 Added explicit (UWORD) type casts to avoid compiler warnings and sometimes
save a few bytes too. Also changed the FcbParseFname return value:
returns offset portion of pointer (SI) instead of the number of bytes to
be added to SI.


git-svn-id: https://svn.code.sf.net/p/freedos/svn/kernel/trunk@775 6ac86273-5f31-0410-b378-82cca8765d1b
2004-02-07 18:04:50 +00:00
Bart Oldeman
4950f7483b From Lucho: fixes the CHKDSK I: "Invalid drive specification" bug
git-svn-id: https://svn.code.sf.net/p/freedos/svn/kernel/trunk@773 6ac86273-5f31-0410-b378-82cca8765d1b
2004-02-06 20:55:55 +00:00
Bart Oldeman
8b384359e0 Update LSM & copyright year.
git-svn-id: https://svn.code.sf.net/p/freedos/svn/kernel/trunk@767 6ac86273-5f31-0410-b378-82cca8765d1b
2004-01-31 16:04:00 +00:00
Bart Oldeman
42b55cd1ac allow "0" in full-screen config menus and plug a few potential related
overflows.


git-svn-id: https://svn.code.sf.net/p/freedos/svn/kernel/trunk@765 6ac86273-5f31-0410-b378-82cca8765d1b
2004-01-31 15:06:36 +00:00
Bart Oldeman
272f86af3d Corrections to get past turbo c warnings.
git-svn-id: https://svn.code.sf.net/p/freedos/svn/kernel/trunk@764 6ac86273-5f31-0410-b378-82cca8765d1b
2004-01-31 15:04:09 +00:00
Bart Oldeman
2b9e17a680 Only put PATH= in the environment if it's still empty just before
executing the shell. This repairs SET PATH=.... in config.sys without
confusing anyone.


git-svn-id: https://svn.code.sf.net/p/freedos/svn/kernel/trunk@762 6ac86273-5f31-0410-b378-82cca8765d1b
2004-01-31 11:39:50 +00:00
Bart Oldeman
5567aba08b Fixed bug #1722: dir_close() was called for normal files (via map_cluster
and find_fat_free). This completely messed up rwblock. Removed these calls
(for directories they are already covered at a higher level) and added
a few sanity checks to dir_close and dir_write.


git-svn-id: https://svn.code.sf.net/p/freedos/svn/kernel/trunk@761 6ac86273-5f31-0410-b378-82cca8765d1b
2004-01-27 23:18:24 +00:00
Bart Oldeman
d4f6a7104b Clean up scr_pos updating routines: combine into update_scr_pos() function
instead of 2 copies of the same thing.


git-svn-id: https://svn.code.sf.net/p/freedos/svn/kernel/trunk@760 6ac86273-5f31-0410-b378-82cca8765d1b
2004-01-27 20:07:28 +00:00
Bart Oldeman
b7491eba32 Expand tabs for int21/ah=2,9 even in raw device modes and if stdout is
redirected. This solves bug 1737 (grep2msg problem)
This copy&paste exercise is to be cleaned up a bit later!


git-svn-id: https://svn.code.sf.net/p/freedos/svn/kernel/trunk@759 6ac86273-5f31-0410-b378-82cca8765d1b
2004-01-27 19:26:58 +00:00
Bart Oldeman
828a125aed Have to move attr/flags init before switch, otherwise they won't work!
git-svn-id: https://svn.code.sf.net/p/freedos/svn/kernel/trunk@758 6ac86273-5f31-0410-b378-82cca8765d1b
2004-01-27 12:42:45 +00:00
Bart Oldeman
44e4319e93 Save ~100 bytes by replacing s->sft_flags with flags,
s->sft_dev->dh_attr with attr and simplifying the if() statement a bit


git-svn-id: https://svn.code.sf.net/p/freedos/svn/kernel/trunk@757 6ac86273-5f31-0410-b378-82cca8765d1b
2004-01-26 19:43:06 +00:00
Bart Oldeman
eecbe8439a Adapted from Chris Rodie's patch for bugzilla #1730:
do a device input status request for int21/ax=4406 for devices
(not for files).


git-svn-id: https://svn.code.sf.net/p/freedos/svn/kernel/trunk@756 6ac86273-5f31-0410-b378-82cca8765d1b
2004-01-26 19:40:13 +00:00
Bart Oldeman
a9c00dcf86 Adapted from Chris Rodie's patch (bugzilla #1729):
"open" and "close" should call the open/close functions for devices using
a device request when appropriate.


git-svn-id: https://svn.code.sf.net/p/freedos/svn/kernel/trunk@755 6ac86273-5f31-0410-b378-82cca8765d1b
2004-01-26 13:18:13 +00:00
Bart Oldeman
3d7d36cf91 Using a FAT32 table so that FATs won't be too big for drives <= 64 GB
git-svn-id: https://svn.code.sf.net/p/freedos/svn/kernel/trunk@754 6ac86273-5f31-0410-b378-82cca8765d1b
2004-01-26 02:01:34 +00:00
Bart Oldeman
4f1a117069 * FAT32 kernels should ignore the upper word of the cluster number for
FAT16 partitions (just like FAT16 kernels do)
* added extra checks to make sure that invalid FAT entries are never
  followed
* made put_console() public to be able to print a message in case of
  FAT corruption
* some small optimizations and header cleanups (some suggested by Arkady)


git-svn-id: https://svn.code.sf.net/p/freedos/svn/kernel/trunk@753 6ac86273-5f31-0410-b378-82cca8765d1b
2004-01-26 00:51:49 +00:00
Bart Oldeman
dacd24e524 Make strupr code unambiguous
git-svn-id: https://svn.code.sf.net/p/freedos/svn/kernel/trunk@752 6ac86273-5f31-0410-b378-82cca8765d1b
2004-01-26 00:47:56 +00:00
Bart Oldeman
3819d769a7 From Lucho: clean up *.lnk files for "clean" and "clobber".
git-svn-id: https://svn.code.sf.net/p/freedos/svn/kernel/trunk@750 6ac86273-5f31-0410-b378-82cca8765d1b
2004-01-25 22:37:20 +00:00
Bart Oldeman
c0a292ae04 From Lucho: the DJ mechanism needs to affect
--------D-M00500004--------------------------
MEM 0050h:0004h - MS-DOS - LOGICAL DRIVE FOR SINGLE-FLOPPY SYSTEM (A: / B:)
Size:   BYTE


git-svn-id: https://svn.code.sf.net/p/freedos/svn/kernel/trunk@749 6ac86273-5f31-0410-b378-82cca8765d1b
2004-01-25 22:35:53 +00:00
Bart Oldeman
6534691f85 from Lucho: basic implementation of
--------D-2F4A33-----------------------------
INT 2F - Windows95 - CHECK MS-DOS VERSION 7
necessary for SpinRite (Steve Gibson)


git-svn-id: https://svn.code.sf.net/p/freedos/svn/kernel/trunk@748 6ac86273-5f31-0410-b378-82cca8765d1b
2004-01-25 22:20:48 +00:00
Bart Oldeman
ee60fb10b8 From Lucho: implement
--------D-2F1211-----------------------------
INT 2F U - DOS 3.0+ internal - NORMALIZE ASCIZ FILENAME


git-svn-id: https://svn.code.sf.net/p/freedos/svn/kernel/trunk@747 6ac86273-5f31-0410-b378-82cca8765d1b
2004-01-25 22:12:30 +00:00
Bart Oldeman
36101b0d51 Fix missing (unsigned long) cast for multiplication: this fixes the
FAT16 calculation for the default bpb.


git-svn-id: https://svn.code.sf.net/p/freedos/svn/kernel/trunk@745 6ac86273-5f31-0410-b378-82cca8765d1b
2004-01-25 17:52:11 +00:00
Bart Oldeman
b92f552a57 Better (for FAT32) and simpler FAT default value calculations.
Also use 16-bit instead of 32-bit quantities where possible to save code size.


git-svn-id: https://svn.code.sf.net/p/freedos/svn/kernel/trunk@743 6ac86273-5f31-0410-b378-82cca8765d1b
2003-12-13 03:07:49 +00:00
Bart Oldeman
f1f51592ba MSC/TurboC compatibility fixes (Luchezar/Bart)
git-svn-id: https://svn.code.sf.net/p/freedos/svn/kernel/trunk@735 6ac86273-5f31-0410-b378-82cca8765d1b
2003-12-02 23:46:03 +00:00
Bart Oldeman
ef3e38de7b Rename blockio by rqblockio (namespace conflict with dsk.c)
git-svn-id: https://svn.code.sf.net/p/freedos/svn/kernel/trunk@734 6ac86273-5f31-0410-b378-82cca8765d1b
2003-12-02 23:34:43 +00:00
Bart Oldeman
76cb6edf6e Do not clobber the DTA if findfirst or findnext fails. Fixes bug #1712
git-svn-id: https://svn.code.sf.net/p/freedos/svn/kernel/trunk@733 6ac86273-5f31-0410-b378-82cca8765d1b
2003-12-01 00:45:38 +00:00
Bart Oldeman
a44981fc3a FAT32 kernels should fail int21/ah=71 with al=0, carry set.
git-svn-id: https://svn.code.sf.net/p/freedos/svn/kernel/trunk@729 6ac86273-5f31-0410-b378-82cca8765d1b
2003-11-30 15:49:53 +00:00
Bart Oldeman
21f2b2ec5e Fix nls upcase problem with SS!=DS.
git-svn-id: https://svn.code.sf.net/p/freedos/svn/kernel/trunk@728 6ac86273-5f31-0410-b378-82cca8765d1b
2003-11-30 04:08:27 +00:00
Bart Oldeman
a56e592871 Move permission check to better place (only for necessary for opening
existing files), not for creating them -- suggested by Steffen.


git-svn-id: https://svn.code.sf.net/p/freedos/svn/kernel/trunk@727 6ac86273-5f31-0410-b378-82cca8765d1b
2003-11-23 18:03:35 +00:00
Bart Oldeman
3232712fae force r/o open for FCB and legacy creat if the file is read-only
git-svn-id: https://svn.code.sf.net/p/freedos/svn/kernel/trunk@726 6ac86273-5f31-0410-b378-82cca8765d1b
2003-11-16 16:21:29 +00:00
Bart Oldeman
9f2208943c From Lucho with some help from Tom: initialize serial ports and retry
serial reads on timeout.


git-svn-id: https://svn.code.sf.net/p/freedos/svn/kernel/trunk@725 6ac86273-5f31-0410-b378-82cca8765d1b
2003-11-14 21:55:25 +00:00
Bart Oldeman
09dca9d224 Move common code in media_check() to a new blockio() function.
git-svn-id: https://svn.code.sf.net/p/freedos/svn/kernel/trunk@724 6ac86273-5f31-0410-b378-82cca8765d1b
2003-10-30 14:34:39 +00:00
Bart Oldeman
0694ff1acb (from Lucho) Remove AL=0 check for AH=6c
(from Arkady) Optimize DL check.


git-svn-id: https://svn.code.sf.net/p/freedos/svn/kernel/trunk@723 6ac86273-5f31-0410-b378-82cca8765d1b
2003-10-30 13:42:29 +00:00
Bart Oldeman
a0f4465045 From Eric Luttmann:
fix for multi-segment device drivers; preserve rq_endaddr between init
calls for the same driver.


git-svn-id: https://svn.code.sf.net/p/freedos/svn/kernel/trunk@722 6ac86273-5f31-0410-b378-82cca8765d1b
2003-10-30 12:22:06 +00:00
Bart Oldeman
8db46073f9 From: Eric Luttmann <ecl@users.sourceforge.net>
Fix for multisegmented device drivers: If there are multiple device
drivers in a single driver file, only the END ADDRESS returned by the
last INIT call should be the used.  It is recommended that all the
device drivers in the file return the same address.
This fixes a load problem with DUSE.


git-svn-id: https://svn.code.sf.net/p/freedos/svn/kernel/trunk@721 6ac86273-5f31-0410-b378-82cca8765d1b
2003-10-26 13:07:49 +00:00
Bart Oldeman
58808de6c8 Fix typo.
git-svn-id: https://svn.code.sf.net/p/freedos/svn/kernel/trunk@719 6ac86273-5f31-0410-b378-82cca8765d1b
2003-10-16 15:05:10 +00:00
Bart Oldeman
492fef1f72 Change FcbReadWrite to handle multiple records at once; this allows
for the optimization of FcbRandomBlockIO.


git-svn-id: https://svn.code.sf.net/p/freedos/svn/kernel/trunk@718 6ac86273-5f31-0410-b378-82cca8765d1b
2003-10-16 15:03:16 +00:00
Bart Oldeman
dd9df1f3a6 Divide optimisation (ceiling) + some small cleanups
git-svn-id: https://svn.code.sf.net/p/freedos/svn/kernel/trunk@717 6ac86273-5f31-0410-b378-82cca8765d1b
2003-10-16 14:25:15 +00:00
Bart Oldeman
61d87d82bb Rename the global lpFcb variable to sda_lpFcb. Then use local lpFcb
variables where necessary. This clears up the confusing shadowing.


git-svn-id: https://svn.code.sf.net/p/freedos/svn/kernel/trunk@716 6ac86273-5f31-0410-b378-82cca8765d1b
2003-10-16 13:01:55 +00:00
Bart Oldeman
fdb58291c4 Fix FCB problems with int21/ah=27,28 (RandomBlockIO)
git-svn-id: https://svn.code.sf.net/p/freedos/svn/kernel/trunk@715 6ac86273-5f31-0410-b378-82cca8765d1b
2003-10-11 23:58:51 +00:00
Bart Oldeman
11e163096d Added SET support to config.sys + some small cleanups (from Lucho)
git-svn-id: https://svn.code.sf.net/p/freedos/svn/kernel/trunk@714 6ac86273-5f31-0410-b378-82cca8765d1b
2003-10-05 16:22:57 +00:00
Bart Oldeman
3fa044c149 Implement support for int2f/ax=1220.
Fix int2f/ax=1216 (needs sft handles, not psp handles, and to return
the relative handle in BX, and to deal with carry)


git-svn-id: https://svn.code.sf.net/p/freedos/svn/kernel/trunk@712 6ac86273-5f31-0410-b378-82cca8765d1b
2003-10-05 13:30:47 +00:00
Bart Oldeman
bdc5569995 Set the Critical Error number immediately after calling a device driver.
This solves problems with int24 handlers that call int21/ah=59.
Let truename and blockrw return with an error if there is a critical error.
Don't overwrite the critical error # with the DOS error #.


git-svn-id: https://svn.code.sf.net/p/freedos/svn/kernel/trunk@709 6ac86273-5f31-0410-b378-82cca8765d1b
2003-09-24 19:34:11 +00:00
Bart Oldeman
6df5c0be61 Fix problem with loading multiple device drivers in one file: the
segment part in the header must be ignored.


git-svn-id: https://svn.code.sf.net/p/freedos/svn/kernel/trunk@708 6ac86273-5f31-0410-b378-82cca8765d1b
2003-09-24 18:53:44 +00:00
Bart Oldeman
9fd4a67e1d Correct segment for int21_handler to call for ctrl-c.
git-svn-id: https://svn.code.sf.net/p/freedos/svn/kernel/trunk@707 6ac86273-5f31-0410-b378-82cca8765d1b
2003-09-23 22:33:45 +00:00
Bart Oldeman
22dd4265cf Fix problem with character map service.
git-svn-id: https://svn.code.sf.net/p/freedos/svn/kernel/trunk@705 6ac86273-5f31-0410-b378-82cca8765d1b
2003-09-22 18:57:45 +00:00
Bart Oldeman
c4e02e8654 Correct floppy booting; increase "menu space tolerance" from 3 to 10.
git-svn-id: https://svn.code.sf.net/p/freedos/svn/kernel/trunk@701 6ac86273-5f31-0410-b378-82cca8765d1b
2003-09-19 02:13:35 +00:00
Bart Oldeman
df99dd3007 Use memcpy instead of fmemcpy; avoid downcasting from far to near.
git-svn-id: https://svn.code.sf.net/p/freedos/svn/kernel/trunk@698 6ac86273-5f31-0410-b378-82cca8765d1b
2003-09-18 21:00:09 +00:00
Bart Oldeman
d38750a538 From Michal Bakowski <mb@orad.pl>:
Change the boot drive to always be C: if DLASortByDriveNo==1


git-svn-id: https://svn.code.sf.net/p/freedos/svn/kernel/trunk@697 6ac86273-5f31-0410-b378-82cca8765d1b
2003-09-18 20:57:53 +00:00
Bart Oldeman
f489b1a1b1 Full screen config.sys menus (use MENUCOLOR=)
git-svn-id: https://svn.code.sf.net/p/freedos/svn/kernel/trunk@696 6ac86273-5f31-0410-b378-82cca8765d1b
2003-09-18 20:55:41 +00:00
Bart Oldeman
c20f68e73d Free memory if there is an error in the relocation table.
git-svn-id: https://svn.code.sf.net/p/freedos/svn/kernel/trunk@695 6ac86273-5f31-0410-b378-82cca8765d1b
2003-09-18 20:54:21 +00:00
Bart Oldeman
2f4e2d3a69 * add support for the far jmp at "int 30" (0000:00c0)
* mirror it for the HMA (ffff:00d0)
* put all DOS int handler (and the CPM entry jumped to from int30)
  jumpers in the "CONST" portion of DGROUP (instead of LGROUP)
  This helps Turbo C++ 1.01 make with the -S (swap) switch.
* adjustments to set the relevant PSP fields in task.c


git-svn-id: https://svn.code.sf.net/p/freedos/svn/kernel/trunk@694 6ac86273-5f31-0410-b378-82cca8765d1b
2003-09-16 12:38:02 +00:00
Bart Oldeman
7c241c59c6 Always use huge block sectors if the relevant bit is set in the device
header. This solves a problem with xmsdsk.


git-svn-id: https://svn.code.sf.net/p/freedos/svn/kernel/trunk@693 6ac86273-5f31-0410-b378-82cca8765d1b
2003-09-15 21:08:22 +00:00
Bart Oldeman
81654429d7 Small optimizations
git-svn-id: https://svn.code.sf.net/p/freedos/svn/kernel/trunk@692 6ac86273-5f31-0410-b378-82cca8765d1b
2003-09-15 10:55:58 +00:00
Bart Oldeman
7bcbfa999c Add missing (); small optimization for DosGet date/time.
git-svn-id: https://svn.code.sf.net/p/freedos/svn/kernel/trunk@691 6ac86273-5f31-0410-b378-82cca8765d1b
2003-09-15 10:54:43 +00:00
Bart Oldeman
178b66e6de Flip some slashes for Linux compat; simplifications in kernel/makefile
git-svn-id: https://svn.code.sf.net/p/freedos/svn/kernel/trunk@688 6ac86273-5f31-0410-b378-82cca8765d1b
2003-09-15 10:46:24 +00:00
Bart Oldeman
b0e54ff704 (with a little help from Arkady)
inthndler.c, chario.c, break.c simplifications and cleanups.
Pass a near pointer to the far pointer that points to the device instead
of an SFT index (in general).
Make cooked_write much faster by only testing for input every 32
characters.
No longer test for ctl_s on syscon if writing to the printer: just
read from the printer which will return zero characters.
Fix reading/writing zero characters by returning "256" (special code).
Adjust interfaces in other files.


git-svn-id: https://svn.code.sf.net/p/freedos/svn/kernel/trunk@683 6ac86273-5f31-0410-b378-82cca8765d1b
2003-09-09 17:43:43 +00:00
Bart Oldeman
8c22873b3e Initclk changes (mainly by Lucho)
git-svn-id: https://svn.code.sf.net/p/freedos/svn/kernel/trunk@682 6ac86273-5f31-0410-b378-82cca8765d1b
2003-09-09 17:33:23 +00:00
Bart Oldeman
b4bee283f9 (suggestion from Arkady)
if sizeof(struct ClockRecord) != rp->r_count error
move year init below reading the BIOS
remove trailing whitespace


git-svn-id: https://svn.code.sf.net/p/freedos/svn/kernel/trunk@681 6ac86273-5f31-0410-b378-82cca8765d1b
2003-09-09 17:32:20 +00:00
Bart Oldeman
59484b2fc9 EBDA corrections by Lucho
git-svn-id: https://svn.code.sf.net/p/freedos/svn/kernel/trunk@680 6ac86273-5f31-0410-b378-82cca8765d1b
2003-09-09 17:30:10 +00:00
Bart Oldeman
6cd84b06d1 init_device corrections/cleanups (mainly by Arkady)
git-svn-id: https://svn.code.sf.net/p/freedos/svn/kernel/trunk@679 6ac86273-5f31-0410-b378-82cca8765d1b
2003-09-09 17:29:19 +00:00
Bart Oldeman
72c8bf17b8 Support for switches=/e[[:]nnnn] and for moving the EBDA (with Lucho)
git-svn-id: https://svn.code.sf.net/p/freedos/svn/kernel/trunk@675 6ac86273-5f31-0410-b378-82cca8765d1b
2003-09-04 19:14:16 +00:00
Bart Oldeman
d1f48fb2b2 Add necessary "BootHardDiskSeconds" for non UPXed kernels.
git-svn-id: https://svn.code.sf.net/p/freedos/svn/kernel/trunk@674 6ac86273-5f31-0410-b378-82cca8765d1b
2003-09-04 19:07:55 +00:00
Bart Oldeman
1266a13f7f Add necessary casts to ? : constructions; cleanup read_line_handle a little.
git-svn-id: https://svn.code.sf.net/p/freedos/svn/kernel/trunk@673 6ac86273-5f31-0410-b378-82cca8765d1b
2003-09-04 19:05:27 +00:00
Bart Oldeman
67ef543bae Fix pointer overflow problem for reading line using handle.
git-svn-id: https://svn.code.sf.net/p/freedos/svn/kernel/trunk@671 6ac86273-5f31-0410-b378-82cca8765d1b
2003-09-01 17:49:40 +00:00
Bart Oldeman
bef6672954 Use 0x10000UL (avoids Turbo C warning)
git-svn-id: https://svn.code.sf.net/p/freedos/svn/kernel/trunk@667 6ac86273-5f31-0410-b378-82cca8765d1b
2003-08-31 10:22:32 +00:00
Bart Oldeman
8f1bbcd45d Set the PSP before the DTA. This solves an interrupt vector table corruption.
git-svn-id: https://svn.code.sf.net/p/freedos/svn/kernel/trunk@665 6ac86273-5f31-0410-b378-82cca8765d1b
2003-08-30 22:17:42 +00:00
Bart Oldeman
df5776dca7 Adjustments for MSVC.
git-svn-id: https://svn.code.sf.net/p/freedos/svn/kernel/trunk@663 6ac86273-5f31-0410-b378-82cca8765d1b
2003-08-28 21:03:47 +00:00
Bart Oldeman
f5a65b5992 int21/ax=440d lock/unlock logical/physical volume
simulate success for MS-DOS 7+ SCANDISK etc. --LG


git-svn-id: https://svn.code.sf.net/p/freedos/svn/kernel/trunk@662 6ac86273-5f31-0410-b378-82cca8765d1b
2003-08-28 20:55:34 +00:00
Bart Oldeman
7471b8f614 && should be || in check for \, / and :
git-svn-id: https://svn.code.sf.net/p/freedos/svn/kernel/trunk@661 6ac86273-5f31-0410-b378-82cca8765d1b
2003-08-28 20:53:21 +00:00
Bart Oldeman
4e0c27f016 Adjust registers used when starting programs. Some demos expect
undocumented values.


git-svn-id: https://svn.code.sf.net/p/freedos/svn/kernel/trunk@660 6ac86273-5f31-0410-b378-82cca8765d1b
2003-08-28 20:47:25 +00:00
Bart Oldeman
9b42b52056 Use "local" (instead of "global") disable/enable A20.
This solves the problems with NIOS.


git-svn-id: https://svn.code.sf.net/p/freedos/svn/kernel/trunk@656 6ac86273-5f31-0410-b378-82cca8765d1b
2003-08-28 20:32:01 +00:00
Bart Oldeman
c444161296 Use near bpb on the stack in bpb_to_dpb.
Make sure the number of FAT sectors is actually enough to hold that
many clusters. Otherwise back the number of clusters down (LG & AB)


git-svn-id: https://svn.code.sf.net/p/freedos/svn/kernel/trunk@655 6ac86273-5f31-0410-b378-82cca8765d1b
2003-08-28 20:30:09 +00:00
Bart Oldeman
68805961dc Don't disable a20 for "exit" int21/ah=4c
git-svn-id: https://svn.code.sf.net/p/freedos/svn/kernel/trunk@654 6ac86273-5f31-0410-b378-82cca8765d1b
2003-08-28 20:25:09 +00:00
Bart Oldeman
8a7b83ab63 Remove (unused) strncpy.
git-svn-id: https://svn.code.sf.net/p/freedos/svn/kernel/trunk@653 6ac86273-5f31-0410-b378-82cca8765d1b
2003-08-09 09:35:18 +00:00
Bart Oldeman
3229fe3fc4 From Luchezar: IOCTL 4406 provided reverse AL output on regular
files - FF if EOF, 0 if not. It should output 0 if EOF, FF if not.


git-svn-id: https://svn.code.sf.net/p/freedos/svn/kernel/trunk@651 6ac86273-5f31-0410-b378-82cca8765d1b
2003-08-06 19:47:24 +00:00
Bart Oldeman
2b0c219e5e Solve compilation problem with Borland C++ 3.1
git-svn-id: https://svn.code.sf.net/p/freedos/svn/kernel/trunk@649 6ac86273-5f31-0410-b378-82cca8765d1b
2003-08-03 10:44:29 +00:00
Bart Oldeman
96c1c46d60 Fix ctrl-break bug.
git-svn-id: https://svn.code.sf.net/p/freedos/svn/kernel/trunk@644 6ac86273-5f31-0410-b378-82cca8765d1b
2003-07-20 17:33:45 +00:00
Bart Oldeman
c672e81012 Correct problem with multiple UMBs
git-svn-id: https://svn.code.sf.net/p/freedos/svn/kernel/trunk@641 6ac86273-5f31-0410-b378-82cca8765d1b
2003-07-19 15:06:55 +00:00
Bart Oldeman
8a9dcfe8bb (from Tom) Fix a problem with the
'BootFromHarddiskIfNoKeyHit' option.
with some Compaq and Fujitsu/Siemens
Highend Equipment


git-svn-id: https://svn.code.sf.net/p/freedos/svn/kernel/trunk@640 6ac86273-5f31-0410-b378-82cca8765d1b
2003-07-15 12:32:35 +00:00
Bart Oldeman
dde7ba7791 There aren't lastdrive open file handles but a maximum of 20.
git-svn-id: https://svn.code.sf.net/p/freedos/svn/kernel/trunk@638 6ac86273-5f31-0410-b378-82cca8765d1b
2003-07-14 19:17:01 +00:00
Bart Oldeman
7f21061003 Make a message #ifdef DEBUG only.
git-svn-id: https://svn.code.sf.net/p/freedos/svn/kernel/trunk@637 6ac86273-5f31-0410-b378-82cca8765d1b
2003-07-12 20:57:23 +00:00
Bart Oldeman
756c578ca7 (joint with Luchezar Georgiev): add extra low disk buffer to avoid HMA
problems with certain device driver. Add an extra space for the device
driver command line and point to a correct environment for
INSTALL= (fixes problems with xmsdsk).


git-svn-id: https://svn.code.sf.net/p/freedos/svn/kernel/trunk@636 6ac86273-5f31-0410-b378-82cca8765d1b
2003-07-12 20:56:11 +00:00
Bart Oldeman
d7f6e1181f From Luchezar Georgiev: parameters were in the wrong order...
git-svn-id: https://svn.code.sf.net/p/freedos/svn/kernel/trunk@635 6ac86273-5f31-0410-b378-82cca8765d1b
2003-07-10 10:46:31 +00:00
Bart Oldeman
8c2eb41fc6 Correct typo.
git-svn-id: https://svn.code.sf.net/p/freedos/svn/kernel/trunk@634 6ac86273-5f31-0410-b378-82cca8765d1b
2003-06-30 18:52:43 +00:00
Bart Oldeman
0971f348b2 Small size optimization and INSTALLHIGH correction.
git-svn-id: https://svn.code.sf.net/p/freedos/svn/kernel/trunk@633 6ac86273-5f31-0410-b378-82cca8765d1b
2003-06-30 18:50:38 +00:00
Bart Oldeman
f91f2bac8d Small size optimizations.
git-svn-id: https://svn.code.sf.net/p/freedos/svn/kernel/trunk@632 6ac86273-5f31-0410-b378-82cca8765d1b
2003-06-30 18:46:37 +00:00
Bart Oldeman
c086225a9b Correct comment.
git-svn-id: https://svn.code.sf.net/p/freedos/svn/kernel/trunk@631 6ac86273-5f31-0410-b378-82cca8765d1b
2003-06-30 18:45:37 +00:00
Bart Oldeman
138afdab72 Declare more symbols as "ASM" to enable pascal calling conventions by
default for turbo compilers.


git-svn-id: https://svn.code.sf.net/p/freedos/svn/kernel/trunk@630 6ac86273-5f31-0410-b378-82cca8765d1b
2003-06-30 18:44:43 +00:00
Bart Oldeman
27ee8b1c74 Removed unnecessary jcxz's.
git-svn-id: https://svn.code.sf.net/p/freedos/svn/kernel/trunk@629 6ac86273-5f31-0410-b378-82cca8765d1b
2003-06-30 18:43:28 +00:00
Bart Oldeman
d60b01e511 intr() cleanup and small optimizations.
git-svn-id: https://svn.code.sf.net/p/freedos/svn/kernel/trunk@628 6ac86273-5f31-0410-b378-82cca8765d1b
2003-06-30 18:42:51 +00:00
Bart Oldeman
18fa8e0091 Slash conversion to enable cross compilation.
git-svn-id: https://svn.code.sf.net/p/freedos/svn/kernel/trunk@627 6ac86273-5f31-0410-b378-82cca8765d1b
2003-06-30 18:39:44 +00:00
Bart Oldeman
a69548773a Use PASCAL calling convention by default for turbo C
git-svn-id: https://svn.code.sf.net/p/freedos/svn/kernel/trunk@626 6ac86273-5f31-0410-b378-82cca8765d1b
2003-06-30 18:36:30 +00:00
Bart Oldeman
4780a1fc94 NLS changes from Steffen
git-svn-id: https://svn.code.sf.net/p/freedos/svn/kernel/trunk@625 6ac86273-5f31-0410-b378-82cca8765d1b
2003-06-27 22:02:57 +00:00
Bart Oldeman
2fdf99331d Added structure to nls.h; small main.c cleanup.
git-svn-id: https://svn.code.sf.net/p/freedos/svn/kernel/trunk@624 6ac86273-5f31-0410-b378-82cca8765d1b
2003-06-20 20:06:24 +00:00
Bart Oldeman
c5c7128a02 Move externs to header files; sft init cleanup (+3 files need to be low)
git-svn-id: https://svn.code.sf.net/p/freedos/svn/kernel/trunk@623 6ac86273-5f31-0410-b378-82cca8765d1b
2003-06-20 19:54:18 +00:00
Bart Oldeman
5bffd69d1d Fix bug in block device driver init of DPBs
git-svn-id: https://svn.code.sf.net/p/freedos/svn/kernel/trunk@622 6ac86273-5f31-0410-b378-82cca8765d1b
2003-06-20 00:05:44 +00:00
Bart Oldeman
204382d001 Adjustment to compile with Turbo C
git-svn-id: https://svn.code.sf.net/p/freedos/svn/kernel/trunk@619 6ac86273-5f31-0410-b378-82cca8765d1b
2003-06-18 19:27:40 +00:00
Bart Oldeman
a447756302 Add country support for bulgaria
git-svn-id: https://svn.code.sf.net/p/freedos/svn/kernel/trunk@616 6ac86273-5f31-0410-b378-82cca8765d1b
2003-06-17 15:19:29 +00:00
Bart Oldeman
9d651b53e4 Small asm optimization
git-svn-id: https://svn.code.sf.net/p/freedos/svn/kernel/trunk@615 6ac86273-5f31-0410-b378-82cca8765d1b
2003-06-17 15:17:51 +00:00
Bart Oldeman
9f15e02db9 Correct get_root, make kbdType public, sys config patches from Tom.
git-svn-id: https://svn.code.sf.net/p/freedos/svn/kernel/trunk@614 6ac86273-5f31-0410-b378-82cca8765d1b
2003-06-17 11:55:44 +00:00
Bart Oldeman
f98fc8640b Removed most of Eric's config.sys stuff -- some are questionable, others
unfinished. EECHO works though.


git-svn-id: https://svn.code.sf.net/p/freedos/svn/kernel/trunk@613 6ac86273-5f31-0410-b378-82cca8765d1b
2003-06-17 11:53:37 +00:00
Bart Oldeman
2cb828283f Remove my old truename fix.
git-svn-id: https://svn.code.sf.net/p/freedos/svn/kernel/trunk@612 6ac86273-5f31-0410-b378-82cca8765d1b
2003-06-17 08:45:56 +00:00
Bart Oldeman
a4abd642bf Fix buffer deletion problem with multi-sector writes.
git-svn-id: https://svn.code.sf.net/p/freedos/svn/kernel/trunk@611 6ac86273-5f31-0410-b378-82cca8765d1b
2003-06-17 08:38:20 +00:00
Bart Oldeman
7c8b87380f Simple extended keyboard detection using 40:96
git-svn-id: https://svn.code.sf.net/p/freedos/svn/kernel/trunk@608 6ac86273-5f31-0410-b378-82cca8765d1b
2003-06-16 16:36:58 +00:00
Bart Oldeman
1b2a421f44 Some duplicate code merging and scancode-0xe0 related fixes.
git-svn-id: https://svn.code.sf.net/p/freedos/svn/kernel/trunk@606 6ac86273-5f31-0410-b378-82cca8765d1b
2003-06-16 11:10:17 +00:00
Bart Oldeman
7bc5f8b31e Repair arrow keys for console.asm + fixes for Turbo C
git-svn-id: https://svn.code.sf.net/p/freedos/svn/kernel/trunk@605 6ac86273-5f31-0410-b378-82cca8765d1b
2003-06-15 22:58:29 +00:00
Bart Oldeman
4c88863f24 Add support for UNC style paths (David Bolen)
git-svn-id: https://svn.code.sf.net/p/freedos/svn/kernel/trunk@604 6ac86273-5f31-0410-b378-82cca8765d1b
2003-06-15 22:06:03 +00:00
Bart Oldeman
5a5df81896 Support extended keyboards in console.asm
git-svn-id: https://svn.code.sf.net/p/freedos/svn/kernel/trunk@602 6ac86273-5f31-0410-b378-82cca8765d1b
2003-06-15 20:37:56 +00:00
Bart Oldeman
faaff5006a + Changes Eric Auer
* add sanity check to initdisk.c for (driveParam->chs.Sector == 0)
      + some display tweaks
    * add ANYDOS, KBDRATE, VIDMODE, MENUCOLOR and EECHO support to the
      config.sys parser.
    * distinguish between the builtin DOS version and the settable
      DOS version.


git-svn-id: https://svn.code.sf.net/p/freedos/svn/kernel/trunk@601 6ac86273-5f31-0410-b378-82cca8765d1b
2003-06-15 19:26:49 +00:00
Bart Oldeman
1c5db2e482 Small size optimization.
git-svn-id: https://svn.code.sf.net/p/freedos/svn/kernel/trunk@599 6ac86273-5f31-0410-b378-82cca8765d1b
2003-06-15 19:00:39 +00:00
Bart Oldeman
bdc63c1ff0 Fixes from Lixing Yuan: dosnames cleanup, fix for truename with
wildcards and trailing dots.


git-svn-id: https://svn.code.sf.net/p/freedos/svn/kernel/trunk@598 6ac86273-5f31-0410-b378-82cca8765d1b
2003-06-15 18:57:02 +00:00
Bart Oldeman
f83c09df15 Fix problem with volume label findnexts.
git-svn-id: https://svn.code.sf.net/p/freedos/svn/kernel/trunk@597 6ac86273-5f31-0410-b378-82cca8765d1b
2003-06-15 18:47:25 +00:00
Bart Oldeman
056fded527 Eliminate relocations in initdisk.c + dyninit.c.
git-svn-id: https://svn.code.sf.net/p/freedos/svn/kernel/trunk@596 6ac86273-5f31-0410-b378-82cca8765d1b
2003-06-15 18:40:03 +00:00