Thread: PDOS for Amiga
View Single Post
Old 04 March 2021, 08:55   #30
Thomas Richter
Registered User
 
Join Date: Jan 2019
Location: Germany
Posts: 3,233
Quote:
Originally Posted by kerravon View Post
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 View Post
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.
Thomas Richter is offline  
 
Page generated in 0.04695 seconds with 11 queries