CompuServe Thread

DoIO() on serial

11 messages in this thread
#51083From: Don Curtis/SYSOPJan 27, 1987 3:37 AM
Mike, I may have steered you in the wrong direction slightly, take a look and see if the serial port is already opened…you may be getting a baud mis-match error rather than an invalid baud rate. Don
#51133From: Mike BerroJan 27, 1987 7:59 PM
Don, it seems like no matter what I do, even if I am SETTING the baud rate, I get the -3 error from DoIO(), so I don't think it's the baud rate. —Mike
#51180From: Don Curtis/SYSOPJan 28, 1987 12:56 AM
Mike, Sounds like time for a call to C-A in West Chester again…BTW, you are using SetParams() (or it's Ass'y equivalent) to set the baud rate aren't you? The AutoDocs say you _must_ use it to set the parameters. For some reason or other, you can't directly modify the IoReq block structure yourself. Don
#51315From: Mike BerroJan 28, 1987 9:54 PM
Don, I don't have docs yet for 1.2, but 1.1 says you can set parameters by setting the PARAMS flag (forget exact name) in the request and then calling DoIO(). In any case I get the same error from DoIO whether I am setting the params or just using the defaullts. —Mike
#51365From: Don Curtis/SYSOPJan 29, 1987 1:31 AM
Mike, I don't have the doc in front of me, but it specifically says you _must_ call SetParms() to set the parameters before a call to DoIO() with 2 exceptions (I forget which 2, but they weren't baud). However, I have no idea what you have to do if using defaults (probably nothing)…so you might want to take a look at Jez's term program…as someone else suggested. Don
#51501From: Mike BerroJan 29, 1987 11:31 PM
Don, I looked at Jez's program, and it works (see my other reply). He _does not_ use SetParams(), but rather uses SendIO() with the command field set to SDCMD_SETPARAMS. I'm sure he was using 1.1, but it seems to work with 1.2 as well! When I get the 1.2 docs, I'll do it "right". —Mike
#51524From: Don Curtis/SYSOPJan 30, 1987 12:24 AM
Mike, Great…the important thing being it is now working. Don
#51502From: Mike BerroJan 29, 1987 11:31 PM
Larry, Don, Bela & Patrick: Thank you very much for your help! What I learned (again) is not to trust the examples in the Amiga books, rather I should trust only what works! I copied the technique from ARGO.S in DL10. It works, but I'm not yet sure how. There is no need (apparently) to call CreateExtIO, and you can set the parameters (i.e. baud rate) using SendIO(). Jez's code doesn't use DoIO(), which I didn't want to use anyway, but I had started with it because it looked the easiest. When I get the routine finished I'll upload it here, it's the least I could do. Thanx again! —Mike
#51230From: Bela Lubkin/SysopJan 28, 1987 9:49 AM
What happens (dare I say it?) if you ignore the -3 error and just proceed as if everything's cool? >Bela<
#51319From: Mike BerroJan 28, 1987 9:58 PM
Well, nothing! I want the DoIO() to collect four bytes of data from the serial port, but it doesn't. I can run the program many times without getting the guru or losing any memory, but the data buffer I set up to receive the serial data remains unchanged (I do have much shorter programs that do nothing!)<grin>. Larry says the code to ArgoTerm (Jez's) is in the DL, and uses asm to open the serial port. I go find out now. —Mike
#51504From: Mike BerroJan 29, 1987 11:33 PM
Larry, Don, Bela & Patrick: Thank you very much for your help! What I learned (again) is not to trust the examples in the Amiga books, rather I should trust only what works! I copied the technique from ARGO.S in DL10. It works, but I'm not yet sure how. There is no need (apparently) to call CreateExtIO, and you can set the parameters (i.e. baud rate) using SendIO(). Jez's code doesn't use DoIO(), which I didn't want to use anyway, but I had started with it because it looked the easiest. When I get the routine finished I'll upload it here, it's the least I could do. Thanx again! —Mike