POV-Ray : Newsgroups : povray.off-topic : Does anybody know this? : Re: Does anybody know this? Server Time
11 Oct 2024 11:12:37 EDT (-0400)
  Re: Does anybody know this?  
From: Darren New
Date: 1 Dec 2007 12:50:09
Message: <47519ed1$1@news.povray.org>
John VanSickle wrote:
> Addison-Wesley released a very extensive set of docs for the Amiga, 
> consisting of five volumes.  

Yup. Or any Amiga compiler came with it. Considering I owned both the 
books and a couple of compilers in college, I don't think it was *that* 
much money.  $99 for a C compiler, if I recall. I think I still have the 
books somewhere.

>> How does this stuff work with Windoze? (Or Linux, for that matter...)
> 
> For Windows, I think that the library code is mostly in DLLs, and that 
> your linker will add the appropriate OS calls to get any needed DLLs 
> into memory.

Yep. That's what user.dll, graphics.dll, stuff like that are.

At the lowest lowest level, I'm pretty sure the libraries load up 
arguments into registers and execute an INT instruction, which is a 
"software interrupt", aka a trap, which causes a branch to an address 
loaded into a specific area of memory. I.e., just like handling an 
interrupt, or just like branching to a jump table in a library, except 
that you get privilege bits flipped around.

I don't know of any modern multiuser OS that doesn't use that technique 
to get into the kernel, as it's pretty much the only way to bypass 
memory and execution permissions in a controlled way.

-- 
   Darren New / San Diego, CA, USA (PST)
     It's not feature creep if you put it
     at the end and adjust the release date.


Post a reply to this message

Copyright 2003-2023 Persistence of Vision Raytracer Pty. Ltd.