CompuServe Thread

AmigaE/CreatePort()

2 messages in this thread
#44611From: Barry BurtonDec 4, 1994 8:56 PM
Does anyone know how to compensate for the io functions (CreatePort() CreateStdIO(), etc.) residing in amiga.lib when writing 'E' code?? I got a very scsi routines I'd like to port, but I'm having a little trouble when it comes to these routines :-(!! Barry
#44943From: Fabian RothDec 30, 1994 7:23 AM
Hi Barry! I'm afraid you can't (yet) use functions like CreatePort() or similar ones since they are part of a linked library (amiga.lib) which is a part of most C compilers, but not a part of the operating system. OS 2.0 (and above) provide similar functions in exec.library. They are called CreateMsgPort() and CreateIORequest(), and they act quite similar to the amiga.lib functions. CreateMsgPort() doesn't take any parameters, and it acts like CreatePort(0,0). If you want to add it to exec's public list of ports, you have to give it a name and call AddPort() manually. CreateIORequest() takes two arguments: The address of the ReplyPort and the size of the IO request to be allocated. (I may be wrong now since I'm writing this out of memory, please consult your .fd or _proto.h files) Andy