Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.sys.acorn.programmer > #317
| Subject | Re: Serial terminal |
|---|---|
| Newsgroups | comp.sys.acorn.programmer |
| From | James Peacock <j.peacock.news@googlemail.com> |
| Date | 2011-05-20 10:35 +0100 |
| Message-ID | <328146d651.james@iyonix.lan> (permalink) |
| References | <9Oh*KpqDt@news.chiark.greenend.org.uk> <4dd4222b$0$310$14726298@news.sunsite.dk> <-Oh*qMqDt@news.chiark.greenend.org.uk> <9Oh*G0qDt@news.chiark.greenend.org.uk> <4dd5a0ea$0$14694$ba4acef3@reader.news.orange.fr> |
| Organization | Unlimited download news at news.astraweb.com |
Rick Murray wrote:
> On 18/05/2011 23:05, Theo Markettos wrote:
>
>> Does OS_SerialOp have sensible defaults on later OSs? It must be a long
>> while since anyone wired an 'Acorn' cable.
>
> When I wrote my little terminal prog, I loaded and used the serial
> blockdrivers. Not much help to you, I know, but I got fed up of SerialOp
> doing different things to what I expected...
I've used the following to talk to a beagle board's debug terminal
before. It worked on RISC OS 5, can't test it on anything earlier,
you'll probably need to remove the 'sleep' in port$ and change
'Serial1'.
James
port_in%=0
port_out%=0
ON ERROR ON ERROR OFF:PROCclose:PROCerror:END
port$="Devices#sleep;baud=115200;data=8;stop=1;noparity;nohandshake:$.Serial1"
port_in%=OPENIN(port$)
port_out%=OPENOUT(port$)
IF port_in%=0 ERROR 1,"Can't open for input"
IF port_out%=0 ERROR 1,"Can't open for output"
REPEAT
IF EXT#port_in%=0 THEN
k% = INKEY(1)
IF k%>=0 BPUT#port_out%,k%
ELSE
PRINT CHR$(BGET#port_in%);
ENDIF
UNTIL FALSE
END
DEF PROCclose
IF port_in%<>0 CLOSE#port_in%:port_in%=0
IF port_out%<>0 CLOSE#port_out%:port_out%=0
ENDPROC
DEF PROCerror
PRINT "Error: ";REPORT$;" at line ";ERL
ENDPROC
Back to comp.sys.acorn.programmer | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
Serial terminal Theo Markettos <theom+news@chiark.greenend.org.uk> - 2011-05-18 19:27 +0100
Re: Serial terminal Alex Macfarlane Smith <nospam@archifishal.co.uk> - 2011-05-18 20:46 +0100
Re: Serial terminal Theo Markettos <theom+news@chiark.greenend.org.uk> - 2011-05-18 21:04 +0100
Re: Serial terminal Theo Markettos <theom+news@chiark.greenend.org.uk> - 2011-05-18 22:05 +0100
Re: Serial terminal Rick Murray <heyrickmail-usenet@yahoo.co.uk> - 2011-05-20 00:59 +0200
Re: Serial terminal "Ste (news)" <steve@revi11.plus.com> - 2011-05-20 00:43 +0100
Re: Serial terminal James Peacock <j.peacock.news@googlemail.com> - 2011-05-20 10:35 +0100
Re: Serial terminal Theo Markettos <theom+news@chiark.greenend.org.uk> - 2011-05-20 17:44 +0100
Re: Serial terminal jgharston <jgh@arcade.demon.co.uk> - 2011-05-20 01:25 -0700
Re: Serial terminal Theo Markettos <theom+news@chiark.greenend.org.uk> - 2011-05-20 16:23 +0100
csiph-web