[comp.sys.amiga.tech] bugs

cmcmanis@sun.uucp (Chuck McManis) (05/30/88)

In article <8805280630.AA21587@jade.berkeley.edu> TLIMONCE@DREW.BITNET writes:
>1.  You can't send a CMD_WRITE to the serial port if there is already a
>CMD_WRITE being worked on.  I think someone mentioned this before.
>Besides, the project I'm working on is a port from an OS that didn't let
>you do that anyway (some 8088-based widget... MS-DOG?).

Actually you can, what you can't do is reuse the IORequest until the request
it has been holding is satisfied. So assuming you are using SendIO and WaitIO
you should mark your requests in use until you  get a reply. The reply port 
can be the same, there just has to be unique instances of the data struct.

>2.  I had this wierd bug.  My machine would guru 5 minutes after I ran
>this program.  What was it?  I had sent a message to the timer.device to
>reply in 5 minutes and I was only testing the program for 1 minute.  4
>minutes later the request it replied to and the reply goes nowhere. Simple
>solution, if the request was outstanding at program exit I would try to
>cancel it.  The only problem with that if you try to cancel it (the timer
>request) the machine gurus.  Any work-around for that?  (I didn't try
>removing it from the queue "manually")

If you use AbortIO() the request will indeed cancel correctly. This is a 
somewhat arcane area of the Amiga so it is not unusual to get strange things
happening here. Check out Matt Dillions dio code which wraps up all the
exec I/O calls into a much nicer package. Without dio the sequence is something
like 
	if (CheckIO(ior)) 
		{AbortIO(ior); WaitIO(ior);}


>3.  There is no way to tell if there is a printer connected.  I'm not
>looking for anything fancy.  I just want to know if something's out there.
>The program I'm porting has a nice feature in that the print-to-printer
>(as opposed to print-to-diskfile) doesn't get highlighted if no printer is
>found (or turned on).  The only way to do that on the Amiga is to print
>something and see if 5 minutes later the user gets a time-out. (Almost
>makes me want to go directly to the hardware to do the checking myself.
>Just kidding...)

Why not send a NULL to printer.device asynchronously and see how long it
takes? Part of the problem is that the printer can be on the serial or the
parallel port (which you could find with preferences) On the serial port
if the user has a 'modem' cable connecting to the printer then an SDCMD_QUERY
should tell you the state of the DSR bit, an that should tell you if the 
printer is attached. Don't know about how you would do this for the parallel
port. 

>Thanks for noteing these.  Hopefully they will be corrected (or someone
>will educate me about fixes or [couldn't be!] tell me that I am doing
>something wrong :-) )

Hope you continue to have fun programming the Amiga. Lot's to learn and 
it isn't like any other microcomputer on the market when it comes to 
low level stuff. 

>Tom
[very long signature deleted]


-- 
--Chuck McManis
uucp: {anywhere}!sun!cmcmanis   BIX: cmcmanis  ARPAnet: cmcmanis@sun.com
These opinions are my own and no one elses. But you knew that, didn't you.

jdp@caleb.UUCP (Jim Pritchett) (05/19/89)

      After submitting my previous question about the serial 'bug,'  it
occurred to me that it would be very helpful to programmers to have a concise
listing available which describes the known bugs in the Amiga system.  It would
also be helpful to have a list of associated symptoms and workarounds.  Does
such a document exist?  If so, could someone please post it here?  It would
probably save many hours of debugging time for those of us who are not "in
the know" about these things.

                                    Thank you,



--

                                         Jim Pritchett

                                         UUCP:  killer!gtmvax!dms3b1!caleb!jdp