[comp.sys.atari.8bit] Help with Action

tob@inuxm.UUCP (T Burger) (12/19/86)

++++++++++++++   HELP +++++++++++++++


I have written a program for the Atari in Action, and I am Having trouble
with the RS232 ports.  If anyone has an idea on what is going on PLEASE
respond, before I pull ALL of my hair out!!!

This program is for use with the X10 POWERHOUSE interface.  If I ever get it
fixed I will post it here.

My problem.

I have a routine that opens  the R2: port and starts concurrent mode operation.
It sends the info to the X10 and waits for a reply by using XIO 13 to get
the status of the input buffer.  It gets the input, closes the port and
and returns to the calling procedure.

BUT this usually only works the first time I call it.  The second time I call
it I get error 132 (illegal XIO command - the concurrent mode-) or
error 154 (attempt to input from a R: port without concurrent mode active).
I am using the standard 850 handler for all of this.  I have tried moving the
location of this procedure around in memory and the results are the same, so
I don't think I have a 'lost' pointer in my program.
This problem isn't there all the time.  If fact I have compiled withe the
run time lib and when I run the result over and over, sometimes it works fine
and sometimes (usually) it bombs.  The procedure allways works once, and if
it works twice it seems to work forever.  Sometimes I can get a compile to
work by having a file in the edit buffer at compile time, this indicates
a code location problem.  But the size of the file in the edit buffer is
important, sometimes the one I picked last time won't work this time.


I realize this sounds like a lot of bable, but after many late nites fighting
this mess, this is the best I can do. (:>

Any pointers to what simple thing I am overlooking whould keep me
forever in your debt.

Ted O. Burger