Re: math co-processor exceptions
From: Scott J. McCaughrin (spamtrap_at_crayne.org)
Date: 10/25/04
- Next message: Scott J. McCaughrin: "Re: math co-processor exceptions"
- Previous message: Clax86 : "Get the FAQs"
- In reply to: Florian Liebig : "Re: math co-processor exceptions"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: Mon, 25 Oct 2004 07:32:53 +0000 (UTC)
Hi, Florian.
Thanks for your input. My comments follow.
Florian Liebig <spamtrap@crayne.org> wrote:
: Hello mister.
: "Scott J. McCaughrin" schrieb:
: > Any good examples of math co-processor exception-handling?
: > Should include unmasking of the lo-order 6 flags in the
: > control word (P,U,O,D,Z,I) so that, e.g., sqrt(-1.0) will
: > set trigger "Invalid Operation" and transfer control to
: > the appropriate exception-handler (INT 02h in DOS?).
: >
: > Thanks.
Sorry, but this isn't about emulation.
: when emulating, you haven't a control word. even that must be emulated
: since the control word do only exist in the 80x87.
: when you're good in programming, the only thing you have to do is check
: COPRO-flag and set COPRO-EMUlating flag. so, every time an extended
: mnemonic structure is fetched, the CPU generates an IRQ that is mostly
: redirected to PIC2->MATH_EXT (IRQ13 or 14).
Trouble is, I don't want to be checking exception flags after every single
floating-point operation -- I want the machine to do that for me, and
automatically cause invocation of an exception-handler when the unmasked
exception is raised in the FPU status word.
: you have to design them (emulators) corresponding to the kind of
: environment you want it to run in stable- as they are REAL/PROT.
: environment.
: but in every case, the emulator can read out the command from the stack
: and calculate the result on it's own; what you have to do is look up
: CS:IP / CS:EIP from STACK, get that command and jump to a code in your
: handler that does the following process(es).
: but if you only want to "unmask" a special command of the command set of
: the coprocessor, that even works..
: let me hear from you, if you like.
: Florian.
- Next message: Scott J. McCaughrin: "Re: math co-processor exceptions"
- Previous message: Clax86 : "Get the FAQs"
- In reply to: Florian Liebig : "Re: math co-processor exceptions"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|