Re: nasm segment directive
- From: Frank Kotler <fbkotler@xxxxxxxxxxx>
- Date: Sat, 22 Oct 2005 21:37:16 -0400
emu8086@xxxxxxxxxxxxxx wrote:
[snip]
Thanks for the example!
Likewise! (the ".com linking itself" example, too!)
I guess Linux's way is true :)
I don't know which way is "true"... I assume the difference is that you can alter the control word to (as I understand it) let the FPU handle the exception, or generate an irq (on a per-exception basis). That interrupt can be handled any way we like, I guess. To determine what the "native" behavior of the FPU is (as set up by the bios), we could design a bootsector to test the behavior. The difference we're seeing *must* be due to OS tweaking... I think.
There's a thread on clax about "Floating Point Exception" - a guy did an ordinary "div cl" without clearing ah (common newbie error). I recall having seen a "divide by zero" error message, from that error. That too is something an OS could hook and meddle with.
I'm not in the mood to fool with bootsectors right now, but when the spirit moves me, I'll try to remember to conduct those experiments. Always nice to know what's "really" hardware and what's the OS doing tricks.
I got bit by an "OS trick" the other day. Richard/PJ posted that link to the Linux Real Mode Interface library - http://lrmi.sf.net - didn't work on my system. Reported that the call failed, but didn't say why. I rebuilt the library with "DEBUG" defined, it informed me that the interrupt (10h) routine wasn't in ROM...
When I first installed Linux, it wasn't my "default" system, so instead of messing with lilo, I got in the habit of booting into dos, and starting Windows... or Linux via loadlin. I've continued that habit. Maybe dos is hooking int 10h(?). Sure enough, changing to boot straight to Linux via lilo cured it. (dunno what dos is doing with int 10h, but it seems to be doing something...)
Lots of interesting things to learn about these machines! :)
Best, Frank .
- References:
- nasm segment directive
- From: Timo Schneider
- Re: nasm segment directive
- From: Frank Kotler
- Re: nasm segment directive
- From: Timo Schneider
- Re: nasm segment directive
- From: Frank Kotler
- Re: nasm segment directive
- From: Timo Schneider
- Re: nasm segment directive
- From: Frank Kotler
- Re: nasm segment directive
- From: Timo Schneider
- Re: nasm segment directive
- From: Frank Kotler
- Re: nasm segment directive
- From: Betov
- Re: nasm segment directive
- From: emu8086
- Re: nasm segment directive
- From: emu8086
- nasm segment directive
- Prev by Date: Re: Array and Struct Constants in MASM
- Next by Date: Re: the purpose of the exceptions?
- Previous by thread: Re: nasm segment directive
- Next by thread: Re: nasm segment directive
- Index(es):
Relevant Pages
|