rsine@nswc-wo.arpa (08/10/88)
Gentlepeople, I've just started using this Amiga related system. I hope what I am about to do (send a code fragment with a question) is okay, if not please inform me. I play music semi-professionaly and use MIDI. I use the Amiga as my controlling computer (sequencer). I wish to write programs to perform general midi functions. The first program is mev which will trap MIDI events to the screen of file. Then once I learn from that I want to write some editor/librarians for my specific MIDI gear. The sentance above should read ...to the screen or file. The following is the code fragments I'm having problems with (I've cut the lines of code to save space): #include (types,ports,lists,libraries,io,devices,memory,interrupts,serial,stdio) #define (midi stuff like BEGIN_SYSEX 0xF1, NOTE_ON 0xF7, ...etc.) struct IOExtSer *IORser; struct MsgPort *port; extern struct MsgPort *CreatePort(); extern struct IORequest *CreateExtIO(); main(); { int error; /* and other long and char declarations */ port = CreatePort(SERIALNAME,0); if (port == NULL) { printf("%%CRE_PORT_ERR - Error creating port.\n"); exit (100); } /************************************************************************** * The above works and something is returned to port. * The below doesn't work and the variable (IORser) is null. Further, if * I exit (200); I get a 13108236 (instead of going to cleanup1). ***************************************************************************/ IORser = (struct IOExtSer *)CreateExtIO(port,sizeof(struct IOExtSer)); if (IORser == NULL) { printf("%%CRE_REQ_ERR - Error creating i/o request block.\n"); goto cleanup1; } . . . Thanks for any help, Ran rsine@nswc-wo.arpa