Bart Oldeman
6947542a5e
Initialise all int vectors except the ones at 70:xxxx using a table.
...
Convert setvec into a function that disables/enables ints (init code only
for now, resident code will follow later); cli/sti (disable/enable) are
now macros (inlined).
git-svn-id: https://svn.code.sf.net/p/freedos/svn/kernel/trunk@918 6ac86273-5f31-0410-b378-82cca8765d1b
2004-05-04 09:32:16 +00:00
Bart Oldeman
859ac24170
We have to cast away const to deal with the generic "void *" pointer and
...
some compiler warning.
git-svn-id: https://svn.code.sf.net/p/freedos/svn/kernel/trunk@912 6ac86273-5f31-0410-b378-82cca8765d1b
2004-05-02 15:21:35 +00:00
Bart Oldeman
ecfcb9be29
dir_read() no longer updates the diroff counter. This eliminates the NEW
...
field, simplifies remove_lfn_entries(), and avoids a bug if you delete
the first entry in the root directory on FAT32.
git-svn-id: https://svn.code.sf.net/p/freedos/svn/kernel/trunk@911 6ac86273-5f31-0410-b378-82cca8765d1b
2004-04-30 17:14:33 +00:00
Bart Oldeman
976efed7a5
Need to commit proto.h or things won't compile...
...
git-svn-id: https://svn.code.sf.net/p/freedos/svn/kernel/trunk@910 6ac86273-5f31-0410-b378-82cca8765d1b
2004-04-30 17:06:45 +00:00
Bart Oldeman
9cbede2ec9
Stop abusing "idx". The OW optimizer likes this better, too.
...
git-svn-id: https://svn.code.sf.net/p/freedos/svn/kernel/trunk@909 6ac86273-5f31-0410-b378-82cca8765d1b
2004-04-30 16:49:34 +00:00
Bart Oldeman
00e1527fc5
Clean up FAT12 handling -- there's a portable approach that's small too.
...
git-svn-id: https://svn.code.sf.net/p/freedos/svn/kernel/trunk@908 6ac86273-5f31-0410-b378-82cca8765d1b
2004-04-30 15:28:18 +00:00
Bart Oldeman
126ef5cec9
Inlined much of getFATblock() into link_fat. Saves the idx reference.
...
The second call (for a FAT12 entry that is divided in two sectors)
can be much simpler, no need to recalculate.
git-svn-id: https://svn.code.sf.net/p/freedos/svn/kernel/trunk@907 6ac86273-5f31-0410-b378-82cca8765d1b
2004-04-30 14:05:14 +00:00
Bart Oldeman
bfe9252c2b
Merged next_cluster and link_fat into one function depending on a
...
special Cluster2 value. More optimizations later.
git-svn-id: https://svn.code.sf.net/p/freedos/svn/kernel/trunk@906 6ac86273-5f31-0410-b378-82cca8765d1b
2004-04-30 13:07:26 +00:00
Bart Oldeman
115b2bf68d
Calculate the nibble/word/dword index of the FAT entry in the sector
...
centrally in getFATblock.
git-svn-id: https://svn.code.sf.net/p/freedos/svn/kernel/trunk@905 6ac86273-5f31-0410-b378-82cca8765d1b
2004-04-29 12:48:18 +00:00
Bart Oldeman
f6716cd74b
"clussec" can be of CLUSTER size if we divide by an adjusted "words per
...
sector"(FAT16), or "dwords per sector"(FAT32) value instead of multiplying
it first. For FAT12 the *3/2 works out a little differently: here we
first multiply by 3 and then divide by the number of "nibbles per sector".
git-svn-id: https://svn.code.sf.net/p/freedos/svn/kernel/trunk@904 6ac86273-5f31-0410-b378-82cca8765d1b
2004-04-29 12:28:14 +00:00
Bart Oldeman
0afa773303
From Lucho: HMAFree == 0xfff0 - bytesToAllocate is valid and may happen
...
if the buffers occupy exactly all HMA space up to and including the
last byte at ffff:ffff. Failing caused all buffers to go low ...
git-svn-id: https://svn.code.sf.net/p/freedos/svn/kernel/trunk@903 6ac86273-5f31-0410-b378-82cca8765d1b
2004-04-27 00:40:43 +00:00
Bart Oldeman
bb7f10fafc
Reverted bad optimization -- (unsigned)Cluster2 may have the high 4 bits set
...
with LONG_LAST_CLUSTER.
git-svn-id: https://svn.code.sf.net/p/freedos/svn/kernel/trunk@902 6ac86273-5f31-0410-b378-82cca8765d1b
2004-04-26 21:23:26 +00:00
Bart Oldeman
82e66852ee
Config.cfgInitTail is a pointer now so sizeof isn't good. Just using
...
strcpy helps F5 and F8.
git-svn-id: https://svn.code.sf.net/p/freedos/svn/kernel/trunk@901 6ac86273-5f31-0410-b378-82cca8765d1b
2004-04-26 09:46:44 +00:00
Bart Oldeman
935181421c
"copyright" is near now so we have to use %s and not %S
...
git-svn-id: https://svn.code.sf.net/p/freedos/svn/kernel/trunk@900 6ac86273-5f31-0410-b378-82cca8765d1b
2004-04-25 10:11:29 +00:00
Bart Oldeman
6f7b41e257
Fixed silly mistake in cluster index calculation.
...
git-svn-id: https://svn.code.sf.net/p/freedos/svn/kernel/trunk@899 6ac86273-5f31-0410-b378-82cca8765d1b
2004-04-24 16:02:39 +00:00
Bart Oldeman
490a27b857
Some of Arkady's fattab optimizations -- the others only increase the kernel
...
size for Watcom.
git-svn-id: https://svn.code.sf.net/p/freedos/svn/kernel/trunk@898 6ac86273-5f31-0410-b378-82cca8765d1b
2004-04-24 15:53:21 +00:00
Bart Oldeman
3227b87d5d
(Arkady) Make signon one big printf function call.
...
git-svn-id: https://svn.code.sf.net/p/freedos/svn/kernel/trunk@897 6ac86273-5f31-0410-b378-82cca8765d1b
2004-04-24 15:14:43 +00:00
Bart Oldeman
2fcbfdb271
kernel.asm optimizations from Arkady
...
git-svn-id: https://svn.code.sf.net/p/freedos/svn/kernel/trunk@896 6ac86273-5f31-0410-b378-82cca8765d1b
2004-04-24 15:09:34 +00:00
Bart Oldeman
ea23d33c2c
Reduced number of global int2f/11 entries into int2f.asm to one.
...
git-svn-id: https://svn.code.sf.net/p/freedos/svn/kernel/trunk@895 6ac86273-5f31-0410-b378-82cca8765d1b
2004-04-21 17:40:12 +00:00
Bart Oldeman
8d1eda45f9
Further int2f.asm reduction... now using generic void *arg argument to pass
...
the third parameter which can be various things.
git-svn-id: https://svn.code.sf.net/p/freedos/svn/kernel/trunk@894 6ac86273-5f31-0410-b378-82cca8765d1b
2004-04-21 11:04:08 +00:00
Bart Oldeman
01e5973aa0
Re-merge parts of network_redirector_rw with network_redirector_open,
...
and let it return a long instead of using a *err pointer.
Call the resulting function NETWORK_REDIRECTOR_MX (multiplex)
git-svn-id: https://svn.code.sf.net/p/freedos/svn/kernel/trunk@893 6ac86273-5f31-0410-b378-82cca8765d1b
2004-04-21 02:01:56 +00:00
Bart Oldeman
4dc4ae8be8
Third stage for int2f callers: split int2f.asm functions, don't let them
...
preserve as many registers, use pascal calling convention for the
"open" (but really: multiplex) function.
git-svn-id: https://svn.code.sf.net/p/freedos/svn/kernel/trunk@892 6ac86273-5f31-0410-b378-82cca8765d1b
2004-04-21 00:53:45 +00:00
Bart Oldeman
ebbd6b8336
Convert next batch of remote_ functions (with one far pointer argument) --
...
network_redirector() can be a wrapper in C.
git-svn-id: https://svn.code.sf.net/p/freedos/svn/kernel/trunk@891 6ac86273-5f31-0410-b378-82cca8765d1b
2004-04-20 20:25:26 +00:00
Bart Oldeman
c4e65eb689
Start reducing the number of network redirector functions in int2f.asm.
...
git-svn-id: https://svn.code.sf.net/p/freedos/svn/kernel/trunk@890 6ac86273-5f31-0410-b378-82cca8765d1b
2004-04-20 18:43:03 +00:00
Bart Oldeman
545b571c3e
Finally do the floppy determination type optimization for format --
...
based on Arkady's suggestions a long time ago.
+ a few other small optimizations (~70 bytes total).
git-svn-id: https://svn.code.sf.net/p/freedos/svn/kernel/trunk@889 6ac86273-5f31-0410-b378-82cca8765d1b
2004-04-20 17:59:35 +00:00
Bart Oldeman
c42277d259
Update .lsm version.h and changelog.
...
git-svn-id: https://svn.code.sf.net/p/freedos/svn/kernel/trunk@887 6ac86273-5f31-0410-b378-82cca8765d1b
2004-04-17 19:13:20 +00:00
Bart Oldeman
2734dd94ae
Fix Borland prototype warnings. Use kernel 2034 rc version tag for
...
wider testing.
git-svn-id: https://svn.code.sf.net/p/freedos/svn/kernel/trunk@886 6ac86273-5f31-0410-b378-82cca8765d1b
2004-04-14 15:53:16 +00:00
Bart Oldeman
cf2ed6752b
Had to change ctrl-c/ctrl-break handling again...
...
Seems to be more consistent now. read_char_sft_dev handles ^C at a fairly
high level. So raw_get_char doesn't need to worry about sft's anymore.
git-svn-id: https://svn.code.sf.net/p/freedos/svn/kernel/trunk@885 6ac86273-5f31-0410-b378-82cca8765d1b
2004-04-14 15:40:51 +00:00
Bart Oldeman
6c4fd1228c
Two more dangerous INIT BSS variables...
...
git-svn-id: https://svn.code.sf.net/p/freedos/svn/kernel/trunk@884 6ac86273-5f31-0410-b378-82cca8765d1b
2004-04-14 14:04:04 +00:00
Bart Oldeman
f94ba5ebe1
Improve ^C handling:
...
- ^C didn't work for int21/ah=3f. Corrected -- Do_DosIdle_loop still needs
to wait even if it doesn't call the idle int
- ^C needs to be echoed to STDOUT for low character functions (ah<0xd) but
to the device that is read from for handle functions. So we need to pass
either the STDOUT sft or that device on to the ^C echoer.
- The ^C echo really should print ^C\r\n.
- misc cleanups in break.c.
git-svn-id: https://svn.code.sf.net/p/freedos/svn/kernel/trunk@883 6ac86273-5f31-0410-b378-82cca8765d1b
2004-04-14 09:20:08 +00:00
Bart Oldeman
9c41d97021
DATASTART should be FAR and not DOSFAR for MSC
...
git-svn-id: https://svn.code.sf.net/p/freedos/svn/kernel/trunk@882 6ac86273-5f31-0410-b378-82cca8765d1b
2004-04-14 08:51:46 +00:00
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