>I have a DOS application which says there isn't room to write a file. I
>get an "Insufficient disk space on destination drive" message. In fact
>there is plenty --too much-- room. I suspect it's making a DOS call to
>see what free space is available, probably getting an answer which it
>translates to a negative number; and then won't write out the file.
Probably this function:-
DOS 2+ - GET FREE DISK SPACE
AH = 36h
DL = drive number (00h = default, 01h = A:, etc)
Return:
AX = FFFFh if invalid drive else AX = sectors per cluster BX = number of
free clusters CX = bytes per sector DX = total clusters on drive
Notes: Free space on drive in bytes is AX * BX * CX. Total space on drive
in bytes is AX * CX * DX. "lost clusters" are considered to be in use.
According to Dave Williams' MS-DOS reference, the value in DX is incorrect
for non-default drives after ASSIGN is run. This function does not return
proper results on CD-ROMs; use AX=4402h"CD-ROM" instead. (FAT32 drive) the
reported total and free space are limited to 2G-32K should they exceed
that value
The reason for such overflow could be various things.
If you sent me the execcutable with the problem, I might try to fix it for
you if you're lucky ;-).
I should be able to make you a 'patch' TSR that loads in ram, and simply
limits the maximum number of clusters ever reported available to a
smaller value, I expect ;-).
>I had this issue years ago when I ran this DOS application program in
>OS/2. Now it's here in DOSEmu/Linux. Anyone know how to tell the
>DOSEmu session it has only X amount of space; where X is some number DOS
>can deal with?
More like a problem with the DOS program.
You might do well diagnosis-wise, is as follows:-
- run Dosemu as usual.
- Set the current working drive within freedos to the drive where you
are having the 'too much disk space' problem -- i.e. do "D:" or
similar.
- run "debug" (useful tool included with freedos and m$-dos).
- when Debug is running, '-' prompt will appear.
- type "a" (assemble) command, which should result a prompt
something like '????:0100'.
- type "mov ah,36"
- type "mov dl,00"
- type "int 21"
- type "int 3"
- press enter again (blank line, leave assemble mode, back to '-' prompt)
- type "g" (run code, which should stop at the "int 3" breakpoint)
[and will give a Register dump!!, which should be copied for us].
- type "q" (quit debug)
Then, please copy carefully the register dump that is shown.
I can see from that what kind of 'sane' (or 'insane') values are being
returned from that dos function under dosemu.
>Joe Henley
-S Iremonger <[EMAIL PROTECTED]>
-
To unsubscribe from this list: send the line "unsubscribe linux-msdos" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at http://vger.kernel.org/majordomo-info.html