CompuServe Thread

#dsperatly seeking serial

3 messages in this thread
#50951From: Mike BerroJan 26, 1987 3:11 PM
I am trying to read from the serial device using assembly language. Here is what I'm doing (sans error checking): jsr CreatePort ;these are translated from C, but seem… jsr CreateExtIO ;…to work ok. * move.l #0,d0 ;unit number move.l #0,d1 ;flags lea serial_dev_name,a0 ;SERIALNAME move.l mySerReq,a1 ;created by CreateExtIO movea.l _AbsExecBase,a6 jsr _LVOOpenDevice(a6) ;open device returns no error * movea.l mySerReq,a1 move.l #1200,IO_BAUD(a0) ;set baud rate move.l #SDCMD_SETPARAMS,$1c(a0) movea.l _AbsExecBase,a6 jsr _LVODoIO(a6) ;returns error of d0 = -3 I don't understand why I'm getting an error of -3. Do you? Thanx! —Mike
#51038From: John DraperJan 26, 1987 11:07 PM
A few more thoughts Mike… what is in A0 when you set the baud? Are you using a long enough area for the io block? <straining to think without benefit of docs) Regards, Larry.
#51081From: Mike BerroJan 27, 1987 3:17 AM
a0 points to the io block (mySerReq), for which I allocated the size of the extended serial block, as warned in the manual. Anyway, such an error would probably cause a guru. I wish I was getting a guru! I'm amazed that I'm (apparently) doing something wrong and am not getting the guru! I've tried setting the serial block parameters to all sorts of values, and still get an error code of -3 from DoIO()! >sigh< When are you getting back to your docs (not that I want to rush you, or anything <grin>)? I may just put this on hold for a week. Thanx! —Mike