25 August 2014, 17:50 | #1 |
Registered User
Join Date: Nov 2012
Location: UK
Posts: 137
|
Serial programming in ACE basic on A600.
Hi,
I am trying to figure out how to do serial programming in ACE basic. My setup is as follows: * A600 with ACE (GPL release) installed to HD (CF). * A600 serial pport connected to USB to serial device. * USB serial plugged into laptop running OpenBSD. To start with, I just want to open the serial device on the amiga side. Looking at the ACE basic documentation (http://www.users.on.net/~dbenn/docs/ref.html), the following program should open the serial port on the A600: Code:
print "error code:";err serial open 1,0,9600,"N81",1024 print "error code:";err I compile, assemble and link the program using `bas` and a binary falls out. However, when this is run we get: Code:
error code: 0 error code: 300 I have also tried using the second serial line (unit 1) but alas, the same. So really I have fallen at the first hurdle. Does anyone know what is wrong here? I'm starting to suspect ACE does not work on the A600. Maybe a discrepancy in the serial hardware (between the other systems). |
25 August 2014, 19:25 | #2 | |
Registered User
Join Date: Jan 2002
Location: Germany
Posts: 7,021
|
Quote:
First check if the serial port works at all. Open a Shell window and enter echo >ser: "hello world" If this succeeds, run SnoopDOS before you run your Basic program. The log should show if it tries to open serial.device and perhaps even why it fails. |
|
25 August 2014, 20:05 | #3 |
Registered User
Join Date: Nov 2012
Location: UK
Posts: 137
|
Hi Thomas,
Thanks for the echo trick. Using this I was able to debug my program. Basically, if you forget to close the serial port in your program (as I had), you render it useless until a reboot (or until you issue some command I don't yet know about). So after adding a "serial close 1" to the program it works every time! P.S. I had a play with snoopdos and ace basic indeed uses serial.device. Which I believe is a good thing |
25 August 2014, 20:07 | #4 |
Registered User
Join Date: Dec 2010
Location: Athens/Greece
Age: 53
Posts: 720
|
This is what I get from the 3-liner you posted when compiled (with ACE) and run three times.
Code:
3.Work:t/ace/alkis> ser error code: 0 error code: 0 3.Work:t/ace/alkis> ser error code: 0 error code: 300 3.Work:t/ace/alkis> ser error code: 0 error code: 300 |
25 August 2014, 21:21 | #5 |
Registered User
Join Date: Nov 2012
Location: UK
Posts: 137
|
@alkis -- yep, that was the issue. See the above post.
|
27 August 2014, 23:34 | #6 |
Registered User
Join Date: Nov 2012
Location: UK
Posts: 137
|
By the way. Does anyone know if there is a quick way to release the serial port in case a program holding the serial channel open crashes? Right now I have to reboot every time...
|
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
Thread Tools | |
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
PC Serial to Amiga Serial | lesta_smsc | support.Hardware | 48 | 02 December 2015 10:14 |
Manuals for GFA Basic and Hi-Soft Basic 2 | ricky500 | request.Apps | 20 | 12 February 2013 21:06 |
Ace | alexh | AMR contributions | 6 | 14 August 2011 15:47 |
Free Hat!!! Free Hat!!! Sorry I mean Free ZX Spectrum basic Programming Book | fitzsteve | MarketPlace | 3 | 02 April 2010 18:48 |
Just got A600, need some basic help | misjah | New to Emulation or Amiga scene | 7 | 28 October 2009 03:06 |
|
|