Mail Archives: djgpp/2006/02/11/05:17:21
"Brad House" <brad AT mainstreetsoftworks DOT com> wrote in message
news:43E8F9ED DOT 1070208 AT mainstreetsoftworks DOT com...
<snip>
> Ok, well, your code definitely worked, but you're right, as soon as you
> introduce a write() anywhere, it bombs. Unfortunately, I need to do a
> write (not to the screen, but to disk). So I've followed every
> reference I can find, and I've attached what I've come up with. It's
> a full test suite to turn certain options on and off, and provides
> hooks to enable and disable wrapping each bios interrupt individually.
>
<snip>
> I think I'm probably chaining the BIOS interrupts incorrectly
> (possibly). From what I've read, I should be able to chain int 13,
> and hold when it's active in memory, and just perform a sanity
> check before entering the hook on the timer interrupt, if int 13
> isn't in the middle of being called, I should be able to simply
> disable interrupts, and write to disk.... but... alas ... it
> doesn't work :/
>
> Any help would be appreciated. I think what I've written is actually
> a pretty nice test suite, but with no combination of options, can
> I get it to work ... Anytime I specify -fmyfile.out it will
> lock up hard as a rock... I hope it's something stupid and small,
> and not 'impossible'.
(Darn, third post attempt for this.)
First, there were some errors in the previous version of your example I
posted:
> _go32_dpmi_set_real_mode_interrupt_vector(TIMER_INTERRUPT, &pmint28);
_go32_dpmi_set_real_mode_interrupt_vector(IDLEDOS_INTERRUPT, &pmint28);
I introduced these unintentionally:
> indos_offset=(r.x.es<<4)|r.x.bx;
indos_offset=(r.x.es<<4)+r.x.bx;
> critical_offset=(r.x.ds<<4)|r.x.si;
critical_offset=(r.x.ds<<4)+r.x.si;
With the simple example, I'm seeing an issue with int 0x1c. Myint28() works
fine with write(). But, as soon as DOS starts doing something, myint28() is
no longer called, i.e. during DIR/S or EDIT. Myint8() gets called during
DIR/S or EDIT, and it is not being called as fast as myint28(). However,
after about 2400 tsr_intcallback()'s, write() locks after being called from
myint8(). Afterwards, I can't boot Win98SE because all memory is allocated.
I suspect there is a memory leak, perhaps with the _CRT0_FLAG_UNIX_SBRK I
added.
I'd like to look at your new code and work on it some more, but I really
don't have any more time right now.
Sorry.
Rod Pemberton
- Raw text -