CompuServe Messages

#CreatePort() in ASM

    25-Jan-87 01:41:55
Fm: John Draper 76703,4322
To: Mike Berro 73267,3361
Mike… If you are using the Addison Wesley books, go back to your dealer and ask him to supply you with appendix F of the RKM as published by Commodore. Unfortunately, it doesn't help much in this case, as it is still documented in C. There is code in Amiga.lib that might help though, so I'll see if I can give you enough clues to get you going. The Exec support docs say… struct MsgPort *CreatePort (name, pri) char *name BYTE pri; /* oops… missed ; on prev line */ { UBYTE sigBit; struct MsgPort *port; if ((sigBit = AllocSignal (-1)) == 1) return ((struct MsgPort *) 0); port = AllocMem ((ULONG) sizeof (*port), MEMF_CLEAR | MEMF_PUBLIC); if (port == 0) { FreeSignal (sigBit); return ((struct MsgPort *) (0)); } port->mp_Node.ln_name = name; port->mp_Node.ln_Pri = pri; port->mp_Node.ln_Type = NT_MSGPORT; port->mp_Flags = PA_SIGNAL; port->mp_SigBit = sigBit; port->mp_SigTask = FindTask; /* correction to above line …. port->mp_SigTask = FindTask (0); */ if (name != 0) AddPort (port); else NewList (&(port->mp_MsgList)); return (port); } ————-CreatePort in Amiga.lib says…. move.l 32(A7),D4 move.b 39(A7),D3 so I would imagine that D4 is the name and D3 is the priority. If you want the rest of the assembly stuff from Amiga.lib, let me know. Hope this helps. We straight talking assembler types need to stick together. Regards, Larry.