🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.sys.amiga.tech
Article #3180

Processes

#3180
From: RONALD VAN EIJCK
Date: Sat, 07 Apr 1990 17:39
47 lines
1672 bytes
I want your opinion about the following peace of code. I compiled it with
Aztec 5.0, it works fine but I think it's dirty. Is there a cleaner way
to create a slave process using the same code as the master program.
I need a one file executable so it's easy for other people to replace it
with an updated version. (So no ARP.library)

here is my code:

void segment();

main()
{
ULONG initpc;

       initpc = ((ULONG)segment) >> 2;  /* get the BPTR for the segment */
       CreateProc("Untitled",-10,initpc,4096);
       Delay(500); /* wait until other process is completed !! */
}

#asm
       DC.L 8    ; This is a fake segment !!
_segment:
       DC.L 0    ; next segment is 0
#endasm

void subtask()
{
BPTR fh;

       geta4(); /* Aztec's way to use small code */
       fh = Open("CON:10/10/200/50/Process 2",1006);
       Write(fh,"\nExtra Process",14);
       Delay(100);
       Close(fh);
       RemTask(0);
}

BTW I am loosing 24 bytes everytime I run this program does anybody know why ?

BTW BTW To all those people collecting aztec bugs:
- if you use the -snu option you don't get any register var's at all
- the #pragma regcall( D0 = function()) doesn't work

Thanks in advance,

                  Ronald van Eijck
                  R&R Software
Technical Details
Message-ID: <353198@neabbs.UUCP>
Path: arc1-ca.pugleaf.net!utzoo!utgpu!news-server.csri.toronto.edu!mailrus!wuarchive!cs.utexas.edu!uunet!mcsun!hp4nl!telmail!neabbs!rrs

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!utgpu!news-server.csri.toronto.edu!mailrus!wuarchive!cs.utexas.edu!uunet!mcsun!hp4nl!telmail!neabbs!rrs
From: rrs@neabbs.UUCP (RONALD VAN EIJCK)
Newsgroups: comp.sys.amiga.tech
Subject: Processes
Message-ID: <353198@neabbs.UUCP>
Date: 7 Apr 90 17:39:07 GMT
Organization: NEABBS multi-line BBS +31-20-717666 (13x), Amsterdam, Holland
Lines: 46