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