public inbox for linux-msdos@vger.kernel.org
 help / color / mirror / Atom feed
From: "Andrew Bird (Sphere Systems)" <ajb@spheresystems.co.uk>
To: linux-msdos@vger.kernel.org
Subject: Redirecting a DOS interrupt call out to Linux
Date: Thu, 18 Jul 2013 17:35:38 +0100	[thread overview]
Message-ID: <1379967.GstMATdtWo@polly.spheresystems.co.uk> (raw)

Hi all,
	I've been playing with the Dosemu source code with the hope of replacing 
an old TSR with a native Linux daemon. Currently a DOS app I have no source 
for makes an interrupt call to a TSR with data, the TSR works with it and the 
result is returned.

I had in mind to replace it with something like this:
1/ Old DOS app makes call to interrupt
2/ New Dosemu interrupt handler that collects the data given to it by the DOS 
app and pushes it into a message queue on the host.
3/ A Linux daemon that reads the incoming message, does the processing and 
returns the result via a second message queue.
4/ The new Dosemu interrupt handler then reads the result from the second 
message queue, places it in memory and returns.
5/ The DOS app sees the result and is unaware of any difference.

My first step was to hook in a new skeleton Dosemu interrupt handler, but it 
doesn't seem to be being called and the DOS app thinks the TSR is not 
installed. I'm using Dosemu 1.2.2 for historical reasons, but I expect the 
problem is similar on 1.4.0 etc.

I figured all I'd need to do would be to add a new function to 
src/base/async/int.c and reference it.

/* this is the handler for INT 76 calls from DOS to the test interface */
int test_int (void) {
	ds_printf("INT76: we have been called\n");
	return 1;
}

/* add reference to it in setup_interrupts() */
interrupt_function[0x76] = test_int;

Can anybody tell me what I'm missing? How does the interrupt vector table get 
built?

Thanks,


Andrew



             reply	other threads:[~2013-07-18 16:35 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-07-18 16:35 Andrew Bird (Sphere Systems) [this message]
2013-07-18 19:49 ` Redirecting a DOS interrupt call out to Linux Stas Sergeev
2013-07-19 15:58   ` Andrew Bird
2013-07-19 20:26     ` Stas Sergeev

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1379967.GstMATdtWo@polly.spheresystems.co.uk \
    --to=ajb@spheresystems.co.uk \
    --cc=linux-msdos@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox