Quote:
Originally Posted by kerravon
No, this is way out of my scope. There won't be any "tasks" at all. It will be a single-tasking OS. But yes, I do want to eventually run a "hello, world" Amiga hunk, after first getting a Pos*() ELF executable to work.
|
If you have the trackdisk.device to access the disk, you have tasks. If you have the dos.library, you have tasks.
Quote:
Originally Posted by kerravon
Ok, thanks. What I'd like to know is how DosBase is set by OpenLibrary.
|
It isn't. It is the job of the caller to get the return code from OpenLibrary and store it in DOSBase, which is a "global" of the program. There are no interrupts involved in the system function. It is really only:
Code:
struct DosLibrary *DOSBase;
int main(int argc,char **argv)
{
DOSBase = OpenLibrary("dos.library",40);
...
}
and *that* is it. However, it is typically part of the startup code supplied witht the compiler to open this library.