> EA> If you would like to help to debug FreeCOM, I can
> EA> forward you a longish list of comments / diffs. What
>     Do it. But I suggest, better to start from smaller/simpler things.


Well, by looking at the disassembly, I did find the problem
which made FreeCOM try to access more or less random drives
right after displaying the prompt and right before running
a command (before calling muxae)...


http://freedos.cvs.sourceforge.net/freedos/freecom/lib/cmdinput.c?revision=1.10&view=markup


static void my_setcursortype( unsigned short state )
...
regs.r_ax = 0x0F00;
intr( 0x21, &regs );
...



That was supposed to be an int 0x10, not an int 0x21.
The current version of the code calls int 21.0f00 with
more or less random values in all other registers. That
function is "open file using fcb" and of course it is
evil to call that with random arguments.



Completely pointless for anybody but me, I have some more notes...
The more ASM oriented among you should be able to verify that the
first of the below functions is what the compiler makes out of
my_setcursortype. No idea what the second one is, probably some
"intdos" style wrapper function. The third looks like some LFN-
support-conditional thing, somehow special-casing MKDIR.
Maybe somebody who knows the sources well can point me to
that place. The fourth part just contains notes about intr().

Enjoy ;-).

Eric



8748:  enter 0x14,0x0, push si, "ax"=0xf00, int 21.registers (at bp-0x14)
si="ax" and 0xff, "ax"=0x100, ax=[bp+0x4]
IF ax==0, [IF si==7, "cx"=0xb0c, go ELSE "cx"=0x607, go] ELSE
   IF ax!=1, go, ELSE IF si==7, "cx"=0x10c, go, ELSE "cx"=0x107, go
go: int 10.registers (at bp-0x14), done

4C93: "ax"=[bp+0xc] "bx"=[bp+0x4] "cx"=[bp+0xa] "dx"=[bp+0x6] "di"=[bp+0x8]
int 21.registers (at bp-0x14), if carry, return -1, else ax, done

A9E1: "ax"=si=[bp+0x6] "dx"=[bp+0x4] "ds"=ds int 21.registers
if (si==0x7139) && (("flags".carry!=0) || ("ax"==0x7100)))
   { "ax"=si shl 8, int 21.registers }
ax = -("flags" and 1), return, done ...is that -1 if NC, 0 if CY...??

DC6D: Builds INT NN calling code on stack,
8b 6e de cd NN ca 02 00, or for int 25 / 26 different
data structure: ax bx cx dx [tobepushed/bp] si di ds es flags
callthat... copy back registers... push cs, call near iret...


-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys -- and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
Freedos-devel mailing list
Freedos-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/freedos-devel

Reply via email to