Article View: comp.sys.amiga.tech
Article #3237Re: Need help with Amiga Tasks
From: Colin Plumb
Date: Tue, 10 Apr 1990 15:09
Date: Tue, 10 Apr 1990 15:09
37 lines
1494 bytes
1494 bytes
One slightly annoying thing about AmigaDOS is that to make dos.library
calls you need to be more than a task. You need to be a process, where
atruct Process {
struct Task pr_Task;
struct MsgPort pr_MsgPort;
WORD pr_Pad;
BPTR pr_SegList;
LONG pr_StackSize;
APTR pr_GlobVec;
LONG pr_TaskNum;
BPTR pr_StackBase;
LONG pr_Result2;
BPTR pr_CurrentDir;
BPTR pr_CIS;
BPTR pr_COS;
APTR pr_ConsoleTask;
APTR pr_FileSystemTask;
BPTR pr_CLI;
APTR pr_ReturnAddr;
APTR pr_PktWait;
APTR pr_WindowPtr;
};
The important things are pr_CIS and pr_COS, the current input and output
streams, and pr_MsgPort, which is the MsgPort used by file system
requests. If these don't exist after your task structure, dos.library
will use them anyway, resulting in a rapid guru.
To get your code to work, you either have to make a process structure
(icky; cloning your parent's is probably easiest), or access the
console.device directly. I believe it's currently bombing because
the print routines you're using call the dos.library eventually.
Sorry about the messiness.
--
-Colin
Technical Details
Message-ID:
<23095@watdragon.waterloo.edu>Path:
arc1-ca.pugleaf.net!utzoo!utgpu!watserv1!watdragon!lion!ccplumbReferences:
<20560@eerie.acsu.Buffalo.EDU>Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!utgpu!watserv1!watdragon!lion!ccplumb From: ccplumb@lion.waterloo.edu (Colin Plumb) Newsgroups: comp.sys.amiga.tech Subject: Re: Need help with Amiga Tasks Message-ID: <23095@watdragon.waterloo.edu> Date: 10 Apr 90 15:09:34 GMT References: <20560@eerie.acsu.Buffalo.EDU> Sender: daemon@watdragon.waterloo.edu Organization: University of Waterloo Lines: 37